From lede-commits at lists.infradead.org  Thu Jul  1 02:59:34 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 01 Jul 2021 05:59:34 -0400
Subject: [openwrt/openwrt] ath79: mikrotik: fix beeper phantom noise on RB912
In-Reply-To: <162513357490.25321.9698325247346613149@git-01.infra.openwrt.org>
References: <162513357490.25321.9698325247346613149@git-01.infra.openwrt.org>
Message-ID: <mailman.4855.1625133581.1072.lede-commits@lists.infradead.org>

xback pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/a58bcc9e673db3c6aa39f2089d216d51c8356418

commit a58bcc9e673db3c6aa39f2089d216d51c8356418
Author: Koen Vandeputte <koen.vandeputte at ncentric.com>
AuthorDate: Mon Jun 28 10:57:21 2021 +0200

    ath79: mikrotik: fix beeper phantom noise on RB912
    
    Analysis done by Denis Kalashnikov:
    
    It seems that some ROS versions on some routerboard models have this bug:
    after silence boot (no output to uart, no beeps) beeper clicks when wireless traffic is.
    
    https://forum.mikrotik.com/viewtopic.php?f=3&t=92269
    https://forum.mikrotik.com/viewtopic.php?t=63399
    
    From these links:
    
    1)
    Hello, I have RB951G-2HnD and I noticed strange thing
    when I loaded the device with some wireless traffic it
    produced strange sound - like hissing, fizzing etc.
    
    2)
    Same problem still on 6.33, with silent boot enabled
    I hear buzzing noise on wireless load.
    
    3)
    The sound is fixed in v5.19, it was a bug that caused beeper to make clicks.
    
    It also got fixed in RouterOS:
    
    * What's new in 5.19 (2012-Jul-16 10:51):
    fix ticking sound on RB411UAHL;
    
    * What's new in 6.38.3 (2017-Feb-07 09:52):
    rb3011 - fixed noise from buzzer after silent boot;
    
    I've checked with an oscilloscope that:
    * When on the ssr beeper pin is 0,
      on the beeper itself is 1 (~5V),
      and when on the ssr beeper pin is 1,
      on the beeper is 0
      The beeper doesn't consume power,
      so 1 should be a default/idle value for the ssr beeper pin).
    * When there is wireless traffic (ping packets)
      in the background and the beeper clicks, I see
      pulses on the beeper itself,
      but no pulses on the ssr beeper pin (Q5 pin of 74hc595).
      When I manually toggle the ssr beeper pin I see pulses on both.
      So, it is likely that the phantom beeper clicks are caused by the EMI.
    
    Suggested-by: Denis Kalashnikov <denis281089 at gmail.com>
    Reviewed-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
    Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts
index cc5553acda..ee2c12b4e0 100644
--- a/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts
+++ b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts
@@ -107,6 +107,12 @@
 	gpio-export {
 		compatible = "gpio-export";
 
+		beeper {
+			gpio-export,name = "beeper";
+			gpio-export,output = <1>;	/* Must be 1 to avoid EMI induced clicking noise */
+			gpios = <&ssr 5 GPIO_ACTIVE_HIGH>;
+		};
+
 		usb_power {
 			gpio-export,name = "power-usb";
 			gpio-export,output = <1>;


From lede-commits at lists.infradead.org  Thu Jul  1 14:26:36 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 01 Jul 2021 17:26:36 -0400
Subject: [openwrt/openwrt]  ath79: resolve GPIO address conflicts
In-Reply-To: <162517479625.22685.6783542006626268739@git-01.infra.openwrt.org>
References: <162517479625.22685.6783542006626268739@git-01.infra.openwrt.org>
Message-ID: <mailman.4941.1625174800.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/04942780734da56626d088d824a6117a74757637

commit 04942780734da56626d088d824a6117a74757637
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed Jun 30 23:36:02 2021 +0200

    ath79: resolve GPIO address conflicts
    
    The ar71xx GPIO driver only uses 0x24 registers, all following GPIO
    registers are using to control pinmux functions, which are not handles
    by the GPIO driver but the generic Linux pinctrl driver.
    
    For some SoC conflicting address ranges were defined for these (AR7240 &
    AR9330).
    
    Resolve these cases and align the address space of the GPIO controller
    between all SoCs, as the used address space of the driver is identical
    for all these.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/ath79/dts/ar7100.dtsi | 2 +-
 target/linux/ath79/dts/ar724x.dtsi | 2 +-
 target/linux/ath79/dts/ar9132.dtsi | 2 +-
 target/linux/ath79/dts/ar9330.dtsi | 2 +-
 target/linux/ath79/dts/ar934x.dtsi | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/ath79/dts/ar7100.dtsi b/target/linux/ath79/dts/ar7100.dtsi
index ec6ff30ab6..86673cb5da 100644
--- a/target/linux/ath79/dts/ar7100.dtsi
+++ b/target/linux/ath79/dts/ar7100.dtsi
@@ -57,7 +57,7 @@
 
 			gpio: gpio at 18040000 {
 				compatible = "qca,ar7100-gpio";
-				reg = <0x18040000 0x30>;
+				reg = <0x18040000 0x28>;
 				interrupts = <2>;
 
 				ngpios = <16>;
diff --git a/target/linux/ath79/dts/ar724x.dtsi b/target/linux/ath79/dts/ar724x.dtsi
index 25d72a786c..882b0bc51a 100644
--- a/target/linux/ath79/dts/ar724x.dtsi
+++ b/target/linux/ath79/dts/ar724x.dtsi
@@ -50,7 +50,7 @@
 			gpio: gpio at 18040000 {
 				compatible = "qca,ar7240-gpio",
 						"qca,ar7100-gpio";
-				reg = <0x18040000 0x30>;
+				reg = <0x18040000 0x28>;
 				interrupts = <2>;
 
 				ngpios = <18>;
diff --git a/target/linux/ath79/dts/ar9132.dtsi b/target/linux/ath79/dts/ar9132.dtsi
index 37fc32e6d6..44a5870ad7 100644
--- a/target/linux/ath79/dts/ar9132.dtsi
+++ b/target/linux/ath79/dts/ar9132.dtsi
@@ -77,7 +77,7 @@
 			gpio: gpio at 18040000 {
 				compatible = "qca,ar9132-gpio",
 						"qca,ar7100-gpio";
-				reg = <0x18040000 0x30>;
+				reg = <0x18040000 0x28>;
 				interrupts = <2>;
 
 				ngpios = <22>;
diff --git a/target/linux/ath79/dts/ar9330.dtsi b/target/linux/ath79/dts/ar9330.dtsi
index 7607fede49..06e1cf4601 100644
--- a/target/linux/ath79/dts/ar9330.dtsi
+++ b/target/linux/ath79/dts/ar9330.dtsi
@@ -49,7 +49,7 @@
 
 			gpio: gpio at 18040000 {
 				compatible = "qca,ar7100-gpio";
-				reg = <0x18040000 0x34>;
+				reg = <0x18040000 0x28>;
 				interrupts = <2>;
 
 				ngpios = <30>;
diff --git a/target/linux/ath79/dts/ar934x.dtsi b/target/linux/ath79/dts/ar934x.dtsi
index 42fbab4b60..84dbe65f85 100644
--- a/target/linux/ath79/dts/ar934x.dtsi
+++ b/target/linux/ath79/dts/ar934x.dtsi
@@ -78,7 +78,7 @@
 
 			gpio: gpio at 18040000 {
 				compatible = "qca,ar9340-gpio";
-				reg = <0x18040000 0x2c>;
+				reg = <0x18040000 0x28>;
 
 				interrupts = <2>;
 				ngpios = <23>;


From lede-commits at lists.infradead.org  Fri Jul  2 02:10:14 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 05:10:14 -0400
Subject: [openwrt/openwrt]  package/comgt: Handle bind/unbind events
In-Reply-To: <162521701479.26327.9384354570515153051@git-01.infra.openwrt.org>
References: <162521701479.26327.9384354570515153051@git-01.infra.openwrt.org>
Message-ID: <mailman.4987.1625217019.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/89ef883b92b3a87d9ab1bd289de26b9e72681dac

commit 89ef883b92b3a87d9ab1bd289de26b9e72681dac
Author: Arjun AK <arjunak234 at gmail.com>
AuthorDate: Thu Jul 16 21:22:24 2020 +0530

    package/comgt: Handle bind/unbind events
    
    This script was expecting only add/remove events which has not been the
    case since Kernel 4.12 (which added bind/unbind). Bind events were getting
    treated as remove events which would cause hotplugged 3g modems to not
    work.
    
    More info:
    https://lkml.org/lkml/2018/12/23/128
    https://github.com/systemd/systemd/issues/8221
    
    Signed-off-by: Arjun AK <arjunak234 at gmail.com>
---
 package/network/utils/comgt/files/3g.usb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/network/utils/comgt/files/3g.usb b/package/network/utils/comgt/files/3g.usb
index 8f0d62ca83..9c7d07a0e6 100644
--- a/package/network/utils/comgt/files/3g.usb
+++ b/package/network/utils/comgt/files/3g.usb
@@ -23,6 +23,8 @@ find_3g_iface() {
 	fi
 }
 
+[ "$ACTION" = add ] || [ "$ACTION" = remove ] || exit 0
+
 case "$DEVICENAME" in
 	tty*)
 		[ -e "/dev/$DEVICENAME" ] || [ "$ACTION" = remove ] || exit 0


From lede-commits at lists.infradead.org  Fri Jul  2 02:33:55 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 05:33:55 -0400
Subject: [openwrt/openwrt]  package/comgt: Handle bind/unbind events
In-Reply-To: <162521843513.12203.6649302542973454478@git-01.infra.openwrt.org>
References: <162521843513.12203.6649302542973454478@git-01.infra.openwrt.org>
Message-ID: <mailman.4992.1625218445.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/fc4b5411b3a2105df4655e9623277d88489f6710

commit fc4b5411b3a2105df4655e9623277d88489f6710
Author: Arjun AK <arjunak234 at gmail.com>
AuthorDate: Thu Jul 16 21:22:24 2020 +0530

    package/comgt: Handle bind/unbind events
    
    This script was expecting only add/remove events which has not been the
    case since Kernel 4.12 (which added bind/unbind). Bind events were getting
    treated as remove events which would cause hotplugged 3g modems to not
    work.
    
    More info:
    https://lkml.org/lkml/2018/12/23/128
    https://github.com/systemd/systemd/issues/8221
    
    Signed-off-by: Arjun AK <arjunak234 at gmail.com>
    (cherry picked from commit 89ef883b92b3a87d9ab1bd289de26b9e72681dac)
---
 package/network/utils/comgt/files/3g.usb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/network/utils/comgt/files/3g.usb b/package/network/utils/comgt/files/3g.usb
index 8f0d62ca83..9c7d07a0e6 100644
--- a/package/network/utils/comgt/files/3g.usb
+++ b/package/network/utils/comgt/files/3g.usb
@@ -23,6 +23,8 @@ find_3g_iface() {
 	fi
 }
 
+[ "$ACTION" = add ] || [ "$ACTION" = remove ] || exit 0
+
 case "$DEVICENAME" in
 	tty*)
 		[ -e "/dev/$DEVICENAME" ] || [ "$ACTION" = remove ] || exit 0


From lede-commits at lists.infradead.org  Fri Jul  2 04:31:18 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 07:31:18 -0400
Subject: [openwrt/openwrt] kernel/modules: move act_gact into kmod-sched-core
In-Reply-To: <162522547891.28156.2946966846525067971@git-01.infra.openwrt.org>
References: <162522547891.28156.2946966846525067971@git-01.infra.openwrt.org>
Message-ID: <mailman.5005.1625225485.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/69c10497c7fe4fada202c40825903fe9a033ade3

commit 69c10497c7fe4fada202c40825903fe9a033ade3
Author: DENG Qingfang <dqfext at gmail.com>
AuthorDate: Fri Apr 9 12:25:08 2021 +0800

    kernel/modules: move act_gact into kmod-sched-core
    
    As the name suggests, act_gact has the generic actions such as dropping
    and accepting packets, so move it into kmod-sched-core.
    
    Signed-off-by: DENG Qingfang <dqfext at gmail.com>
    (cherry-picked from commit 10aacb9a6ce3445cdee39573f4120e7888beb022)
---
 package/kernel/linux/modules/netsupport.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
index f14928e18e..1eec9f9b63 100644
--- a/package/kernel/linux/modules/netsupport.mk
+++ b/package/kernel/linux/modules/netsupport.mk
@@ -721,7 +721,7 @@ $(eval $(call KernelPackage,mppe))
 
 
 SCHED_MODULES = $(patsubst $(LINUX_DIR)/net/sched/%.ko,%,$(wildcard $(LINUX_DIR)/net/sched/*.ko))
-SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_mirred act_skbedit cls_matchall
+SCHED_MODULES_CORE = sch_ingress sch_fq_codel sch_hfsc sch_htb sch_tbf cls_basic cls_fw cls_route cls_flow cls_tcindex cls_u32 em_u32 act_gact act_mirred act_skbedit cls_matchall
 SCHED_MODULES_FILTER = $(SCHED_MODULES_CORE) act_connmark act_ctinfo sch_cake sch_netem sch_mqprio em_ipset cls_bpf cls_flower act_bpf act_vlan
 SCHED_MODULES_EXTRA = $(filter-out $(SCHED_MODULES_FILTER),$(SCHED_MODULES))
 SCHED_FILES = $(patsubst %,$(LINUX_DIR)/net/sched/%.ko,$(filter $(SCHED_MODULES_CORE),$(SCHED_MODULES)))
@@ -745,6 +745,7 @@ define KernelPackage/sched-core
 	CONFIG_NET_CLS_ROUTE4 \
 	CONFIG_NET_CLS_TCINDEX \
 	CONFIG_NET_CLS_U32 \
+	CONFIG_NET_ACT_GACT \
 	CONFIG_NET_ACT_MIRRED \
 	CONFIG_NET_ACT_SKBEDIT \
 	CONFIG_NET_CLS_MATCHALL \
@@ -899,7 +900,6 @@ define KernelPackage/sched
 	CONFIG_NET_SCH_FQ \
 	CONFIG_NET_SCH_PIE \
 	CONFIG_NET_ACT_POLICE \
-	CONFIG_NET_ACT_GACT \
 	CONFIG_NET_ACT_IPT \
 	CONFIG_NET_ACT_PEDIT \
 	CONFIG_NET_ACT_SIMP \


From lede-commits at lists.infradead.org  Fri Jul  2 07:19:49 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 10:19:49 -0400
Subject: [openwrt/openwrt]  ath10k-ct: fix typo in Makefile
In-Reply-To: <162523558884.11281.15450848003380157826@git-01.infra.openwrt.org>
References: <162523558884.11281.15450848003380157826@git-01.infra.openwrt.org>
Message-ID: <mailman.5027.1625235598.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/86f617178885c59665cc6ce01c570f128c06d151

commit 86f617178885c59665cc6ce01c570f128c06d151
Author: Michael Yartys <michael.yartys at protonmail.com>
AuthorDate: Mon Jun 21 13:37:20 2021 +0200

    ath10k-ct: fix typo in Makefile
    
    Add forgotten colon to Makefile.
    
    Signed-off-by: Michael Yartys <michael.yartys at protonmail.com>
    (cherry picked from commit f0f1d68d528402b4d51a1dd08d2e2c9034167f92)
---
 package/kernel/ath10k-ct/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index f06d7cf132..5681c5c2cd 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ath10k-ct
-PKG_RELEASE=$(AUTORELEASE)
+PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=


From lede-commits at lists.infradead.org  Fri Jul  2 07:19:48 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 10:19:48 -0400
Subject: [openwrt/openwrt]  ath10k-ct: update to latest version
In-Reply-To: <162523558884.11281.15450848003380157826@git-01.infra.openwrt.org>
References: <162523558884.11281.15450848003380157826@git-01.infra.openwrt.org>
Message-ID: <mailman.5028.1625235598.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/24cfa5005eb475d5a182f5e82dbfa469ccc7c071

commit 24cfa5005eb475d5a182f5e82dbfa469ccc7c071
Author: Michael Yartys <michael.yartys at protonmail.com>
AuthorDate: Thu Jun 3 23:50:12 2021 +0200

    ath10k-ct: update to latest version
    
    Changelog:
    - ath10k-ct: Add security fixes.
    - ath10k-ct: Add 5.12 kernel version.
    - ath10k-ct: Fix the beacon/mcast/bcast override issue
    - ath10k-ct 5.7: Fix setting mcast/bcast/beacon rate from debugfs.
    - ath10k-ct: Add 5.11 driver.
    
    Delete upstreamed patch and refresh the rest. Also, use the opportunity to
    set PKG_RELEASE to $(AUTORELEASE).
    
    Runtime-tested on ipq806x (Netgear R7800).
    
    Signed-off-by: Michael Yartys <michael.yartys at protonmail.com>
    (cherry picked from commit 2e10ed925e1e07c28570731a429efa5e7de3b826)
---
 package/kernel/ath10k-ct/Makefile                  |  8 ++---
 .../164-ath10k-commit-rates-from-mac80211.patch    | 37 ----------------------
 ...-controlling-support-for-various-chipsets.patch |  4 +--
 .../202-ath10k-use-tpt-trigger-by-default.patch    |  4 +--
 4 files changed, 8 insertions(+), 45 deletions(-)

diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index a225bd8b19..f06d7cf132 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -1,16 +1,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ath10k-ct
-PKG_RELEASE=2
+PKG_RELEASE=$(AUTORELEASE)
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2021-01-11
-PKG_SOURCE_VERSION:=9fe1df7d4f783b6b0cd1c99d11979e5a6e6fc40b
-PKG_MIRROR_HASH:=4e30e256716611045e930b95eadaa8bfcadd5bdd8bbe3869cfe0f377920e812b
+PKG_SOURCE_DATE:=2021-06-03
+PKG_SOURCE_VERSION:=b44cd7b2e7b0df5995ece18f358d4dfc40834ba1
+PKG_MIRROR_HASH:=59f961ad425eb1a48fa9c391a325cc0f23845daec9d12673445d3077f9756cf0
 
 # Build the 5.10 ath10k-ct driver version.
 # Probably this should match as closely as
diff --git a/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch b/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch
deleted file mode 100644
index 842f3ea2a5..0000000000
--- a/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: Sven Eckelmann <sven at narfation.org>
-Date: Tue, 26 Feb 2019 08:06:35 +0100
-Subject: ath10k-ct: apply mac80211 rates to ath10k-ct rate state
-
-The rates from mac80211 have to be copied to the state of ath10k-ct or
-otherwise the ath10k_check_apply_special_rates function overwrites
-them again with some default values. This breaks for example the
-mcast_rate set for a wifi-iface.
-
-Signed-off-by: Sven Eckelmann <sven at narfation.org>
-
---- a/ath10k-5.10/mac.c
-+++ b/ath10k-5.10/mac.c
-@@ -6774,6 +6774,7 @@ static void ath10k_recalculate_mgmt_rate
- 		return;
- 	}
- 
-+	arvif->mgt_rate[def->chan->band] = hw_rate_code;
- 	vdev_param = ar->wmi.vdev_param->mgmt_rate;
- 	ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id, vdev_param,
- 					hw_rate_code);
-@@ -7000,6 +7001,7 @@ static void ath10k_bss_info_changed(stru
- 			   "mac vdev %d mcast_rate %x\n",
- 			   arvif->vdev_id, rate);
- 
-+		arvif->mcast_rate[band] = rate;
- 		vdev_param = ar->wmi.vdev_param->mcast_data_rate;
- 		ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
- 						vdev_param, rate);
-@@ -7008,6 +7010,7 @@ static void ath10k_bss_info_changed(stru
- 				    "failed to set mcast rate on vdev %i: %d\n",
- 				    arvif->vdev_id,  ret);
- 
-+		arvif->bcast_rate[band] = rate;
- 		vdev_param = ar->wmi.vdev_param->bcast_data_rate;
- 		ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
- 						vdev_param, rate);
diff --git a/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
index 749e796148..691b504c0f 100644
--- a/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
+++ b/package/kernel/ath10k-ct/patches/201-ath10k-add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
@@ -210,7 +210,7 @@ v13:
  
  #include "htt.h"
  #include "htc.h"
-@@ -1551,6 +1552,13 @@ struct ath10k {
+@@ -1557,6 +1558,13 @@ struct ath10k {
  	} testmode;
  
  	struct {
@@ -445,7 +445,7 @@ v13:
  {
 --- a/ath10k-5.10/wmi-tlv.c
 +++ b/ath10k-5.10/wmi-tlv.c
-@@ -4585,6 +4585,8 @@ static const struct wmi_ops wmi_tlv_ops
+@@ -4594,6 +4594,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/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch b/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch
index eae779ef58..6205c9b661 100644
--- a/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch
+++ b/package/kernel/ath10k-ct/patches/202-ath10k-use-tpt-trigger-by-default.patch
@@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin <dev at kresin.me>
 
 --- a/ath10k-5.10/core.h
 +++ b/ath10k-5.10/core.h
-@@ -1659,6 +1659,10 @@ struct ath10k {
+@@ -1665,6 +1665,10 @@ struct ath10k {
  	u8 csi_data[4096];
  	u16 csi_data_len;
  
@@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin <dev at kresin.me>
  	if (ret)
 --- a/ath10k-5.10/mac.c
 +++ b/ath10k-5.10/mac.c
-@@ -11400,7 +11400,7 @@ int ath10k_mac_register(struct ath10k *a
+@@ -11403,7 +11403,7 @@ int ath10k_mac_register(struct ath10k *a
  	ar->hw->weight_multiplier = ATH10K_AIRTIME_WEIGHT_MULTIPLIER;
  
  #ifdef CPTCFG_MAC80211_LEDS


From lede-commits at lists.infradead.org  Fri Jul  2 08:15:55 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 11:15:55 -0400
Subject: [openwrt/openwrt]  ath10k-ct: add security fixes
In-Reply-To: <162523895536.30247.11114728414514096568@git-01.infra.openwrt.org>
References: <162523895536.30247.11114728414514096568@git-01.infra.openwrt.org>
Message-ID: <mailman.5042.1625238961.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-19.07:
https://git.openwrt.org/ceb8821a3d3356733aafa9cc9430d1b1ab8ace07

commit ceb8821a3d3356733aafa9cc9430d1b1ab8ace07
Author: Michael Yartys <michael.yartys at protonmail.com>
AuthorDate: Thu Jun 3 23:50:12 2021 +0200

    ath10k-ct: add security fixes
    
    This rebases -ct changes on top of upstream stable kernel's latest code.
    Including the wifi security fixes that recently went in.
    
    Removed upstreamed 203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
    and refreshed patches.
    
    Signed-off-by: Michael Yartys <michael.yartys at protonmail.com>
    Signed-off-by: Petr ?tetiar <ynezz at true.cz> [backport]
    (backported from commit 2e10ed925e1e07c28570731a429efa5e7de3b826)
---
 package/kernel/ath10k-ct/Makefile                  |  6 ++--
 ...support-for-configuring-management-packet.patch |  6 ++--
 ...possible-out-of-bound-access-of-ath10k_ra.patch |  4 +--
 ...incorrect-multicast-broadcast-rate-settin.patch |  6 ++--
 .../164-ath10k-commit-rates-from-mac80211.patch    |  6 ++--
 ...-controlling-support-for-various-chipsets.patch | 38 ++++++++++-----------
 ...02-ath10k-4.16-use-tpt-trigger-by-default.patch |  4 +--
 ...t-available-channels-via-DT-ieee80211-fre.patch | 39 ----------------------
 8 files changed, 35 insertions(+), 74 deletions(-)

diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index c46c3a834e..ef3c086267 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2019-09-09
-PKG_SOURCE_VERSION:=5e8cd86f90dac966d12df6ece84ac41458d0e95f
-PKG_MIRROR_HASH:=dc1097f3a7b4b7e346918f206746d00a0b7df07ae3be9b89be55dfaef3cbbe45
+PKG_SOURCE_DATE:=2021-06-03
+PKG_SOURCE_VERSION:=b44cd7b2e7b0df5995ece18f358d4dfc40834ba1
+PKG_MIRROR_HASH:=59f961ad425eb1a48fa9c391a325cc0f23845daec9d12673445d3077f9756cf0
 
 # Build the 4.19 ath10k-ct driver version.  Other options are "-4.16", or
 # leave un-defined for 4.7 kernel.  Probably this should match as closely as
diff --git a/package/kernel/ath10k-ct/patches/161-ath10k-add-support-for-configuring-management-packet.patch b/package/kernel/ath10k-ct/patches/161-ath10k-add-support-for-configuring-management-packet.patch
index e67003c5a7..2b5ca5260f 100644
--- a/package/kernel/ath10k-ct/patches/161-ath10k-add-support-for-configuring-management-packet.patch
+++ b/package/kernel/ath10k-ct/patches/161-ath10k-add-support-for-configuring-management-packet.patch
@@ -20,7 +20,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
 ---
 --- a/ath10k-4.19/mac.c
 +++ b/ath10k-4.19/mac.c
-@@ -157,6 +157,22 @@ u8 ath10k_mac_bitrate_to_idx(const struc
+@@ -158,6 +158,22 @@ u8 ath10k_mac_bitrate_to_idx(const struc
  	return 0;
  }
  
@@ -43,7 +43,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
  static int ath10k_mac_get_max_vht_mcs_map(u16 mcs_map, int nss)
  {
  	switch ((mcs_map >> (2 * nss)) & 0x3) {
-@@ -6405,9 +6421,10 @@ static void ath10k_bss_info_changed(stru
+@@ -6423,9 +6439,10 @@ static void ath10k_bss_info_changed(stru
  	struct cfg80211_chan_def def;
  	u32 vdev_param, pdev_param, slottime, preamble;
  	u16 bitrate, hw_value;
@@ -56,7 +56,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
  
  	mutex_lock(&ar->conf_mutex);
  
-@@ -6613,6 +6630,30 @@ static void ath10k_bss_info_changed(stru
+@@ -6631,6 +6648,30 @@ static void ath10k_bss_info_changed(stru
  				    arvif->vdev_id,  ret);
  	}
  
diff --git a/package/kernel/ath10k-ct/patches/162-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch b/package/kernel/ath10k-ct/patches/162-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch
index a24029983c..4e8b79f960 100644
--- a/package/kernel/ath10k-ct/patches/162-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch
+++ b/package/kernel/ath10k-ct/patches/162-ath10k-fix-possible-out-of-bound-access-of-ath10k_ra.patch
@@ -17,7 +17,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
 ---
 --- a/ath10k-4.19/mac.c
 +++ b/ath10k-4.19/mac.c
-@@ -165,7 +165,7 @@ static int ath10k_mac_get_rate_hw_value(
+@@ -166,7 +166,7 @@ static int ath10k_mac_get_rate_hw_value(
  	if (ath10k_mac_bitrate_is_cck(bitrate))
  		hw_value_prefix = WMI_RATE_PREAMBLE_CCK << 6;
  
@@ -26,7 +26,7 @@ Origin: backport, https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux
  		if (ath10k_rates[i].bitrate == bitrate)
  			return hw_value_prefix | ath10k_rates[i].hw_value;
  	}
-@@ -6636,22 +6636,22 @@ static void ath10k_bss_info_changed(stru
+@@ -6654,22 +6654,22 @@ static void ath10k_bss_info_changed(stru
  			return;
  		}
  
diff --git a/package/kernel/ath10k-ct/patches/163-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch b/package/kernel/ath10k-ct/patches/163-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch
index f6fd75b7e5..5460bf7e18 100644
--- a/package/kernel/ath10k-ct/patches/163-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch
+++ b/package/kernel/ath10k-ct/patches/163-ath10k-fix-incorrect-multicast-broadcast-rate-settin.patch
@@ -17,7 +17,7 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/
 
 --- a/ath10k-4.19/mac.c
 +++ b/ath10k-4.19/mac.c
-@@ -6421,8 +6421,8 @@ static void ath10k_bss_info_changed(stru
+@@ -6439,8 +6439,8 @@ static void ath10k_bss_info_changed(stru
  	struct cfg80211_chan_def def;
  	u32 vdev_param, pdev_param, slottime, preamble;
  	u16 bitrate, hw_value;
@@ -28,9 +28,9 @@ Origin: other, https://patchwork.kernel.org/patch/10723033/
  	enum nl80211_band band;
  	const struct ieee80211_supported_band *sband;
  
-@@ -6595,7 +6595,11 @@ static void ath10k_bss_info_changed(stru
+@@ -6613,7 +6613,11 @@ static void ath10k_bss_info_changed(stru
  	if (changed & BSS_CHANGED_MCAST_RATE &&
- 	    !WARN_ON(ath10k_mac_vif_chan(arvif->vif, &def))) {
+ 	    !ath10k_mac_vif_chan(arvif->vif, &def)) {
  		band = def.chan->band;
 -		rateidx = vif->bss_conf.mcast_rate[band] - 1;
 +		mcast_rate = vif->bss_conf.mcast_rate[band];
diff --git a/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch b/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch
index cd570a1009..569667294c 100644
--- a/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch
+++ b/package/kernel/ath10k-ct/patches/164-ath10k-commit-rates-from-mac80211.patch
@@ -11,7 +11,7 @@ Signed-off-by: Sven Eckelmann <sven at narfation.org>
 
 --- a/ath10k-4.19/mac.c
 +++ b/ath10k-4.19/mac.c
-@@ -6617,6 +6617,7 @@ static void ath10k_bss_info_changed(stru
+@@ -6635,6 +6635,7 @@ static void ath10k_bss_info_changed(stru
  			   "mac vdev %d mcast_rate %x\n",
  			   arvif->vdev_id, rate);
  
@@ -19,7 +19,7 @@ Signed-off-by: Sven Eckelmann <sven at narfation.org>
  		vdev_param = ar->wmi.vdev_param->mcast_data_rate;
  		ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
  						vdev_param, rate);
-@@ -6625,6 +6626,7 @@ static void ath10k_bss_info_changed(stru
+@@ -6643,6 +6644,7 @@ static void ath10k_bss_info_changed(stru
  				    "failed to set mcast rate on vdev %i: %d\n",
  				    arvif->vdev_id,  ret);
  
@@ -27,7 +27,7 @@ Signed-off-by: Sven Eckelmann <sven at narfation.org>
  		vdev_param = ar->wmi.vdev_param->bcast_data_rate;
  		ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
  						vdev_param, rate);
-@@ -6651,6 +6653,7 @@ static void ath10k_bss_info_changed(stru
+@@ -6669,6 +6671,7 @@ static void ath10k_bss_info_changed(stru
  			return;
  		}
  
diff --git a/package/kernel/ath10k-ct/patches/201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/ath10k-ct/patches/201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
index b454796fca..779d8d0b1f 100644
--- a/package/kernel/ath10k-ct/patches/201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
+++ b/package/kernel/ath10k-ct/patches/201-ath10k-4.16_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
@@ -129,7 +129,7 @@ v13:
  		.patch_load_addr = QCA988X_HW_2_0_PATCH_LOAD_ADDR,
  		.uart_pin = 7,
  		.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
-@@ -137,6 +139,7 @@ static const struct ath10k_hw_params ath
+@@ -139,6 +141,7 @@ static const struct ath10k_hw_params ath
  		.id = QCA9887_HW_1_0_VERSION,
  		.dev_id = QCA9887_1_0_DEVICE_ID,
  		.name = "qca9887 hw1.0",
@@ -137,7 +137,7 @@ v13:
  		.patch_load_addr = QCA9887_HW_1_0_PATCH_LOAD_ADDR,
  		.uart_pin = 7,
  		.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_ALL,
-@@ -301,6 +304,7 @@ static const struct ath10k_hw_params ath
+@@ -308,6 +311,7 @@ static const struct ath10k_hw_params ath
  		.id = QCA99X0_HW_2_0_DEV_VERSION,
  		.dev_id = QCA99X0_2_0_DEVICE_ID,
  		.name = "qca99x0 hw2.0",
@@ -145,7 +145,7 @@ v13:
  		.patch_load_addr = QCA99X0_HW_2_0_PATCH_LOAD_ADDR,
  		.uart_pin = 7,
  		.otp_exe_param = 0x00000700,
-@@ -339,6 +343,7 @@ static const struct ath10k_hw_params ath
+@@ -347,6 +351,7 @@ static const struct ath10k_hw_params ath
  		.id = QCA9984_HW_1_0_DEV_VERSION,
  		.dev_id = QCA9984_1_0_DEVICE_ID,
  		.name = "qca9984/qca9994 hw1.0",
@@ -153,7 +153,7 @@ v13:
  		.patch_load_addr = QCA9984_HW_1_0_PATCH_LOAD_ADDR,
  		.uart_pin = 7,
  		.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-@@ -382,6 +387,7 @@ static const struct ath10k_hw_params ath
+@@ -391,6 +396,7 @@ static const struct ath10k_hw_params ath
  		.id = QCA9888_HW_2_0_DEV_VERSION,
  		.dev_id = QCA9888_2_0_DEVICE_ID,
  		.name = "qca9888 hw2.0",
@@ -161,7 +161,7 @@ v13:
  		.patch_load_addr = QCA9888_HW_2_0_PATCH_LOAD_ADDR,
  		.uart_pin = 7,
  		.cc_wraparound_type = ATH10K_HW_CC_WRAP_SHIFTED_EACH,
-@@ -3167,6 +3173,10 @@ int ath10k_core_start(struct ath10k *ar,
+@@ -3238,6 +3244,10 @@ int ath10k_core_start(struct ath10k *ar,
  			ath10k_wmi_check_apply_board_power_ctl_table(ar);
  	}
  
@@ -172,7 +172,7 @@ v13:
  	return 0;
  
  err_hif_stop:
-@@ -3421,9 +3431,18 @@ static void ath10k_core_register_work(st
+@@ -3492,9 +3502,18 @@ static void ath10k_core_register_work(st
  		goto err_spectral_destroy;
  	}
  
@@ -191,7 +191,7 @@ v13:
  err_spectral_destroy:
  	ath10k_spectral_destroy(ar);
  err_debug_destroy:
-@@ -3481,6 +3500,8 @@ void ath10k_core_unregister(struct ath10
+@@ -3552,6 +3571,8 @@ void ath10k_core_unregister(struct ath10
  	if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
  		return;
  
@@ -210,7 +210,7 @@ v13:
  
  #include "htt.h"
  #include "htc.h"
-@@ -1138,7 +1139,6 @@ struct ath10k {
+@@ -1141,7 +1142,6 @@ struct ath10k {
  	u32 low_5ghz_chan;
  	u32 high_5ghz_chan;
  	bool ani_enabled;
@@ -218,7 +218,7 @@ v13:
  	bool p2p;
  	bool ct_all_pkts_htt; /* CT firmware only: native-wifi for all pkts */
  
-@@ -1389,6 +1389,13 @@ struct ath10k {
+@@ -1400,6 +1400,13 @@ struct ath10k {
  	} testmode;
  
  	struct {
@@ -394,7 +394,7 @@ v13:
 +#endif /* _LEDS_H_ */
 --- a/ath10k-4.19/mac.c
 +++ b/ath10k-4.19/mac.c
-@@ -34,6 +34,7 @@
+@@ -35,6 +35,7 @@
  #include "wmi-tlv.h"
  #include "wmi-ops.h"
  #include "wow.h"
@@ -404,7 +404,7 @@ v13:
  /* Rates */
 --- a/ath10k-4.19/wmi-ops.h
 +++ b/ath10k-4.19/wmi-ops.h
-@@ -218,7 +218,10 @@ struct wmi_ops {
+@@ -219,7 +219,10 @@ struct wmi_ops {
  	struct sk_buff *(*gen_echo)(struct ath10k *ar, u32 value);
  	struct sk_buff *(*gen_pdev_get_tpc_table_cmdid)(struct ath10k *ar,
  							u32 param);
@@ -415,7 +415,7 @@ v13:
  };
  
  int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
-@@ -1079,6 +1082,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
+@@ -1089,6 +1092,35 @@ ath10k_wmi_force_fw_hang(struct ath10k *
  	return ath10k_wmi_cmd_send(ar, skb, ar->wmi.cmd->force_fw_hang_cmdid);
  }
  
@@ -453,7 +453,7 @@ v13:
  {
 --- a/ath10k-4.19/wmi-tlv.c
 +++ b/ath10k-4.19/wmi-tlv.c
-@@ -3976,6 +3976,8 @@ static const struct wmi_ops wmi_tlv_ops
+@@ -3999,6 +3999,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,
@@ -464,7 +464,7 @@ v13:
  static const struct wmi_peer_flags_map wmi_tlv_peer_flags_map = {
 --- a/ath10k-4.19/wmi.c
 +++ b/ath10k-4.19/wmi.c
-@@ -8070,6 +8070,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
+@@ -8112,6 +8112,49 @@ ath10k_wmi_op_gen_peer_set_param(struct
  	return skb;
  }
  
@@ -514,7 +514,7 @@ v13:
  static struct sk_buff *
  ath10k_wmi_op_gen_set_psmode(struct ath10k *ar, u32 vdev_id,
  			     enum wmi_sta_ps_mode psmode)
-@@ -9821,6 +9864,9 @@ static const struct wmi_ops wmi_ops = {
+@@ -9865,6 +9908,9 @@ static const struct wmi_ops wmi_ops = {
  	.fw_stats_fill = ath10k_wmi_main_op_fw_stats_fill,
  	.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
  	.gen_echo = ath10k_wmi_op_gen_echo,
@@ -524,7 +524,7 @@ v13:
  	/* .gen_bcn_tmpl not implemented */
  	/* .gen_prb_tmpl not implemented */
  	/* .gen_p2p_go_bcn_ie not implemented */
-@@ -9891,6 +9937,8 @@ static const struct wmi_ops wmi_10_1_ops
+@@ -9935,6 +9981,8 @@ static const struct wmi_ops wmi_10_1_ops
  	.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
  	.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
  	.gen_echo = ath10k_wmi_op_gen_echo,
@@ -533,7 +533,7 @@ v13:
  	/* .gen_bcn_tmpl not implemented */
  	/* .gen_prb_tmpl not implemented */
  	/* .gen_p2p_go_bcn_ie not implemented */
-@@ -9969,6 +10017,8 @@ static const struct wmi_ops wmi_10_2_ops
+@@ -10013,6 +10061,8 @@ static const struct wmi_ops wmi_10_2_ops
  	.gen_delba_send = ath10k_wmi_op_gen_delba_send,
  	.fw_stats_fill = ath10k_wmi_10x_op_fw_stats_fill,
  	.get_vdev_subtype = ath10k_wmi_op_get_vdev_subtype,
@@ -542,7 +542,7 @@ v13:
  	/* .gen_pdev_enable_adaptive_cca not implemented */
  };
  
-@@ -10039,6 +10089,8 @@ static const struct wmi_ops wmi_10_2_4_o
+@@ -10083,6 +10133,8 @@ static const struct wmi_ops wmi_10_2_4_o
  	.gen_pdev_enable_adaptive_cca =
  		ath10k_wmi_op_gen_pdev_enable_adaptive_cca,
  	.get_vdev_subtype = ath10k_wmi_10_2_4_op_get_vdev_subtype,
@@ -551,7 +551,7 @@ v13:
  	/* .gen_bcn_tmpl not implemented */
  	/* .gen_prb_tmpl not implemented */
  	/* .gen_p2p_go_bcn_ie not implemented */
-@@ -10119,6 +10171,8 @@ static const struct wmi_ops wmi_10_4_ops
+@@ -10163,6 +10215,8 @@ static const struct wmi_ops wmi_10_4_ops
  	.gen_pdev_bss_chan_info_req = ath10k_wmi_10_2_op_gen_pdev_bss_chan_info,
  	.gen_echo = ath10k_wmi_op_gen_echo,
  	.gen_pdev_get_tpc_config = ath10k_wmi_10_2_4_op_gen_pdev_get_tpc_config,
diff --git a/package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch b/package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch
index 562137fd30..a1dd5846f5 100644
--- a/package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch
+++ b/package/kernel/ath10k-ct/patches/202-ath10k-4.16-use-tpt-trigger-by-default.patch
@@ -16,7 +16,7 @@ Signed-off-by: Mathias Kresin <dev at kresin.me>
 
 --- a/ath10k-4.19/core.h
 +++ b/ath10k-4.19/core.h
-@@ -1488,6 +1488,10 @@ struct ath10k {
+@@ -1500,6 +1500,10 @@ struct ath10k {
  	u8 csi_data[4096];
  	u16 csi_data_len;
  
@@ -42,7 +42,7 @@ Signed-off-by: Mathias Kresin <dev at kresin.me>
  	if (ret)
 --- a/ath10k-4.19/mac.c
 +++ b/ath10k-4.19/mac.c
-@@ -9982,7 +9982,7 @@ int ath10k_mac_register(struct ath10k *a
+@@ -9998,7 +9998,7 @@ int ath10k_mac_register(struct ath10k *a
  	wiphy_ext_feature_set(ar->hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
  
  #ifdef CPTCFG_MAC80211_LEDS
diff --git a/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch b/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
deleted file mode 100644
index d770948f79..0000000000
--- a/package/kernel/ath10k-ct/patches/203-ath10k-Limit-available-channels-via-DT-ieee80211-fre.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From bbf0a8af2261bc7ae39b227ff6a1e9f45a008c27 Mon Sep 17 00:00:00 2001
-From: Sven Eckelmann <sven.eckelmann at openmesh.com>
-Date: Mon, 30 Jul 2018 17:31:41 +0200
-Subject: [PATCH] ath10k: Limit available channels via DT ieee80211-freq-limit
-
-Tri-band devices (1x 2.4GHz + 2x 5GHz) often incorporate special filters in
-the RX and TX path. These filtered channel can in theory still be used by
-the hardware but the signal strength is reduced so much that it makes no
-sense.
-
-There is already a DT property to limit the available channels but ath10k
-has to manually call this functionality to limit the currrently set wiphy
-channels further.
-
-Signed-off-by: Sven Eckelmann <sven.eckelmann at openmesh.com>
-
-Forwarded: https://patchwork.kernel.org/patch/10549245/
----
- drivers/net/wireless/ath/ath10k/mac.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/ath10k-4.19/mac.c
-+++ b/ath10k-4.19/mac.c
-@@ -18,6 +18,7 @@
- 
- #include "mac.h"
- 
-+#include <net/cfg80211.h>
- #include <net/mac80211.h>
- #include <linux/etherdevice.h>
- #include <linux/acpi.h>
-@@ -9706,6 +9707,7 @@ int ath10k_mac_register(struct ath10k *a
- 		ar->hw->wiphy->bands[NL80211_BAND_5GHZ] = band;
- 	}
- 
-+	wiphy_read_of_freq_limits(ar->hw->wiphy);
- 	ath10k_mac_setup_ht_vht_cap(ar);
- 
- 	ar->hw->wiphy->interface_modes =


From lede-commits at lists.infradead.org  Fri Jul  2 09:12:32 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 12:12:32 -0400
Subject: [openwrt/openwrt]  treewide: unmark selected packages nonshared
In-Reply-To: <162524235296.10075.1947099744197694776@git-01.infra.openwrt.org>
References: <162524235296.10075.1947099744197694776@git-01.infra.openwrt.org>
Message-ID: <mailman.5049.1625242358.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/8307da3dbdaff13d5ce99f8aefa32f5b7a2e18e6

commit 8307da3dbdaff13d5ce99f8aefa32f5b7a2e18e6
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Fri Jul 2 18:00:09 2021 +0200

    treewide: unmark selected packages nonshared
    
    This partially reverts changes done in commit 72cc44958ef4 ("treewide:
    mark selected packages nonshared") as it removes the nonshared flag, but
    keeps the PKG_RELEASE as the PKG_RELEASE bump while adding nonshared
    flag was incorrect.
    
    Unmark uci, ubus, libubox, lua, libnl-tiny and libjson-c as nonshared
    packages as this fix attempt didn't worked out. Currently the
    imagebuilder is broken again:
    
     openwrt-imagebuilder-21.02.0-rc3-ipq40xx-generic.Linux-x86_64$ make image PROFILE=avm_fritzbox-7530 PACKAGES=luci-ssl-openssl
     ...
     Collected errors:
      * pkg_hash_check_unresolved: cannot find dependency libiwinfo20210430 for luci-mod-status
      * pkg_hash_fetch_best_installation_candidate: Packages for luci-mod-status found, but incompatible with the architectures configured
      * pkg_hash_check_unresolved: cannot find dependency libiwinfo20210430 for rpcd-mod-iwinfo
      * pkg_hash_fetch_best_installation_candidate: Packages for rpcd-mod-iwinfo found, but incompatible with the architectures configured
      * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci-ssl-openssl:
      *     libiwinfo20210430
      * opkg_install_cmd: Cannot install package luci-ssl-openssl.
    
    Everything because iwinfo's ABI was changed two times since rc3 release:
    
     +IWINFO_ABI_VERSION:=20210430
     +IWINFO_ABI_VERSION:=20210420
    
    Since iwinfo is marked as nonshared, it wasn't built by phase2 builders, but
    luci-mod-status was already updated 2 times since rc3 and was thus rebuilt by
    phase2 builders:
    
     d1d452ed2fb3 luci-mod-status: don't set '-' hostname when creating static lease
     95b3633055c1 luci-mod-status: switch to html table for wlan channel analysis
    
    So now luci-mod-status depends on libiwinfo20210430 but only
    libiwinfo20210106 can be downloaded. This is first part of the fix, in
    the upcoming commit Jo is going to remove nonshared flag from iwinfo
    package as well.
    
    References: https://lists.infradead.org/pipermail/openwrt-devel/2021-July/035736.html
    References: https://lists.infradead.org/pipermail/openwrt-devel/2021-July/035741.html
    Acked-by: Jo-Philipp Wich <jo at mein.io>
    Reported-by: Nick Hainke <vincent at systemli.org>
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 package/libs/libjson-c/Makefile  | 1 -
 package/libs/libnl-tiny/Makefile | 2 --
 package/libs/libubox/Makefile    | 2 --
 package/system/ubus/Makefile     | 1 -
 package/system/uci/Makefile      | 2 --
 package/utils/lua/Makefile       | 1 -
 6 files changed, 9 deletions(-)

diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile
index d4a16f36cb..63cc214438 100644
--- a/package/libs/libjson-c/Makefile
+++ b/package/libs/libjson-c/Makefile
@@ -20,7 +20,6 @@ PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:json-c_project:json-c
 
-PKG_FLAGS := nonshared
 HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/libs/libnl-tiny/Makefile b/package/libs/libnl-tiny/Makefile
index ff3da5b518..bdb496c48e 100644
--- a/package/libs/libnl-tiny/Makefile
+++ b/package/libs/libnl-tiny/Makefile
@@ -17,8 +17,6 @@ PKG_SOURCE_VERSION:=c291088f631d1694f7ba0444b59677b194348da8
 PKG_MIRROR_HASH:=99bcce12701bb34dadb39689d95c2c5cf1e27719d0ecfd645d3957a8947025ac
 CMAKE_INSTALL:=1
 
-PKG_FLAGS := nonshared
-
 PKG_LICENSE:=LGPL-2.1
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
index cc5d7f7ae6..42a3f4ac3c 100644
--- a/package/libs/libubox/Makefile
+++ b/package/libs/libubox/Makefile
@@ -11,8 +11,6 @@ PKG_SOURCE_VERSION:=b14c4688612c05c78ce984d7bde633bce8703b1e
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
 CMAKE_INSTALL:=1
 
-PKG_FLAGS := nonshared
-
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=
 
diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile
index 678ebb1b9e..e39de3c5dc 100644
--- a/package/system/ubus/Makefile
+++ b/package/system/ubus/Makefile
@@ -15,7 +15,6 @@ PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
-PKG_FLAGS := nonshared
 PKG_ASLR_PIE_REGULAR:=1
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile
index 1355955d1a..0c18033e06 100644
--- a/package/system/uci/Makefile
+++ b/package/system/uci/Makefile
@@ -22,8 +22,6 @@ PKG_LICENSE_FILES:=
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
-PKG_FLAGS := nonshared
-
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile
index 83b83e4856..d262d1e1fc 100644
--- a/package/utils/lua/Makefile
+++ b/package/utils/lua/Makefile
@@ -16,7 +16,6 @@ PKG_SOURCE_URL:=http://www.lua.org/ftp/ \
 	http://www.tecgraf.puc-rio.br/lua/ftp/
 PKG_HASH:=2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333
 PKG_BUILD_PARALLEL:=1
-PKG_FLAGS := nonshared
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYRIGHT


From lede-commits at lists.infradead.org  Fri Jul  2 09:16:11 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 12:16:11 -0400
Subject: [openwrt/openwrt]  treewide: unmark selected packages nonshared
In-Reply-To: <162524257182.13761.11951859297795889371@git-01.infra.openwrt.org>
References: <162524257182.13761.11951859297795889371@git-01.infra.openwrt.org>
Message-ID: <mailman.5050.1625242576.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/d723002d84e25d18b7e225d5e6f2810875d052c7

commit d723002d84e25d18b7e225d5e6f2810875d052c7
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Fri Jul 2 18:00:09 2021 +0200

    treewide: unmark selected packages nonshared
    
    This partially reverts changes done in commit 72cc44958ef4 ("treewide:
    mark selected packages nonshared") as it removes the nonshared flag, but
    keeps the PKG_RELEASE as the PKG_RELEASE bump while adding nonshared
    flag was incorrect.
    
    Unmark uci, ubus, libubox, lua, libnl-tiny and libjson-c as nonshared
    packages as this fix attempt didn't worked out. Currently the
    imagebuilder is broken again:
    
     openwrt-imagebuilder-21.02.0-rc3-ipq40xx-generic.Linux-x86_64$ make image PROFILE=avm_fritzbox-7530 PACKAGES=luci-ssl-openssl
     ...
     Collected errors:
      * pkg_hash_check_unresolved: cannot find dependency libiwinfo20210430 for luci-mod-status
      * pkg_hash_fetch_best_installation_candidate: Packages for luci-mod-status found, but incompatible with the architectures configured
      * pkg_hash_check_unresolved: cannot find dependency libiwinfo20210430 for rpcd-mod-iwinfo
      * pkg_hash_fetch_best_installation_candidate: Packages for rpcd-mod-iwinfo found, but incompatible with the architectures configured
      * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci-ssl-openssl:
      *     libiwinfo20210430
      * opkg_install_cmd: Cannot install package luci-ssl-openssl.
    
    Everything because iwinfo's ABI was changed two times since rc3 release:
    
     +IWINFO_ABI_VERSION:=20210430
     +IWINFO_ABI_VERSION:=20210420
    
    Since iwinfo is marked as nonshared, it wasn't built by phase2 builders, but
    luci-mod-status was already updated 2 times since rc3 and was thus rebuilt by
    phase2 builders:
    
     d1d452ed2fb3 luci-mod-status: don't set '-' hostname when creating static lease
     95b3633055c1 luci-mod-status: switch to html table for wlan channel analysis
    
    So now luci-mod-status depends on libiwinfo20210430 but only
    libiwinfo20210106 can be downloaded. This is first part of the fix, in
    the upcoming commit Jo is going to remove nonshared flag from iwinfo
    package as well.
    
    References: https://lists.infradead.org/pipermail/openwrt-devel/2021-July/035736.html
    References: https://lists.infradead.org/pipermail/openwrt-devel/2021-July/035741.html
    Acked-by: Jo-Philipp Wich <jo at mein.io>
    Reported-by: Nick Hainke <vincent at systemli.org>
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
    (cherry picked from commit 8307da3dbdaff13d5ce99f8aefa32f5b7a2e18e6)
---
 package/libs/libjson-c/Makefile  | 1 -
 package/libs/libnl-tiny/Makefile | 2 --
 package/libs/libubox/Makefile    | 2 --
 package/system/ubus/Makefile     | 1 -
 package/system/uci/Makefile      | 2 --
 package/utils/lua/Makefile       | 1 -
 6 files changed, 9 deletions(-)

diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile
index 0ea3fe80b5..5f0ce3c689 100644
--- a/package/libs/libjson-c/Makefile
+++ b/package/libs/libjson-c/Makefile
@@ -20,7 +20,6 @@ PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:json-c_project:json-c
 
-PKG_FLAGS := nonshared
 PKG_BUILD_PARALLEL:=1
 HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
 
diff --git a/package/libs/libnl-tiny/Makefile b/package/libs/libnl-tiny/Makefile
index ff3da5b518..bdb496c48e 100644
--- a/package/libs/libnl-tiny/Makefile
+++ b/package/libs/libnl-tiny/Makefile
@@ -17,8 +17,6 @@ PKG_SOURCE_VERSION:=c291088f631d1694f7ba0444b59677b194348da8
 PKG_MIRROR_HASH:=99bcce12701bb34dadb39689d95c2c5cf1e27719d0ecfd645d3957a8947025ac
 CMAKE_INSTALL:=1
 
-PKG_FLAGS := nonshared
-
 PKG_LICENSE:=LGPL-2.1
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
index 8e4848103d..d2c07783e1 100644
--- a/package/libs/libubox/Makefile
+++ b/package/libs/libubox/Makefile
@@ -11,8 +11,6 @@ PKG_SOURCE_VERSION:=b14c4688612c05c78ce984d7bde633bce8703b1e
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
 CMAKE_INSTALL:=1
 
-PKG_FLAGS := nonshared
-
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=
 
diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile
index 28e6206b12..8a3fd1de7b 100644
--- a/package/system/ubus/Makefile
+++ b/package/system/ubus/Makefile
@@ -15,7 +15,6 @@ PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
-PKG_FLAGS := nonshared
 PKG_ASLR_PIE_REGULAR:=1
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile
index fa2aff1c38..75fc1bdfad 100644
--- a/package/system/uci/Makefile
+++ b/package/system/uci/Makefile
@@ -23,8 +23,6 @@ PKG_LICENSE_FILES:=
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_BUILD_PARALLEL:=0
-PKG_FLAGS := nonshared
-
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
 
diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile
index 83b83e4856..d262d1e1fc 100644
--- a/package/utils/lua/Makefile
+++ b/package/utils/lua/Makefile
@@ -16,7 +16,6 @@ PKG_SOURCE_URL:=http://www.lua.org/ftp/ \
 	http://www.tecgraf.puc-rio.br/lua/ftp/
 PKG_HASH:=2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333
 PKG_BUILD_PARALLEL:=1
-PKG_FLAGS := nonshared
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYRIGHT


From lede-commits at lists.infradead.org  Fri Jul  2 09:50:56 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 12:50:56 -0400
Subject: [openwrt/openwrt] iwinfo: build with nl80211 backend only and make
 shared
In-Reply-To: <162524465604.12864.13926167465069702111@git-01.infra.openwrt.org>
References: <162524465604.12864.13926167465069702111@git-01.infra.openwrt.org>
Message-ID: <mailman.5056.1625244660.1072.lede-commits@lists.infradead.org>

jow pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5a1065758b88b568a04a50189400321601904bdf

commit 5a1065758b88b568a04a50189400321601904bdf
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Fri Jul 2 18:04:17 2021 +0200

    iwinfo: build with nl80211 backend only and make shared
    
    Drop support for building the obsolete broadcom-wl backend and always
    forcibly enable the nl82011 support. This allows us to make the package
    shared again since no target specific compilation is happening anymore.
    
    This will solve various repository coherency issues related to unavailable
    libiwinfo versions in the long run.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 package/network/utils/iwinfo/Makefile | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile
index 9124e5fa07..3802d8d614 100644
--- a/package/network/utils/iwinfo/Makefile
+++ b/package/network/utils/iwinfo/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libiwinfo
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
@@ -17,14 +17,6 @@ PKG_MIRROR_HASH:=f33779035153da6bd0b2f100f402f62f1554ab87ed6fbbd938d41df6b9947a1
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=GPL-2.0
 
-PKG_FLAGS := nonshared
-
-PKG_CONFIG_DEPENDS := \
-	CONFIG_PACKAGE_kmod-brcm-wl \
-	CONFIG_PACKAGE_kmod-brcm-wl-mini \
-	CONFIG_PACKAGE_kmod-brcm-wl-mimo \
-	CONFIG_PACKAGE_kmod-cfg80211
-
 IWINFO_ABI_VERSION:=20210430
 
 include $(INCLUDE_DIR)/package.mk
@@ -34,13 +26,13 @@ define Package/libiwinfo
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Generalized Wireless Information Library (iwinfo)
-  DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny +libuci +libubus
+  DEPENDS:=+libnl-tiny +libuci +libubus
   ABI_VERSION:=$(IWINFO_ABI_VERSION)
 endef
 
 define Package/libiwinfo/description
-  Wireless information library with consistent interface for proprietary Broadcom,
-  nl80211 and wext driver interfaces.
+  Wireless information library with simplified API for nl80211
+  and wext driver interfaces.
 endef
 
 
@@ -73,12 +65,6 @@ endef
 define Build/Configure
 endef
 
-IWINFO_BACKENDS := \
-	$(if $(CONFIG_PACKAGE_kmod-brcm-wl),wl) \
-	$(if $(CONFIG_PACKAGE_kmod-brcm-wl-mini),wl) \
-	$(if $(CONFIG_PACKAGE_kmod-brcm-wl-mimo),wl) \
-	$(if $(CONFIG_PACKAGE_kmod-cfg80211),nl80211)
-
 TARGET_CFLAGS += \
 	-I$(STAGING_DIR)/usr/include/libnl-tiny \
 	-I$(STAGING_DIR)/usr/include \
@@ -88,7 +74,7 @@ MAKE_FLAGS += \
 	FPIC="$(FPIC)" \
 	CFLAGS="$(TARGET_CFLAGS)" \
 	LDFLAGS="$(TARGET_LDFLAGS)" \
-	BACKENDS="$(IWINFO_BACKENDS)" \
+	BACKENDS="nl80211" \
 	SOVERSION="$(IWINFO_ABI_VERSION)"
 
 define Build/InstallDev


From lede-commits at lists.infradead.org  Fri Jul  2 09:51:35 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 12:51:35 -0400
Subject: [openwrt/openwrt] iwinfo: build with nl80211 backend only and make
 shared
In-Reply-To: <162524469566.13419.1972953245204196072@git-01.infra.openwrt.org>
References: <162524469566.13419.1972953245204196072@git-01.infra.openwrt.org>
Message-ID: <mailman.5057.1625244699.1072.lede-commits@lists.infradead.org>

jow pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/b0424190efe0fa4de4be6c1b59107e0881a39950

commit b0424190efe0fa4de4be6c1b59107e0881a39950
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Fri Jul 2 18:04:17 2021 +0200

    iwinfo: build with nl80211 backend only and make shared
    
    Drop support for building the obsolete broadcom-wl backend and always
    forcibly enable the nl82011 support. This allows us to make the package
    shared again since no target specific compilation is happening anymore.
    
    This will solve various repository coherency issues related to unavailable
    libiwinfo versions in the long run.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
    (cherry picked from commit 5a1065758b88b568a04a50189400321601904bdf)
---
 package/network/utils/iwinfo/Makefile | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile
index d8c1befc97..b3ef261369 100644
--- a/package/network/utils/iwinfo/Makefile
+++ b/package/network/utils/iwinfo/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libiwinfo
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
@@ -17,14 +17,6 @@ PKG_MIRROR_HASH:=24ad04791254a0523cd15a4fec6116d9ff121e006c93e5e41459f91347b33ec
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=GPL-2.0
 
-PKG_FLAGS := nonshared
-
-PKG_CONFIG_DEPENDS := \
-	CONFIG_PACKAGE_kmod-brcm-wl \
-	CONFIG_PACKAGE_kmod-brcm-wl-mini \
-	CONFIG_PACKAGE_kmod-brcm-wl-mimo \
-	CONFIG_PACKAGE_kmod-cfg80211
-
 IWINFO_ABI_VERSION:=20210430
 
 include $(INCLUDE_DIR)/package.mk
@@ -34,13 +26,13 @@ define Package/libiwinfo
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Generalized Wireless Information Library (iwinfo)
-  DEPENDS:=+PACKAGE_kmod-cfg80211:libnl-tiny +libuci +libubus
+  DEPENDS:=+libnl-tiny +libuci +libubus
   ABI_VERSION:=$(IWINFO_ABI_VERSION)
 endef
 
 define Package/libiwinfo/description
-  Wireless information library with consistent interface for proprietary Broadcom,
-  nl80211 and wext driver interfaces.
+  Wireless information library with simplified API for nl80211
+  and wext driver interfaces.
 endef
 
 
@@ -73,12 +65,6 @@ endef
 define Build/Configure
 endef
 
-IWINFO_BACKENDS := \
-	$(if $(CONFIG_PACKAGE_kmod-brcm-wl),wl) \
-	$(if $(CONFIG_PACKAGE_kmod-brcm-wl-mini),wl) \
-	$(if $(CONFIG_PACKAGE_kmod-brcm-wl-mimo),wl) \
-	$(if $(CONFIG_PACKAGE_kmod-cfg80211),nl80211)
-
 TARGET_CFLAGS += \
 	-I$(STAGING_DIR)/usr/include/libnl-tiny \
 	-I$(STAGING_DIR)/usr/include \
@@ -88,7 +74,7 @@ MAKE_FLAGS += \
 	FPIC="$(FPIC)" \
 	CFLAGS="$(TARGET_CFLAGS)" \
 	LDFLAGS="$(TARGET_LDFLAGS)" \
-	BACKENDS="$(IWINFO_BACKENDS)" \
+	BACKENDS="nl80211" \
 	SOVERSION="$(IWINFO_ABI_VERSION)"
 
 define Build/InstallDev


From lede-commits at lists.infradead.org  Fri Jul  2 12:51:30 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 15:51:30 -0400
Subject: [openwrt/openwrt]  .gitignore: ignore any .vscode* file
In-Reply-To: <162525549047.20407.10120104006548233871@git-01.infra.openwrt.org>
References: <162525549047.20407.10120104006548233871@git-01.infra.openwrt.org>
Message-ID: <mailman.5089.1625255495.1072.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3c3a96df3ff51d99f608be435dfe3d25231ff845

commit 3c3a96df3ff51d99f608be435dfe3d25231ff845
Author: Nicholas Smith <nicholas at nbembedded.com>
AuthorDate: Thu Jul 1 15:07:56 2021 +1000

    .gitignore: ignore any .vscode* file
    
    .vscode-ctags are being tracked by git. Update .gitignore to
    include any .vscode* file
    
    Signed-off-by: Nicholas Smith <nicholas at nbembedded.com>
---
 .gitignore | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 9647daa5a4..11f280d0aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -29,4 +29,4 @@ git-src
 .project
 .cproject
 .ccache
-.vscode
+.vscode*


From lede-commits at lists.infradead.org  Fri Jul  2 13:15:44 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 02 Jul 2021 16:15:44 -0400
Subject: [openwrt/openwrt]  ltq-deu: Mark lantiq DEU broken
In-Reply-To: <162525694420.3881.14205016024592400260@git-01.infra.openwrt.org>
References: <162525694420.3881.14205016024592400260@git-01.infra.openwrt.org>
Message-ID: <mailman.5093.1625256949.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/72f0733123631e0c20cefcc89d6a81d41d918f20

commit 72f0733123631e0c20cefcc89d6a81d41d918f20
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Jun 27 00:52:50 2021 +0200

    ltq-deu: Mark lantiq DEU broken
    
    When the ltq_deu_vr9 kernel module is loaded, hostapd does not start any
    more. It fails with this error message:
    daemon.err hostapd: nl80211: kernel reports: key addition failed
    daemon.err hostapd: Interface initialization failed
    
    OpenWrt uses the standard Linux crypto API in the wifi drivers now
    and this probably makes the system offload more crypto operations to
    special hardware like the Lantiq DEU. There is probably a bug in the DEU
    and these operations fail and then hostapd does not start the interface.
    
    Do not include the Lantiq DEU by default any more.
    
    Fixes: FS#3901
    Fixes: 53b6783907f3 ("mac80211: remove patches stripping down crypto support")
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    Acked-by: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
    Tested-by: Notupus <notpp46 at gmail.com>
    (cherry-picked from commit 964863bb23999a1fae99b883053cc4f3c5c42b40)
---
 target/linux/lantiq/image/ar9.mk     | 15 ++++++---------
 target/linux/lantiq/image/danube.mk  |  1 -
 target/linux/lantiq/xrx200/target.mk |  1 -
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/target/linux/lantiq/image/ar9.mk b/target/linux/lantiq/image/ar9.mk
index a973c90beb..ea3836ea9d 100644
--- a/target/linux/lantiq/image/ar9.mk
+++ b/target/linux/lantiq/image/ar9.mk
@@ -7,7 +7,7 @@ define Device/avm_fritz7312
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
 	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-deu-ar9 -swconfig
+	-swconfig
 endef
 TARGET_DEVICES += avm_fritz7312
 
@@ -22,7 +22,7 @@ define Device/avm_fritz7320
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
 	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-deu-ar9 kmod-usb-dwc2 -swconfig
+	kmod-usb-dwc2 -swconfig
   SUPPORTED_DEVICES += FRITZ7320
 endef
 TARGET_DEVICES += avm_fritz7320
@@ -38,7 +38,6 @@ define Device/bt_homehub-v3a
   DEVICE_PACKAGES := kmod-usb-dwc2 \
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
-	kmod-ltq-deu-ar9 \
 	ltq-adsl-app ppp-mod-pppoa \
 	kmod-ath9k kmod-owl-loader wpad-basic-wolfssl \
 	uboot-envtools
@@ -107,8 +106,7 @@ define Device/netgear_dgn3500
 	kmod-ath9k kmod-owl-loader wpad-basic-wolfssl \
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-a kmod-ltq-atm-ar9 \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-deu-ar9
+	ltq-adsl-app ppp-mod-pppoa
   SUPPORTED_DEVICES += DGN3500
 endef
 TARGET_DEVICES += netgear_dgn3500
@@ -130,8 +128,7 @@ define Device/netgear_dgn3500b
 	kmod-ath9k kmod-owl-loader wpad-basic-wolfssl \
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
-	ltq-adsl-app ppp-mod-pppoa \
-	kmod-ltq-deu-ar9
+	ltq-adsl-app ppp-mod-pppoa
   SUPPORTED_DEVICES += DGN3500B
 endef
 TARGET_DEVICES += netgear_dgn3500b
@@ -145,7 +142,7 @@ define Device/zte_h201l
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
 	ltq-adsl-app ppp-mod-pppoe \
-	kmod-ltq-deu-ar9 kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
+	kmod-usb-dwc2 kmod-usb-ledtrig-usbport \
 	kmod-ltq-tapi kmod-ltq-vmmc
   SUPPORTED_DEVICES += H201L
 endef
@@ -161,7 +158,7 @@ define Device/zyxel_p-2601hn
 	kmod-ltq-adsl-ar9-mei kmod-ltq-adsl-ar9 \
 	kmod-ltq-adsl-ar9-fw-b kmod-ltq-atm-ar9 \
 	ltq-adsl-app ppp-mod-pppoe \
-	kmod-ltq-deu-ar9 kmod-usb-dwc2
+	kmod-usb-dwc2
   SUPPORTED_DEVICES += P2601HNFX
 endef
 TARGET_DEVICES += zyxel_p-2601hn
diff --git a/target/linux/lantiq/image/danube.mk b/target/linux/lantiq/image/danube.mk
index 73ec27222a..28fa4ed800 100644
--- a/target/linux/lantiq/image/danube.mk
+++ b/target/linux/lantiq/image/danube.mk
@@ -192,7 +192,6 @@ define Device/bt_homehub-v2b
   DEVICE_PACKAGES := kmod-usb-dwc2 \
 	kmod-ltq-adsl-danube-mei kmod-ltq-adsl-danube \
 	kmod-ltq-adsl-danube-fw-a kmod-ltq-atm-danube \
-	kmod-ltq-deu-danube \
 	ltq-adsl-app ppp-mod-pppoa \
 	kmod-ath9k kmod-owl-loader wpad-basic-wolfssl
   SUPPORTED_DEVICES += BTHOMEHUBV2B
diff --git a/target/linux/lantiq/xrx200/target.mk b/target/linux/lantiq/xrx200/target.mk
index f7dc8ac1c7..daf2c188cf 100644
--- a/target/linux/lantiq/xrx200/target.mk
+++ b/target/linux/lantiq/xrx200/target.mk
@@ -11,7 +11,6 @@ DEFAULT_PACKAGES+=kmod-leds-gpio \
 	kmod-ltq-vdsl-vr9 \
 	kmod-ltq-atm-vr9 \
 	kmod-ltq-ptm-vr9 \
-	kmod-ltq-deu-vr9 \
 	ltq-vdsl-app \
 	dsl-vrx200-firmware-xdsl-a \
 	dsl-vrx200-firmware-xdsl-b-patch \


From lede-commits at lists.infradead.org  Sun Jul  4 15:50:21 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 04 Jul 2021 18:50:21 -0400
Subject: [openwrt/openwrt]  ath79: add support for TP-Link TL-WR941HP v1
In-Reply-To: <162543902050.13181.6158682583631923159@git-01.infra.openwrt.org>
References: <162543902050.13181.6158682583631923159@git-01.infra.openwrt.org>
Message-ID: <mailman.5196.1625439027.1072.lede-commits@lists.infradead.org>

adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/cce2e8db564b6e40fb5c1831678d98232f09f305

commit cce2e8db564b6e40fb5c1831678d98232f09f305
Author: Diogenes Rengo <rengocbx250 at gmail.com>
AuthorDate: Fri Jun 25 11:44:40 2021 -0300

    ath79: add support for TP-Link TL-WR941HP v1
    
    Specifications:
        SOC:        Qualcomm Atheros TP9343 (750 MHz)
        Flash:      8 Mb (GigaDevice GD25Q64CSIG)
        RAM:        64 Mb (Zentel A3R12E40DBF-8E)
        Serial:     yes, 4-pin header
        Wlan:       Qualcomm Atheros TP9343, antenna: MIM0 3x3:3 RP-SMA
                    3 x 2.4GHz power amp module Skyworks (SiGe) SE2576L
        Ethernet:   Qualcomm Atheros TP9343
        Lan speed:  100M ports: 4
        Lan speed:  100M ports: 1
        Other info: same case, ram and flash that TP-Link TL-WR841HP,
                    different SOC
    
        https://forum.openwrt.org/t/adding-device-support-tp-link-wr941hp/
    
    Label MAC addresses based on vendor firmware:
        LAN   *:ee  label
        WAN   *:ef  label +1
        WLAN  *:ee  label
    
        The label MAC address found in "config" partition at 0x8
    
    Flash instruction:
        Upload the generated factory firmware on web interface.
    
    Signed-off-by: Diogenes Rengo <rengocbx250 at gmail.com>
    [remove various whitespace issues, squash commits, use short 0x0]
    Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts      | 154 +++++++++++++++++++++
 .../ath79/generic/base-files/etc/board.d/01_leds   |   4 +
 .../generic/base-files/etc/board.d/02_network      |   3 +-
 target/linux/ath79/image/generic-tp-link.mk        |  10 ++
 tools/firmware-utils/src/tplink-safeloader.c       |  31 +++++
 5 files changed, 201 insertions(+), 1 deletion(-)

diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts
new file mode 100644
index 0000000000..7451f00740
--- /dev/null
+++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts
@@ -0,0 +1,154 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca956x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "tplink,tl-wr941hp-v1", "qca,tp9343";
+	model = "TP-Link TL-WR941HP v1";
+
+	aliases {
+		label-mac-device = &wmac;
+		led-boot = &led_power;
+		led-failsafe = &led_power;
+		led-running = &led_power;
+		led-upgrade = &led_power;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		re {
+			label = "blue:re";
+			gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+		};
+
+		wifi {
+			label = "blue:wifi";
+			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		led_power: power {
+			label = "blue:power";
+			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+		};
+
+		wan_blue {
+			label = "blue:wan";
+			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+		};
+
+		wan_red {
+			label = "red:wan";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+		};
+
+		lan {
+			label = "blue:lan";
+			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+		};
+
+		wps {
+			label = "blue:wps";
+			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		re {
+			label = "range extender button";
+			linux,code = <BTN_0>;
+			gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+
+		wifi {
+			label = "wifi button";
+			linux,code = <KEY_RFKILL>;
+			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+
+		reset {
+			label = "reset button";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+
+		wps {
+			label = "wps button";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+};
+
+&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>;
+
+			uboot: partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x020000>;
+				read-only;
+			};
+
+			partition at 20000 {
+				compatible = "tplink,firmware";
+				label = "firmware";
+				reg = <0x020000 0x730000>;
+			};
+
+			config: partition at 750000 {
+				label = "config";
+				reg = <0x750000 0x0a0000>;
+				read-only;
+			};
+
+			art: partition at 7f0000 {
+				label = "art";
+				reg = <0x7f0000 0x010000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	phy-handle = <&swphy0>;
+
+	mtd-mac-address = <&config 0x8>;
+	mtd-mac-address-increment = <1>;
+};
+
+&eth1 {
+	status = "okay";
+
+	mtd-mac-address = <&config 0x8>;
+};
+
+&wmac {
+	status = "okay";
+
+	mtd-cal-data = <&art 0x1000>;
+	mtd-mac-address = <&config 0x8>;
+};
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 8044d0c1f2..ffda0253f3 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
@@ -374,6 +374,10 @@ tplink,tl-wr842n-v2)
 	ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x10"
 	ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02"
 	;;
+tplink,tl-wr941hp-v1)
+	ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1" "link tx rx"
+	ucidef_set_led_switch "lan" "LAN" "blue:lan" "switch0" "0x1e"
+	;;
 trendnet,tew-823dru)
 	ucidef_set_led_netdev "wan" "WAN" "green:planet" "eth0"
 	;;
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 b7e9d9584f..56cff8c031 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
@@ -398,7 +398,8 @@ ath79_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
 		;;
-	tplink,tl-wr842n-v2)
+	tplink,tl-wr842n-v2)\
+	tplink,tl-wr941hp-v1)
 		ucidef_set_interface_wan "eth1"
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index 8b228a73d2..daeac8341f 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -798,6 +798,16 @@ define Device/tplink_tl-wr902ac-v1
 endef
 TARGET_DEVICES += tplink_tl-wr902ac-v1
 
+define Device/tplink_tl-wr941hp-v1
+  $(Device/tplink-safeloader)
+  SOC := tp9343
+  DEVICE_MODEL := TL-WR941HP
+  DEVICE_VARIANT := v1
+  TPLINK_BOARD_ID := TL-WR941HP-V1
+  IMAGE_SIZE := 7360k
+endef
+TARGET_DEVICES += tplink_tl-wr941hp-v1
+
 define Device/tplink_wbs210-v1
   $(Device/tplink-safeloader-okli)
   SOC := ar9344
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
index fd154e7e0a..432044882c 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -1930,6 +1930,37 @@ static struct device_info boards[] = {
 		.last_sysupgrade_partition = "file-system",
 	},
 
+	/** Firmware layout for the TL-WR941HP v1 */
+	{
+		.id     = "TL-WR941HP-V1",
+		.vendor = "",
+		.support_list =
+			"SupportList:\n"
+			"{product_name:TL-WR941HP,product_ver:1.0.0,special_id:00000000}\n",
+		.part_trail = 0x00,
+		.soft_ver = NULL,
+
+		.partitions = {
+			{"fs-uboot", 0x00000, 0x20000},
+			{"firmware", 0x20000, 0x730000},
+			{"default-mac", 0x750000, 0x00200},
+			{"pin", 0x750200, 0x00200},
+			{"product-info", 0x750400, 0x0fc00},
+			{"soft-version", 0x760000, 0x0b000},
+			{"support-list", 0x76b000, 0x04000},
+			{"profile", 0x770000, 0x04000},
+			{"default-config", 0x774000, 0x0b000},
+			{"user-config", 0x780000, 0x40000},
+			{"partition-table", 0x7c0000, 0x10000},
+			{"log", 0x7d0000, 0x20000},
+			{"radio", 0x7f0000, 0x10000},
+			{NULL, 0, 0}
+		},
+
+		.first_sysupgrade_partition = "os-image",
+		.last_sysupgrade_partition = "file-system",
+	},
+
 	/** Firmware layout for the TL-WR942N V1 */
 	{
 		.id     = "TLWR942NV1",


From lede-commits at lists.infradead.org  Sun Jul  4 15:50:20 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 04 Jul 2021 18:50:20 -0400
Subject: [openwrt/openwrt] ath79: add support for Ubiquiti PowerBeam M (XW)
In-Reply-To: <162543902050.13181.6158682583631923159@git-01.infra.openwrt.org>
References: <162543902050.13181.6158682583631923159@git-01.infra.openwrt.org>
Message-ID: <mailman.5197.1625439027.1072.lede-commits@lists.infradead.org>

adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/12eb5b2384a63427c0062856331fda60a1ebb309

commit 12eb5b2384a63427c0062856331fda60a1ebb309
Author: Russell Senior <russell at personaltelco.net>
AuthorDate: Fri Jun 4 17:27:48 2021 -0700

    ath79: add support for Ubiquiti PowerBeam M (XW)
    
    This patch adds support for the Ubiquiti PowerBeam M (XW), e.g. PBE-M5-400,
    a 802.11n wireless with a feed+dish form factor. This device was previously
    supported by the ar71xx loco-m-xw firmware.
    
    Specifications:
     - Atheros AR9342 SoC
     - 64 MB RAM
     - 8 MB SPI flash
     - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in
     - Power and LAN green LEDs
     - 4x RSSI LEDs (red, orange, green, green)
     - UART (115200 8N1)
    
    Flashing via stock GUI:
     - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first (see
       https://openwrt.org/toh/ubiquiti/powerbeam installation instructions)
     - Upload the factory image via AirOS web GUI.
    
    Flashing via TFTP:
     - Use a pointy tool (e.g., unbent paperclip) to keep the
       reset button pressed.
     - Power on the device (keep reset button pressed).
     - Keep pressing until LEDs flash alternatively LED1+LED3 =>
       LED2+LED4 => LED1+LED3, etc.
     - Release reset button.
     - The device starts a TFTP server at 192.168.1.20.
     - Set a static IP on the computer (e.g., 192.168.1.21/24).
     - Upload via tftp the factory image:
        $ tftp 192.168.1.20
        tftp> bin
        tftp> trace
        tftp> put openwrt-ath79-generic-xxxxx-ubnt_powerbeam-m-xw-squashfs-factory.bin
    
    WARNING: so far, no non-destructive method has been discovered for
    opening the enclosure to reach the serial console. Internal photos
    are available here: https://fcc.io/SWX-NBM5HP
    
    Signed-off-by: Russell Senior <russell at personaltelco.net>
---
 .../linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts | 34 ++++++++++++++++++++++
 .../ath79/generic/base-files/etc/board.d/01_leds   |  1 +
 .../generic/base-files/etc/board.d/02_network      |  1 +
 target/linux/ath79/image/generic-ubnt.mk           |  8 +++++
 4 files changed, 44 insertions(+)

diff --git a/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
new file mode 100644
index 0000000000..6db058f887
--- /dev/null
+++ b/target/linux/ath79/dts/ar9342_ubnt_powerbeam-m-xw.dts
@@ -0,0 +1,34 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "ar9342_ubnt_xw.dtsi"
+
+/ {
+	compatible = "ubnt,powerbeam-m-xw", "ubnt,xw", "qca,ar9342";
+	model = "Ubiquiti PowerBeam M (XW)";
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy-mask = <4>;
+
+	phy4: ethernet-phy at 4 {
+		reg = <4>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	/* default for ar934x, except for 1000M and 10M */
+	pll-data = <0x02000000 0x00000101 0x00001313>;
+
+	phy-mode = "rgmii-id";
+	phy-handle = <&phy4>;
+
+	gmac-config {
+		device = <&gmac>;
+		rxd-delay = <3>;
+		rxdv-delay = <3>;
+	};
+};
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 c844c70e46..8044d0c1f2 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
@@ -397,6 +397,7 @@ ubnt,nanostation-loco-m-xw|\
 ubnt,nanostation-m|\
 ubnt,nanostation-m-xw|\
 ubnt,picostation-m|\
+ubnt,powerbeam-m-xw|\
 ubnt,powerbridge-m|\
 ubnt,rocket-m)
 	ucidef_set_rssimon "wlan0" "200000" "1"
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 2fa51ab905..b7e9d9584f 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
@@ -85,6 +85,7 @@ ath79_setup_interfaces()
 	ubnt,picostation-m|\
 	ubnt,powerbeam-5ac-500|\
 	ubnt,powerbeam-5ac-gen2|\
+	ubnt,powerbeam-m-xw|\
 	ubnt,powerbridge-m|\
 	ubnt,rocket-5ac-lite|\
 	ubnt,rocket-m|\
diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk
index f8e1d1e432..e8ea06a07a 100644
--- a/target/linux/ath79/image/generic-ubnt.mk
+++ b/target/linux/ath79/image/generic-ubnt.mk
@@ -328,6 +328,14 @@ define Device/ubnt_powerbeam-5ac-gen2
 endef
 TARGET_DEVICES += ubnt_powerbeam-5ac-gen2
 
+define Device/ubnt_powerbeam-m-xw
+  $(Device/ubnt-xw)
+  DEVICE_MODEL := PowerBeam M
+  DEVICE_PACKAGES += rssileds
+  SUPPORTED_DEVICES += loco-m-xw
+endef
+TARGET_DEVICES += ubnt_powerbeam-m-xw
+
 define Device/ubnt_powerbridge-m
   $(Device/ubnt-xm)
   SOC := ar7241


From lede-commits at lists.infradead.org  Sun Jul  4 15:50:22 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 04 Jul 2021 18:50:22 -0400
Subject: [openwrt/openwrt] ath79: add support for Xiaomi AIoT Router AC2350
In-Reply-To: <162543902050.13181.6158682583631923159@git-01.infra.openwrt.org>
References: <162543902050.13181.6158682583631923159@git-01.infra.openwrt.org>
Message-ID: <mailman.5198.1625439029.1072.lede-commits@lists.infradead.org>

adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/6c148116f778bfd2db88476cee4753b32538eafe

commit 6c148116f778bfd2db88476cee4753b32538eafe
Author: Evgeniy Isaev <isaev.evgeniy at gmail.com>
AuthorDate: Tue May 11 13:45:51 2021 +0500

    ath79: add support for Xiaomi AIoT Router AC2350
    
    Device specifications
    * SoC: QCA9563 @ 775MHz (MIPS 74Kc)
    * RAM: 128MiB DDR2
    * Flash: 16MiB SPI-NOR (EN25QH128)
    * Wireless 2.4GHz (SoC): b/g/n, 3x3
    * Wireless 5Ghz (QCA9988): a/n/ac, 4x4 MU-MIMO
    * IoT Wireless 2.4GHz (QCA6006): currently unusable
    * Ethernet (AR8327): 3 LAN ? 1GbE, 1 WAN ? 1GbE
    * LEDs: Internet (blue/orange), System (blue/orange)
    * Buttons: Reset
    * UART: through-hole on PCB ([VCC 3.3v](RX)(GND)(TX) 115200, 8n1)
    * Power: 12VDC, 1,5A
    
    MAC addresses map (like in OEM firmware)
      art at 0x0     88:C3:97:*:57  wan/label
      art at 0x1002  88:C3:97:*:2D  lan/wlan2g
      art at 0x5006  88:C3:97:*:2C  wlan5g
    
    Obtain SSH Access
    1. Download and flash the firmware version 1.3.8 (China).
    2. Login to the router web interface and get the value of `stok=` from the
       URL
    3. Open a new tab and go to the following URL (replace <STOK> with the stok
       value gained above; line breaks are only for easier handling, please put
       together all four lines into a single URL without any spaces):
         http://192.168.31.1/cgi-bin/luci/;stok=<STOK>/api/misystem/set_config_iotdev
           ?bssid=any&user_id=any&ssid=-h%0Anvram%20set%20ssh_en%3D1%0Anvram%20commit
           %0Ased%20-i%20%27s%2Fchannel%3D.%2A%2Fchannel%3D%5C%5C%22debug%5C%5C%22%2F
           g%27%20%2Fetc%2Finit.d%2Fdropbear%0A%2Fetc%2Finit.d%2Fdropbear%20start%0A
    4. Wait 30-60 seconds (this is the time required to generate keys for the
       SSH server on the router).
    
    Create Full Backup
    1. Obtain SSH Access.
    2. Create backup of all flash (on router):
        dd if=/dev/mtd0 of=/tmp/ALL.backup
    3. Copy backup to PC (on PC):
        scp root at 192.168.31.1:/tmp/ALL.backup ./
    Tip: backup of the original firmware, taken three times, increases the
    chances of recovery :)
    
    Calculate The Password
    * Locally using shell (replace "12345/E0QM98765" with your router's serial
      number):
      On Linux
        printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \
        md5sum - | head -c8 && echo
      On macOS
        printf "%s6d2df50a-250f-4a30-a5e6-d44fb0960aa0" "12345/E0QM98765" | \
        md5 | head -c8
    * Locally using python script (replace "12345/E0QM98765" with your
      router's serial number):
        wget https://raw.githubusercontent.com/eisaev/ax3600-files/master/scripts/calc_passwd.py
        python3.7 -c 'from calc_passwd import calc_passwd; print(calc_passwd("12345/E0QM98765"))'
    * Online
        https://www.oxygen7.cn/miwifi/
    
    Debricking (lite)
    If you have a healthy bootloader, you can use recovery via TFTP using
    programs like TinyPXE on Windows or dnsmasq on Linux. To switch the router
    to TFTP recovery mode, hold down the reset button, connect the power
    supply, and release the button after about 10 seconds. The router must be
    connected directly to the PC via the LAN port.
    
    Debricking
    You will need a full dump of your flash, a CH341 programmer, and a clip
    for in-circuit programming.
    
    Install OpenWRT
    1. Obtain SSH Access.
    2. Create script (on router):
        echo '#!/bin/sh' > /tmp/flash_fw.sh
        echo >> /tmp/flash_fw.sh
        echo '. /bin/boardupgrade.sh' >> /tmp/flash_fw.sh
        echo >> /tmp/flash_fw.sh
        echo 'board_prepare_upgrade' >> /tmp/flash_fw.sh
        echo 'mtd erase rootfs_data' >> /tmp/flash_fw.sh
        echo 'mtd write /tmp/openwrt.bin firmware' >> /tmp/flash_fw.sh
        echo 'sleep 3' >> /tmp/flash_fw.sh
        echo 'reboot' >> /tmp/flash_fw.sh
        echo >> /tmp/flash_fw.sh
        chmod +x /tmp/flash_fw.sh
    3. Copy `openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin`
       to the router (on PC):
        scp openwrt-ath79-generic-xiaomi_aiot-ac2350-squashfs-sysupgrade.bin \
        root at 192.168.31.1:/tmp/openwrt.bin
    4. Flash OpenWRT (on router):
        /bin/ash /tmp/flash_fw.sh &
    5. SSH connection will be interrupted - this is normal.
    6. Wait for the indicator to turn blue.
    
    Signed-off-by: Evgeniy Isaev <isaev.evgeniy at gmail.com>
    [improve commit message formatting slightly]
    Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts | 177 +++++++++++++++++++++
 .../ath79/generic/base-files/etc/board.d/01_leds   |   3 +
 .../generic/base-files/etc/board.d/02_network      |   6 +-
 .../etc/hotplug.d/firmware/11-ath10k-caldata       |   5 +
 target/linux/ath79/image/generic.mk                |   9 ++
 5 files changed, 199 insertions(+), 1 deletion(-)

diff --git a/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
new file mode 100644
index 0000000000..d8fc589d58
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
@@ -0,0 +1,177 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca956x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Xiaomi AIoT AC2350";
+	compatible = "xiaomi,aiot-ac2350", "qca,qca9563";
+
+	aliases {
+		label-mac-device = &eth0;
+
+		led-boot = &led_system_orange;
+		led-failsafe = &led_system_orange;
+		led-running = &led_system_blue;
+		led-upgrade = &led_system_orange;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_system_blue: system_blue {
+			label = "blue:system";
+			gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+		};
+
+		led_system_orange: system_orange {
+			label = "orange:system";
+			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+		};
+
+		wan_blue {
+			label = "blue:wan";
+			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+		};
+
+		wan_orange {
+			label = "orange:wan";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+
+		wps {
+			gpio-export,name = "wps";
+			gpio-export,output = <0>;
+			gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+		};
+
+		usb-reset {
+			gpio-export,name = "usb-reset";
+			gpio-export,output = <0>;
+			gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&spi {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "Bootloader";
+				reg = <0x0 0x30000>;
+				read-only;
+			};
+
+			partition at 30000 {
+				label = "Nvram";
+				reg = <0x30000 0x10000>;
+			};
+
+			partition at 40000 {
+				label = "Bdata";
+				reg = <0x40000 0x10000>;
+				read-only;
+			};
+
+			partition at 50000 {
+				label = "crash";
+				reg = <0x50000 0x10000>;
+				read-only;
+			};
+
+			art: partition at 60000 {
+				label = "art";
+				reg = <0x60000 0x10000>;
+				read-only;
+			};
+
+			partition at 70000 {
+				label = "cfg_bak";
+				reg = <0x70000 0x20000>;
+				read-only;
+			};
+
+			partition at 90000 {
+				label = "overlay";
+				reg = <0x90000 0x170000>;
+				read-only;
+			};
+
+			partition at 200000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x200000 0xe00000>;
+			};
+		};
+	};
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy-mask = <0x1>;
+
+	phy0: ethernet-phy at 0 {
+		reg = <0>;
+		phy-mode = "sgmii";
+
+		qca,ar8327-initvals = <
+			0x04 0x00000080 /* PORT0 PAD MODE CTRL */
+			0x08 0x01000000 /* PORT5 PAD MODE CTRL */
+			0x0c 0x00000000 /* PORT6 PAD MODE CTRL */
+			0x10 0x602613a0 /* POWER_ON_STRAP */
+			0x50 0xcf35cf35 /* LED_CTRL0 */
+			0x54 0xca35ca35 /* LED_CTRL1 */
+			0x58 0xc935c935 /* LED_CTRL2 */
+			0x5c 0x03ffff00 /* LED_CTRL3 */
+			0x7c 0x000000fe /* PORT0_STATUS */
+			0x94 0x000010c2 /* PORT6_STATUS */
+			0xe0 0xc74164de /* SGMII_CTRL */
+		>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	phy-mode = "sgmii";
+	phy-handle = <&phy0>;
+
+	mtd-mac-address = <&art 0x0>;
+};
+
+&wmac {
+	status = "okay";
+
+	mtd-cal-data = <&art 0x1000>;
+};
+
+&pcie {
+	status = "okay";
+};
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 ffda0253f3..890b38e58a 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
@@ -426,6 +426,9 @@ wd,mynet-wifi-rangeextender)
 	ucidef_set_led_rssi "rssimedium" "RSSIMED" "blue:rssi-med" "wlan0" "33" "100"
 	ucidef_set_led_rssi "rssihigh" "RSSIMAX" "blue:rssi-max" "wlan0" "66" "100"
 	;;
+xiaomi,aiot-ac2350)
+	ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x02"
+	;;
 yuncore,a770)
 	ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
 	ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x10"
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 56cff8c031..8f547ba5ce 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
@@ -320,7 +320,8 @@ ath79_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "2:lan" "3:wan"
 		;;
-	nec,wg800hp)
+	nec,wg800hp|\
+	xiaomi,aiot-ac2350)
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "2:lan" "3:lan" "4:lan" "1:wan"
 		;;
@@ -679,6 +680,9 @@ ath79_setup_macs()
 	wd,mynet-wifi-rangeextender)
 		lan_mac=$(nvram get et0macaddr)
 		;;
+	xiaomi,aiot-ac2350)
+		lan_mac=$(mtd_get_mac_binary art 0x1002)
+		;;
 	zyxel,nbg6616)
 		label_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
 		;;
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 8d070cba27..8d7407450d 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -248,6 +248,11 @@ case "$FIRMWARE" in
 		caldata_extract "art" 0x5000 0x2f20
 		ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 1)
 		;;
+	xiaomi,aiot-ac2350)
+		caldata_extract "art" 0x5000 0x2f20
+		ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
+			/lib/firmware/ath10k/QCA9984/hw1.0/board.bin
+		;;
 	yuncore,a782|\
 	yuncore,xd4200)
 		caldata_extract "art" 0x5000 0x2f20
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index ab875bd220..0db9987d70 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -2305,6 +2305,15 @@ define Device/winchannel_wb2000
 endef
 TARGET_DEVICES += winchannel_wb2000
 
+define Device/xiaomi_aiot-ac2350
+  SOC := qca9563
+  DEVICE_VENDOR := Xiaomi
+  DEVICE_MODEL := AIoT AC2350
+  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9984-ct
+  IMAGE_SIZE := 14336k
+endef
+TARGET_DEVICES += xiaomi_aiot-ac2350
+
 define Device/xiaomi_mi-router-4q
   SOC := qca9561
   DEVICE_VENDOR := Xiaomi


From lede-commits at lists.infradead.org  Sun Jul  4 23:53:55 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 05 Jul 2021 02:53:55 -0400
Subject: [openwrt/openwrt]  ath79: base-files: fix broken network config
In-Reply-To: <162546803521.5323.17780491239760773507@git-01.infra.openwrt.org>
References: <162546803521.5323.17780491239760773507@git-01.infra.openwrt.org>
Message-ID: <mailman.5310.1625468039.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/bb2a9af6f1f3a03617002d0b9ba361f97d68dc02

commit bb2a9af6f1f3a03617002d0b9ba361f97d68dc02
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Mon Jul 5 08:45:18 2021 +0200

    ath79: base-files: fix broken network config
    
    Fix bash syntax error introduced in commit cce2e8db564b ("ath79: add
    support for TP-Link TL-WR941HP v1") which resulted in broken default
    network configuration.
    
     In target/linux/ath79/generic/base-files/etc/board.d/02_network line 402:
            tplink,tl-wr842n-v2)\
            ^-- SC1073: Couldn't parse this case item. Fix to allow more checks.
    
    References: https://gitlab.com/ynezz/openwrt-device-runtime-testing/-/jobs/1398837698/artifacts/file/cram-result-archer-c7-v5-initramfs.txt
    Fixes: cce2e8db564b ("ath79: add support for TP-Link TL-WR941HP v1")
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 target/linux/ath79/generic/base-files/etc/board.d/02_network | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 8f547ba5ce..025d55fec0 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
@@ -399,7 +399,7 @@ ath79_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "2:lan:3" "3:lan:2" "4:lan:1" "5:lan:4"
 		;;
-	tplink,tl-wr842n-v2)\
+	tplink,tl-wr842n-v2|\
 	tplink,tl-wr941hp-v1)
 		ucidef_set_interface_wan "eth1"
 		ucidef_add_switch "switch0" \


From lede-commits at lists.infradead.org  Mon Jul  5 08:27:32 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 05 Jul 2021 11:27:32 -0400
Subject: [openwrt/openwrt]  ramips: add support for minew g1-c
In-Reply-To: <162549885242.32753.9378164026879214301@git-01.infra.openwrt.org>
References: <162549885242.32753.9378164026879214301@git-01.infra.openwrt.org>
Message-ID: <mailman.5428.1625498856.1072.lede-commits@lists.infradead.org>

lynxis pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/8d497b65704f62294a4bbc0e1f5aa4eb1dbf9e24

commit 8d497b65704f62294a4bbc0e1f5aa4eb1dbf9e24
Author: Alexander Couzens <lynxis at fe80.eu>
AuthorDate: Tue Jun 1 21:09:26 2021 +0000

    ramips: add support for minew g1-c
    
    The minew g1-c is a smart home gateway / BLE gateway.
    A Nordic nRF52832 is available via USB UART (cp210x) to support BLE.
    The LED ring is a ring of 24x ws2812b connect to a generic GPIO (unsupported).
    There is a small LED which is only visible when the device is open which
    will be used as LED until the ws2812b is supported.
    The board has also a micro sdcard/tfcard slot (untested).
    The Nordic nRF52832 exposes SWD over a 5pin header (GND, VCC, SWD, SWC, RST).
    The vendor uses an older OpenWrt version, sysupgrade can be used via
    serial or ssh.
    
    CPU:            MT7628AN / 580MHz
    RAM:            DDR2 128 MiB RAM
    Flash:          SPI NOR 16 MiB W25Q128
    Ethernet:       1x 100 mbit (Port 0) (PoE in)
    USB:            USB hub, 2x external, 1x internal to USB UART
    Power:          via micro usb or PoE 802.11af
    UART:           3.3V, 115200 8n1
    
    Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 target/linux/ramips/dts/mt7628an_minew_g1-c.dts    | 146 +++++++++++++++++++++
 target/linux/ramips/image/mt76x8.mk                |   8 ++
 .../mt76x8/base-files/etc/board.d/02_network       |   5 +
 3 files changed, 159 insertions(+)

diff --git a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts
new file mode 100644
index 0000000000..74ea47aee0
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts
@@ -0,0 +1,146 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	model = "Minew G1-C";
+	compatible = "minew,g1-c", "mediatek,mt7628an-soc";
+
+	aliases {
+		led-boot = &led_system;
+		led-failsafe = &led_system;
+		led-running = &led_system;
+		led-upgrade = &led_system;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,57600";
+	};
+
+	memory at 0 {
+		device_type = "memory";
+		reg = <0x0 0x8000000>;
+	};
+
+	keys {
+		compatible = "gpio-keys-polled";
+		poll-interval = <20>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_system: system {
+			label = "red:system";
+			gpios = <&gpio 43 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
+		};
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+		#size-cells = <0>;
+
+		ws2812 {
+			gpio-export,name = "ws2812";
+			gpio-export,output = <1>;
+			gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+		};
+
+		nrf_power {
+			gpio-export,name = "nrf_power";
+			gpio-export,output = <1>;
+			gpios = <&gpio 45 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&state_default {
+	gpio {
+		groups = "gpio";
+		function = "gpio";
+	};
+
+	p0led_an {
+		groups = "p0led_an";
+		function = "gpio";
+	};
+
+	uart1 {
+		groups = "uart1";
+		function = "gpio";
+	};
+
+	wdt {
+		groups = "wdt";
+		function = "gpio";
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
+
+	m25p80 at 0 {
+		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 = <0x0 0x30000>;
+				read-only;
+			};
+
+			partition at 30000 {
+				label = "u-boot-env";
+				reg = <0x30000 0x10000>;
+			};
+
+			factory: partition at 40000 {
+				label = "factory";
+				reg = <0x40000 0x10000>;
+				read-only;
+			};
+
+			partition at 50000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x50000 0xfb0000>;
+			};
+		};
+	};
+};
+
+&ethernet {
+	mtd-mac-address = <&factory 0x28>;
+};
+
+&esw {
+	mediatek,portmap = <0x3e>;
+};
+
+&wmac {
+	status = "okay";
+};
+
+&sdhci {
+	status = "okay";
+	mediatek,cd-high;
+};
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index 3ba4d658be..3f738fc488 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -269,6 +269,14 @@ define Device/mercury_mac1200r-v2
 endef
 TARGET_DEVICES += mercury_mac1200r-v2
 
+define Device/minew_g1-c
+  IMAGE_SIZE := 15744k
+  DEVICE_VENDOR := Minew
+  DEVICE_MODEL := G1-C
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-usb-serial-cp210x
+endef
+TARGET_DEVICES += minew_g1-c
+
 define Device/netgear_r6020
   $(Device/netgear_sercomm_nor)
   IMAGE_SIZE := 7104k
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
index 703936f217..032d7e75b2 100644
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
@@ -32,6 +32,11 @@ ramips_setup_interfaces()
 		ucidef_add_switch_attr "switch0" "enable" "false"
 		ucidef_set_interface_lan "eth0"
 		;;
+	minew,g1-c)
+		ucidef_add_switch "switch0"
+		ucidef_add_switch_attr "switch0" "enable" "false"
+		ucidef_set_interface_lan "eth0" "dhcp"
+		;;
 	asus,rt-n10p-v3|\
 	asus,rt-n11p-b1|\
 	asus,rt-n12-vp-b1|\


From lede-commits at lists.infradead.org  Mon Jul  5 08:49:35 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 05 Jul 2021 11:49:35 -0400
Subject: [openwrt/openwrt] dnsmasq: use local option for local domain parameter
In-Reply-To: <162550017518.19613.13009161587785785614@git-01.infra.openwrt.org>
References: <162550017518.19613.13009161587785785614@git-01.infra.openwrt.org>
Message-ID: <mailman.5433.1625500179.1072.lede-commits@lists.infradead.org>

ldir pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e4cfefa9fc3d22da5705b554785ba9c533c373d0

commit e4cfefa9fc3d22da5705b554785ba9c533c373d0
Author: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
AuthorDate: Thu Jul 1 19:50:22 2021 +0100

    dnsmasq: use local option for local domain parameter
    
    '--local' is a synonym for '--server' so let's use '--local' in the
    resultant config file for uci's 'local' instead of uci's local
    parameter being turned into '--server'.  Slightly less confusion all
    round.
    
    Signed-off-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
---
 package/network/services/dnsmasq/files/dnsmasq.init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index c4c262ad69..f86b4b04f3 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -915,7 +915,7 @@ dnsmasq_start()
 	append_parm "$cfg" "minport" "--min-port"
 	append_parm "$cfg" "maxport" "--max-port"
 	append_parm "$cfg" "domain" "--domain"
-	append_parm "$cfg" "local" "--server"
+	append_parm "$cfg" "local" "--local"
 	config_list_foreach "$cfg" "listen_address" append_listenaddress
 	config_list_foreach "$cfg" "server" append_server
 	config_list_foreach "$cfg" "rev_server" append_rev_server


From lede-commits at lists.infradead.org  Mon Jul  5 17:05:26 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 05 Jul 2021 20:05:26 -0400
Subject: [openwrt/openwrt] hostapd: make wnm_sleep_mode_no_keys configurable
In-Reply-To: <162552992504.26177.3277127024329043221@git-01.infra.openwrt.org>
References: <162552992504.26177.3277127024329043221@git-01.infra.openwrt.org>
Message-ID: <mailman.5460.1625529931.1072.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/3eb34bc2516b0f3e51f5710ab537d13c427ecbb0

commit 3eb34bc2516b0f3e51f5710ab537d13c427ecbb0
Author: Timo Sigurdsson <public_timo.s at silentcreek.de>
AuthorDate: Tue Jun 15 23:09:41 2021 +0200

    hostapd: make wnm_sleep_mode_no_keys configurable
    
    In the aftermath of the KRACK attacks, hostapd gained an AP-side workaround
    against WNM-Sleep Mode GTK/IGTK reinstallation attacks. WNM Sleep Mode is not
    enabled by default on OpenWrt, but it is configurable through the option
    wnm_sleep_mode. Thus, make the AP-side workaround configurable as well by
    exposing the option wnm_sleep_mode_no_keys. If you use the option
    wpa_disable_eapol_key_retries and have wnm_sleep_mode enabled, you might
    consider using this workaround.
    
    Signed-off-by: Timo Sigurdsson <public_timo.s at silentcreek.de>
    [bump PKG_RELEASE]
    Signed-off-by: Paul Spooren <mail at aparcar.org>
    (cherry picked from commit bf98faaac8ed24cf7d3d93dd4fcd7304d109363b)
---
 package/network/services/hostapd/Makefile         |  2 +-
 package/network/services/hostapd/files/hostapd.sh | 10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 628bbbec4d..67ea89c339 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=34
+PKG_RELEASE:=35
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index ee338a9388..aa72e09eba 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -284,7 +284,7 @@ hostapd_common_add_bss_config() {
 	config_add_string wps_device_type wps_device_name wps_manufacturer wps_pin
 	config_add_string multi_ap_backhaul_ssid multi_ap_backhaul_key
 
-	config_add_boolean wnm_sleep_mode bss_transition
+	config_add_boolean wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition
 	config_add_int time_advertisement
 	config_add_string time_zone
 
@@ -706,13 +706,17 @@ hostapd_set_bss_options() {
 		append bss_conf "iapp_interface=$ifname" "$N"
 	}
 
-	json_get_vars time_advertisement time_zone wnm_sleep_mode bss_transition
+	json_get_vars time_advertisement time_zone wnm_sleep_mode wnm_sleep_mode_no_keys bss_transition
 	set_default bss_transition 0
 	set_default wnm_sleep_mode 0
+	set_default wnm_sleep_mode_no_keys 0
 
 	[ -n "$time_advertisement" ] && append bss_conf "time_advertisement=$time_advertisement" "$N"
 	[ -n "$time_zone" ] && append bss_conf "time_zone=$time_zone" "$N"
-	[ "$wnm_sleep_mode" -eq "1" ] && append bss_conf "wnm_sleep_mode=1" "$N"
+	if [ "$wnm_sleep_mode" -eq "1" ]; then
+		append bss_conf "wnm_sleep_mode=1" "$N"
+		[ "$wnm_sleep_mode_no_keys" -eq "1" ] && append bss_conf "wnm_sleep_mode_no_keys=1" "$N"
+	fi
 	[ "$bss_transition" -eq "1" ] && append bss_conf "bss_transition=1" "$N"
 
 	json_get_vars ieee80211k rrm_neighbor_report rrm_beacon_report


From lede-commits at lists.infradead.org  Mon Jul  5 17:05:25 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 05 Jul 2021 20:05:25 -0400
Subject: [openwrt/openwrt]  hostapd: make country3 option configurable
In-Reply-To: <162552992504.26177.3277127024329043221@git-01.infra.openwrt.org>
References: <162552992504.26177.3277127024329043221@git-01.infra.openwrt.org>
Message-ID: <mailman.5461.1625529931.1072.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/89d21b7f6299b8c3746c1af8671b0dba19f63598

commit 89d21b7f6299b8c3746c1af8671b0dba19f63598
Author: Timo Sigurdsson <public_timo.s at silentcreek.de>
AuthorDate: Tue Jun 15 23:08:56 2021 +0200

    hostapd: make country3 option configurable
    
    The country3 option in hostapd.conf allows the third octet of the country
    string to be set. It can be used e.g. to indicate indoor or outdoor use (see
    hostapd.conf for further details). Make this option configurable but optional
    in OpenWrt.
    
    Signed-off-by: Timo Sigurdsson <public_timo.s at silentcreek.de>
    [bump PKG_RELEASE, rebase]
    Signed-off-by: Paul Spooren <mail at aparcar.org>
    (cherry picked from commit 9f09c1936a4a13b67fcba632f7ca02331f685359)
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/network/services/hostapd/Makefile         | 2 +-
 package/network/services/hostapd/files/hostapd.sh | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 0779421b8d..628bbbec4d 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=33
+PKG_RELEASE:=34
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index 87fcaf03b3..ee338a9388 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -92,7 +92,7 @@ hostapd_common_add_device_config() {
 	config_add_array basic_rate
 	config_add_array supported_rates
 
-	config_add_string country
+	config_add_string country country3
 	config_add_boolean country_ie doth
 	config_add_boolean spectrum_mgmt_required
 	config_add_int local_pwr_constraint
@@ -114,7 +114,7 @@ hostapd_prepare_device_config() {
 
 	local base_cfg=
 
-	json_get_vars country country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
+	json_get_vars country country3 country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \
 		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density
 
 	hostapd_set_log_options base_cfg
@@ -128,6 +128,7 @@ hostapd_prepare_device_config() {
 
 	[ -n "$country" ] && {
 		append base_cfg "country_code=$country" "$N"
+		[ -n "$country3" ] && append base_cfg "country3=$country3" "$N"
 
 		[ "$country_ie" -gt 0 ] && {
 			append base_cfg "ieee80211d=1" "$N"


From lede-commits at lists.infradead.org  Mon Jul  5 17:16:39 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 05 Jul 2021 20:16:39 -0400
Subject: [openwrt/openwrt] scripts: check if dl directory exist in
 dl_cleanup script
In-Reply-To: <162553059899.2808.6108606286027470900@git-01.infra.openwrt.org>
References: <162553059899.2808.6108606286027470900@git-01.infra.openwrt.org>
Message-ID: <mailman.5462.1625530603.1072.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/64ce35bfafb14a0d0e86990037be5c437babead0

commit 64ce35bfafb14a0d0e86990037be5c437babead0
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Tue Jul 6 00:59:40 2021 +0200

    scripts: check if dl directory exist in dl_cleanup script
    
    Check if the provided dl directory exist and return on error.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 scripts/dl_cleanup.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/dl_cleanup.py b/scripts/dl_cleanup.py
index d086761dc7..1acb049582 100755
--- a/scripts/dl_cleanup.py
+++ b/scripts/dl_cleanup.py
@@ -169,6 +169,11 @@ def main(argv):
 		usage()
 		return 1
 	directory = args[0]
+
+	if not os.path.exists(directory):
+		print("Can't find dl path", directory)
+		return 1
+
 	for (o, v) in opts:
 		if o in ("-h", "--help"):
 			usage()


From lede-commits at lists.infradead.org  Mon Jul  5 17:26:56 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 05 Jul 2021 20:26:56 -0400
Subject: [openwrt/openwrt]  hostapd: add HE flag to get_clients
In-Reply-To: <162553121440.9520.14633673909855920142@git-01.infra.openwrt.org>
References: <162553121440.9520.14633673909855920142@git-01.infra.openwrt.org>
Message-ID: <mailman.5463.1625531219.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/b0483b19f981bbe024cd447cfe469765f49cc587

commit b0483b19f981bbe024cd447cfe469765f49cc587
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed Jun 30 00:12:00 2021 +0200

    hostapd: add HE flag to get_clients
    
    Expose the hostapd HE flag via ubus to indicate HE capable devices.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 package/network/services/hostapd/src/src/ap/ubus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index fb568f9e7b..6201dfd524 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -297,6 +297,7 @@ hostapd_bss_get_clients(struct ubus_context *ctx, struct ubus_object *obj,
 		{ "wmm", WLAN_STA_WMM },
 		{ "ht", WLAN_STA_HT },
 		{ "vht", WLAN_STA_VHT },
+		{ "he", WLAN_STA_HE },
 		{ "wps", WLAN_STA_WPS },
 		{ "mfp", WLAN_STA_MFP },
 	};


From lede-commits at lists.infradead.org  Mon Jul  5 17:26:55 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 05 Jul 2021 20:26:55 -0400
Subject: [openwrt/openwrt]  hostapd: remove unused mac_buff allocation
In-Reply-To: <162553121440.9520.14633673909855920142@git-01.infra.openwrt.org>
References: <162553121440.9520.14633673909855920142@git-01.infra.openwrt.org>
Message-ID: <mailman.5464.1625531219.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/cde154c8712255d13658317b116d4fc341ed89f2

commit cde154c8712255d13658317b116d4fc341ed89f2
Author: Martin Weinelt <hexa at darmstadt.ccc.de>
AuthorDate: Sat Jun 26 00:01:08 2021 +0200

    hostapd: remove unused mac_buff allocation
    
    Signed-off-by: Martin Weinelt <hexa at darmstadt.ccc.de>
---
 package/network/services/hostapd/src/src/ap/ubus.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 289c8ff7a4..fb568f9e7b 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -408,7 +408,6 @@ hostapd_bss_get_status(struct ubus_context *ctx, struct ubus_object *obj,
 	struct os_reltime now;
 	char ssid[SSID_MAX_LEN + 1];
 	char phy_name[17];
-	char mac_buf[20];
 	size_t ssid_len = SSID_MAX_LEN;
 
 	if (hapd->conf->ssid.ssid_len < SSID_MAX_LEN)


From lede-commits at lists.infradead.org  Mon Jul  5 17:26:54 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 05 Jul 2021 20:26:54 -0400
Subject: [openwrt/openwrt]  hostapd: report bssid, ssid and channel over ubus
In-Reply-To: <162553121440.9520.14633673909855920142@git-01.infra.openwrt.org>
References: <162553121440.9520.14633673909855920142@git-01.infra.openwrt.org>
Message-ID: <mailman.5465.1625531220.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/398df6275674b637bc950e4f946f84c2bc5e09ff

commit 398df6275674b637bc950e4f946f84c2bc5e09ff
Author: Martin Weinelt <hexa at darmstadt.ccc.de>
AuthorDate: Sat Jun 26 00:01:07 2021 +0200

    hostapd: report bssid, ssid and channel over ubus
    
    Imports a function from iw to convert frequencies to channel numbers.
    
    Co-authored-by: David Bauer <mail at david-bauer.net>
    Signed-off-by: Martin Weinelt <hexa at darmstadt.ccc.de>
    [fix potential out of bounds read]
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 package/network/services/hostapd/src/src/ap/ubus.c | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 7cc2059fc1..289c8ff7a4 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -372,6 +372,32 @@ hostapd_bss_get_features(struct ubus_context *ctx, struct ubus_object *obj,
 	return 0;
 }
 
+/* Imported from iw/util.c
+ *  https://git.kernel.org/pub/scm/linux/kernel/git/jberg/iw.git/tree/util.c?id=4b25ae3537af48dbf9d0abf94132e5ba01b32c18#n200
+ */
+int ieee80211_frequency_to_channel(int freq)
+{
+	/* see 802.11-2007 17.3.8.3.2 and Annex J */
+	if (freq == 2484)
+		return 14;
+	/* see 802.11ax D6.1 27.3.23.2 and Annex E */
+	else if (freq == 5935)
+		return 2;
+	else if (freq < 2484)
+		return (freq - 2407) / 5;
+	else if (freq >= 4910 && freq <= 4980)
+		return (freq - 4000) / 5;
+	else if (freq < 5950)
+		return (freq - 5000) / 5;
+	else if (freq <= 45000) /* DMG band lower limit */
+		/* see 802.11ax D6.1 27.3.23.2 */
+		return (freq - 5950) / 5;
+	else if (freq >= 58320 && freq <= 70200)
+		return (freq - 56160) / 2160;
+	else
+		return 0;
+}
+
 static int
 hostapd_bss_get_status(struct ubus_context *ctx, struct ubus_object *obj,
 		       struct ubus_request_data *req, const char *method,
@@ -380,12 +406,24 @@ hostapd_bss_get_status(struct ubus_context *ctx, struct ubus_object *obj,
 	struct hostapd_data *hapd = container_of(obj, struct hostapd_data, ubus.obj);
 	void *airtime_table, *dfs_table;
 	struct os_reltime now;
+	char ssid[SSID_MAX_LEN + 1];
 	char phy_name[17];
 	char mac_buf[20];
+	size_t ssid_len = SSID_MAX_LEN;
+
+	if (hapd->conf->ssid.ssid_len < SSID_MAX_LEN)
+		ssid_len = hapd->conf->ssid.ssid_len;
 
 	blob_buf_init(&b, 0);
 	blobmsg_add_string(&b, "status", hostapd_state_text(hapd->iface->state));
+	blobmsg_printf(&b, "bssid", MACSTR, MAC2STR(hapd->conf->bssid));
+
+	memset(ssid, 0, SSID_MAX_LEN + 1);
+	memcpy(ssid, hapd->conf->ssid.ssid, ssid_len);
+	blobmsg_add_string(&b, "ssid", ssid);
+
 	blobmsg_add_u32(&b, "freq", hapd->iface->freq);
+	blobmsg_add_u32(&b, "channel", ieee80211_frequency_to_channel(hapd->iface->freq));
 
 	snprintf(phy_name, 17, "%s", hapd->iface->phy);
 	blobmsg_add_string(&b, "phy", phy_name);


From lede-commits at lists.infradead.org  Wed Jul  7 08:13:01 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 07 Jul 2021 11:13:01 -0400
Subject: [openwrt/openwrt]  ath79: increase WS-AP3610 SPI frequency
In-Reply-To: <162567078146.25195.10751966385714839263@git-01.infra.openwrt.org>
References: <162567078146.25195.10751966385714839263@git-01.infra.openwrt.org>
Message-ID: <mailman.6070.1625670789.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/8a3f19023bc379d1ec1fdb0d768b24589f028e2e

commit 8a3f19023bc379d1ec1fdb0d768b24589f028e2e
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Tue Jul 6 02:59:03 2021 +0200

    ath79: increase WS-AP3610 SPI frequency
    
    The M25P80 used on the Siemens WS-AP3610 supports clock speeds up to 54
    MHz. Thus, we can safely increase the maximum SPI frequency the flash
    chip is controlled at to 50 MHz, increasing transfer speed.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts b/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts
index 9eaf5aaa1d..2cdcce0d15 100644
--- a/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts
+++ b/target/linux/ath79/dts/ar7161_siemens_ws-ap3610.dts
@@ -110,7 +110,7 @@
 	flash at 0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <25000000>;
+		spi-max-frequency = <50000000>;
 
 		partitions {
 			compatible = "fixed-partitions";


From lede-commits at lists.infradead.org  Wed Jul  7 08:13:02 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 07 Jul 2021 11:13:02 -0400
Subject: [openwrt/openwrt]  ath79: increase SPI frequency for OCEDO boards
In-Reply-To: <162567078146.25195.10751966385714839263@git-01.infra.openwrt.org>
References: <162567078146.25195.10751966385714839263@git-01.infra.openwrt.org>
Message-ID: <mailman.6071.1625670790.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5b58545f4470989b0e2243df5007e5fb29a85d21

commit 5b58545f4470989b0e2243df5007e5fb29a85d21
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Tue Jul 6 03:07:58 2021 +0200

    ath79: increase SPI frequency for OCEDO boards
    
    The MX25L12805D used on all ath79 OCEDO boards supports clock
    speeds up to 50 MHz.
    
    Thus, we can increase the maximum SPI frequency the flash chip is
    controlled at to 50 MHz, increasing transfer speed.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/ath79/dts/ar9344_ocedo_raccoon.dts | 2 +-
 target/linux/ath79/dts/qca9558_ocedo_koala.dts  | 2 +-
 target/linux/ath79/dts/qca9558_ocedo_ursus.dts  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
index e7ef02054e..cf02b711fa 100644
--- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
+++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
@@ -72,7 +72,7 @@
 	flash at 0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <25000000>;
+		spi-max-frequency = <50000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts
index aa3876acb1..fd54a6e8c2 100644
--- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts
+++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts
@@ -69,7 +69,7 @@
 	flash at 0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <25000000>;
+		spi-max-frequency = <50000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ath79/dts/qca9558_ocedo_ursus.dts b/target/linux/ath79/dts/qca9558_ocedo_ursus.dts
index dc8329f976..05c2d2d1dc 100644
--- a/target/linux/ath79/dts/qca9558_ocedo_ursus.dts
+++ b/target/linux/ath79/dts/qca9558_ocedo_ursus.dts
@@ -40,7 +40,7 @@
 	flash at 0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <25000000>;
+		spi-max-frequency = <50000000>;
 
 		partitions {
 			compatible = "fixed-partitions";


From lede-commits at lists.infradead.org  Wed Jul  7 09:33:24 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 07 Jul 2021 12:33:24 -0400
Subject: [openwrt/openwrt] ramips: minew g1-c: add the old device name to
 the supported devices
In-Reply-To: <162567560404.27841.3563844719837608714@git-01.infra.openwrt.org>
References: <162567560404.27841.3563844719837608714@git-01.infra.openwrt.org>
Message-ID: <mailman.6079.1625675608.1072.lede-commits@lists.infradead.org>

lynxis pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/0fac6f5562acca15f62f6484317ba4aca2de34be

commit 0fac6f5562acca15f62f6484317ba4aca2de34be
Author: Alexander Couzens <lynxis at fe80.eu>
AuthorDate: Wed Jul 7 17:57:45 2021 +0200

    ramips: minew g1-c: add the old device name to the supported devices
    
    Allow to use the sysupgrade image as factory image without
    additional force.
    
    Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 target/linux/ramips/image/mt76x8.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index 3f738fc488..3f6f842db7 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -274,6 +274,7 @@ define Device/minew_g1-c
   DEVICE_VENDOR := Minew
   DEVICE_MODEL := G1-C
   DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport kmod-usb-serial-cp210x
+  SUPPORTED_DEVICES += minew-g1c
 endef
 TARGET_DEVICES += minew_g1-c
 


From lede-commits at lists.infradead.org  Wed Jul  7 23:39:33 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 08 Jul 2021 02:39:33 -0400
Subject: [openwrt/openwrt] mediatek: prevent duplicate hardware flow offload
 entries
In-Reply-To: <162572637242.23004.865798401088661703@git-01.infra.openwrt.org>
References: <162572637242.23004.865798401088661703@git-01.infra.openwrt.org>
Message-ID: <mailman.6138.1625726377.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f4e3ff5b075bbab279bd06a7d3e0d9c950ee098c

commit f4e3ff5b075bbab279bd06a7d3e0d9c950ee098c
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Jul 8 07:32:39 2021 +0200

    mediatek: prevent duplicate hardware flow offload entries
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...t-mtk_eth_soc-avoid-creating-duplicate-of.patch | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/target/linux/generic/pending-5.10/700-net-ethernet-mtk_eth_soc-avoid-creating-duplicate-of.patch b/target/linux/generic/pending-5.10/700-net-ethernet-mtk_eth_soc-avoid-creating-duplicate-of.patch
new file mode 100644
index 0000000000..ff090f07f1
--- /dev/null
+++ b/target/linux/generic/pending-5.10/700-net-ethernet-mtk_eth_soc-avoid-creating-duplicate-of.patch
@@ -0,0 +1,26 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Thu, 8 Jul 2021 07:08:29 +0200
+Subject: [PATCH] net: ethernet: mtk_eth_soc: avoid creating duplicate offload
+ entries
+
+Sometimes multiple CLS_REPLACE calls are issued for the same connection.
+rhashtable_insert_fast does not check for these duplicates, so multiple
+hardware flow entries can be created.
+Fix this by checking for an existing entry early
+
+Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
++++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+@@ -187,6 +187,9 @@ mtk_flow_offload_replace(struct mtk_eth
+ 	int hash;
+ 	int i;
+ 
++	if (rhashtable_lookup(&eth->flow_table, &f->cookie, mtk_flow_ht_params))
++		return -EEXIST;
++
+ 	if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_META)) {
+ 		struct flow_match_meta match;
+ 


From lede-commits at lists.infradead.org  Wed Jul  7 23:39:32 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 08 Jul 2021 02:39:32 -0400
Subject: [openwrt/openwrt] kernel: backport a few upstream flow offloading
 fixes
In-Reply-To: <162572637242.23004.865798401088661703@git-01.infra.openwrt.org>
References: <162572637242.23004.865798401088661703@git-01.infra.openwrt.org>
Message-ID: <mailman.6139.1625726379.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/64ed3d80567280e5cccb4c4642464223862dabc6

commit 64ed3d80567280e5cccb4c4642464223862dabc6
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 7 17:36:21 2021 +0200

    kernel: backport a few upstream flow offloading fixes
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...52-net-ethernet-mtk_eth_soc-missing-mutex.patch |  63 ++++++++
 ...hernet-mtk_eth_soc-handle-VLAN-pop-action.patch |  22 +++
 ...lowtable-dst_check-from-garbage-collector.patch | 159 +++++++++++++++++++++
 ...onntrack-Introduce-tcp-offload-timeout-co.patch |  94 ++++++++++++
 ...onntrack-Introduce-udp-offload-timeout-co.patch |  92 ++++++++++++
 ...lowtable-Set-offload-timeouts-according-t.patch | 134 +++++++++++++++++
 .../650-netfilter-add-xt_FLOWOFFLOAD-target.patch  |   8 +-
 .../613-netfilter_optional_tcp_window_check.patch  |   4 +-
 8 files changed, 570 insertions(+), 6 deletions(-)

diff --git a/target/linux/generic/backport-5.10/610-v5.13-52-net-ethernet-mtk_eth_soc-missing-mutex.patch b/target/linux/generic/backport-5.10/610-v5.13-52-net-ethernet-mtk_eth_soc-missing-mutex.patch
new file mode 100644
index 0000000000..a846ce43e2
--- /dev/null
+++ b/target/linux/generic/backport-5.10/610-v5.13-52-net-ethernet-mtk_eth_soc-missing-mutex.patch
@@ -0,0 +1,63 @@
+From: Pablo Neira Ayuso <pablo at netfilter.org>
+Date: Sun, 18 Apr 2021 23:11:44 +0200
+Subject: [PATCH] net: ethernet: mtk_eth_soc: missing mutex
+
+Patch 2ed37183abb7 ("netfilter: flowtable: separate replace, destroy and
+stats to different workqueues") splits the workqueue per event type. Add
+a mutex to serialize updates.
+
+Fixes: 502e84e2382d ("net: ethernet: mtk_eth_soc: add flow offloading support")
+Reported-by: Frank Wunderlich <frank-w at public-files.de>
+Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
++++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+@@ -392,6 +392,8 @@ mtk_flow_offload_stats(struct mtk_eth *e
+ 	return 0;
+ }
+ 
++static DEFINE_MUTEX(mtk_flow_offload_mutex);
++
+ static int
+ mtk_eth_setup_tc_block_cb(enum tc_setup_type type, void *type_data, void *cb_priv)
+ {
+@@ -399,6 +401,7 @@ mtk_eth_setup_tc_block_cb(enum tc_setup_
+ 	struct net_device *dev = cb_priv;
+ 	struct mtk_mac *mac = netdev_priv(dev);
+ 	struct mtk_eth *eth = mac->hw;
++	int err;
+ 
+ 	if (!tc_can_offload(dev))
+ 		return -EOPNOTSUPP;
+@@ -406,18 +409,24 @@ mtk_eth_setup_tc_block_cb(enum tc_setup_
+ 	if (type != TC_SETUP_CLSFLOWER)
+ 		return -EOPNOTSUPP;
+ 
++	mutex_lock(&mtk_flow_offload_mutex);
+ 	switch (cls->command) {
+ 	case FLOW_CLS_REPLACE:
+-		return mtk_flow_offload_replace(eth, cls);
++		err = mtk_flow_offload_replace(eth, cls);
++		break;
+ 	case FLOW_CLS_DESTROY:
+-		return mtk_flow_offload_destroy(eth, cls);
++		err = mtk_flow_offload_destroy(eth, cls);
++		break;
+ 	case FLOW_CLS_STATS:
+-		return mtk_flow_offload_stats(eth, cls);
++		err = mtk_flow_offload_stats(eth, cls);
++		break;
+ 	default:
+-		return -EOPNOTSUPP;
++		err = -EOPNOTSUPP;
++		break;
+ 	}
++	mutex_unlock(&mtk_flow_offload_mutex);
+ 
+-	return 0;
++	return err;
+ }
+ 
+ static int
diff --git a/target/linux/generic/backport-5.10/610-v5.13-53-net-ethernet-mtk_eth_soc-handle-VLAN-pop-action.patch b/target/linux/generic/backport-5.10/610-v5.13-53-net-ethernet-mtk_eth_soc-handle-VLAN-pop-action.patch
new file mode 100644
index 0000000000..806fd0dcdf
--- /dev/null
+++ b/target/linux/generic/backport-5.10/610-v5.13-53-net-ethernet-mtk_eth_soc-handle-VLAN-pop-action.patch
@@ -0,0 +1,22 @@
+From: Pablo Neira Ayuso <pablo at netfilter.org>
+Date: Sun, 18 Apr 2021 23:11:45 +0200
+Subject: [PATCH] net: ethernet: mtk_eth_soc: handle VLAN pop action
+
+Do not hit EOPNOTSUPP when flowtable offload provides a VLAN pop action.
+
+Fixes: efce49dfe6a8 ("netfilter: flowtable: add vlan pop action offload support")
+Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
++++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+@@ -233,6 +233,8 @@ mtk_flow_offload_replace(struct mtk_eth
+ 			data.vlan.proto = act->vlan.proto;
+ 			data.vlan.num++;
+ 			break;
++		case FLOW_ACTION_VLAN_POP:
++			break;
+ 		case FLOW_ACTION_PPPOE_PUSH:
+ 			if (data.pppoe.num == 1)
+ 				return -EOPNOTSUPP;
diff --git a/target/linux/generic/backport-5.10/610-v5.13-54-netfilter-flowtable-dst_check-from-garbage-collector.patch b/target/linux/generic/backport-5.10/610-v5.13-54-netfilter-flowtable-dst_check-from-garbage-collector.patch
new file mode 100644
index 0000000000..42b55f021a
--- /dev/null
+++ b/target/linux/generic/backport-5.10/610-v5.13-54-netfilter-flowtable-dst_check-from-garbage-collector.patch
@@ -0,0 +1,159 @@
+From: Pablo Neira Ayuso <pablo at netfilter.org>
+Date: Sun, 28 Mar 2021 23:08:55 +0200
+Subject: [PATCH] netfilter: flowtable: dst_check() from garbage collector path
+
+Move dst_check() to the garbage collector path. Stale routes trigger the
+flow entry teardown state which makes affected flows go back to the
+classic forwarding path to re-evaluate flow offloading.
+
+IPv6 requires the dst cookie to work, store it in the flow_tuple,
+otherwise dst_check() always fails.
+
+Fixes: e5075c0badaa ("netfilter: flowtable: call dst_check() to fall back to classic forwarding")
+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
+@@ -129,7 +129,10 @@ struct flow_offload_tuple {
+ 					in_vlan_ingress:2;
+ 	u16				mtu;
+ 	union {
+-		struct dst_entry	*dst_cache;
++		struct {
++			struct dst_entry *dst_cache;
++			u32		dst_cookie;
++		};
+ 		struct {
+ 			u32		ifidx;
+ 			u32		hw_ifidx;
+--- a/net/netfilter/nf_flow_table_core.c
++++ b/net/netfilter/nf_flow_table_core.c
+@@ -74,6 +74,18 @@ err_ct_refcnt:
+ }
+ EXPORT_SYMBOL_GPL(flow_offload_alloc);
+ 
++static u32 flow_offload_dst_cookie(struct flow_offload_tuple *flow_tuple)
++{
++	const struct rt6_info *rt;
++
++	if (flow_tuple->l3proto == NFPROTO_IPV6) {
++		rt = (const struct rt6_info *)flow_tuple->dst_cache;
++		return rt6_get_cookie(rt);
++	}
++
++	return 0;
++}
++
+ static int flow_offload_fill_route(struct flow_offload *flow,
+ 				   const struct nf_flow_route *route,
+ 				   enum flow_offload_tuple_dir dir)
+@@ -116,6 +128,7 @@ static int flow_offload_fill_route(struc
+ 			return -1;
+ 
+ 		flow_tuple->dst_cache = dst;
++		flow_tuple->dst_cookie = flow_offload_dst_cookie(flow_tuple);
+ 		break;
+ 	}
+ 	flow_tuple->xmit_type = route->tuple[dir].xmit_type;
+@@ -389,11 +402,33 @@ nf_flow_table_iterate(struct nf_flowtabl
+ 	return err;
+ }
+ 
++static bool flow_offload_stale_dst(struct flow_offload_tuple *tuple)
++{
++	struct dst_entry *dst;
++
++	if (tuple->xmit_type == FLOW_OFFLOAD_XMIT_NEIGH ||
++	    tuple->xmit_type == FLOW_OFFLOAD_XMIT_XFRM) {
++		dst = tuple->dst_cache;
++		if (!dst_check(dst, tuple->dst_cookie))
++			return true;
++	}
++
++	return false;
++}
++
++static bool nf_flow_has_stale_dst(struct flow_offload *flow)
++{
++	return flow_offload_stale_dst(&flow->tuplehash[FLOW_OFFLOAD_DIR_ORIGINAL].tuple) ||
++	       flow_offload_stale_dst(&flow->tuplehash[FLOW_OFFLOAD_DIR_REPLY].tuple);
++}
++
+ static void nf_flow_offload_gc_step(struct flow_offload *flow, void *data)
+ {
+ 	struct nf_flowtable *flow_table = data;
+ 
+-	if (nf_flow_has_expired(flow) || nf_ct_is_dying(flow->ct))
++	if (nf_flow_has_expired(flow) ||
++	    nf_ct_is_dying(flow->ct) ||
++	    nf_flow_has_stale_dst(flow))
+ 		set_bit(NF_FLOW_TEARDOWN, &flow->flags);
+ 
+ 	if (test_bit(NF_FLOW_TEARDOWN, &flow->flags)) {
+--- a/net/netfilter/nf_flow_table_ip.c
++++ b/net/netfilter/nf_flow_table_ip.c
+@@ -364,15 +364,6 @@ nf_flow_offload_ip_hook(void *priv, stru
+ 	if (nf_flow_state_check(flow, iph->protocol, skb, thoff))
+ 		return NF_ACCEPT;
+ 
+-	if (tuplehash->tuple.xmit_type == FLOW_OFFLOAD_XMIT_NEIGH ||
+-	    tuplehash->tuple.xmit_type == FLOW_OFFLOAD_XMIT_XFRM) {
+-		rt = (struct rtable *)tuplehash->tuple.dst_cache;
+-		if (!dst_check(&rt->dst, 0)) {
+-			flow_offload_teardown(flow);
+-			return NF_ACCEPT;
+-		}
+-	}
+-
+ 	if (skb_try_make_writable(skb, thoff + hdrsize))
+ 		return NF_DROP;
+ 
+@@ -391,6 +382,7 @@ nf_flow_offload_ip_hook(void *priv, stru
+ 		nf_ct_acct_update(flow->ct, tuplehash->tuple.dir, skb->len);
+ 
+ 	if (unlikely(tuplehash->tuple.xmit_type == FLOW_OFFLOAD_XMIT_XFRM)) {
++		rt = (struct rtable *)tuplehash->tuple.dst_cache;
+ 		memset(skb->cb, 0, sizeof(struct inet_skb_parm));
+ 		IPCB(skb)->iif = skb->dev->ifindex;
+ 		IPCB(skb)->flags = IPSKB_FORWARDED;
+@@ -399,6 +391,7 @@ nf_flow_offload_ip_hook(void *priv, stru
+ 
+ 	switch (tuplehash->tuple.xmit_type) {
+ 	case FLOW_OFFLOAD_XMIT_NEIGH:
++		rt = (struct rtable *)tuplehash->tuple.dst_cache;
+ 		outdev = rt->dst.dev;
+ 		skb->dev = outdev;
+ 		nexthop = rt_nexthop(rt, flow->tuplehash[!dir].tuple.src_v4.s_addr);
+@@ -607,15 +600,6 @@ nf_flow_offload_ipv6_hook(void *priv, st
+ 	if (nf_flow_state_check(flow, ip6h->nexthdr, skb, thoff))
+ 		return NF_ACCEPT;
+ 
+-	if (tuplehash->tuple.xmit_type == FLOW_OFFLOAD_XMIT_NEIGH ||
+-	    tuplehash->tuple.xmit_type == FLOW_OFFLOAD_XMIT_XFRM) {
+-		rt = (struct rt6_info *)tuplehash->tuple.dst_cache;
+-		if (!dst_check(&rt->dst, 0)) {
+-			flow_offload_teardown(flow);
+-			return NF_ACCEPT;
+-		}
+-	}
+-
+ 	if (skb_try_make_writable(skb, thoff + hdrsize))
+ 		return NF_DROP;
+ 
+@@ -633,6 +617,7 @@ nf_flow_offload_ipv6_hook(void *priv, st
+ 		nf_ct_acct_update(flow->ct, tuplehash->tuple.dir, skb->len);
+ 
+ 	if (unlikely(tuplehash->tuple.xmit_type == FLOW_OFFLOAD_XMIT_XFRM)) {
++		rt = (struct rt6_info *)tuplehash->tuple.dst_cache;
+ 		memset(skb->cb, 0, sizeof(struct inet6_skb_parm));
+ 		IP6CB(skb)->iif = skb->dev->ifindex;
+ 		IP6CB(skb)->flags = IP6SKB_FORWARDED;
+@@ -641,6 +626,7 @@ nf_flow_offload_ipv6_hook(void *priv, st
+ 
+ 	switch (tuplehash->tuple.xmit_type) {
+ 	case FLOW_OFFLOAD_XMIT_NEIGH:
++		rt = (struct rt6_info *)tuplehash->tuple.dst_cache;
+ 		outdev = rt->dst.dev;
+ 		skb->dev = outdev;
+ 		nexthop = rt6_nexthop(rt, &flow->tuplehash[!dir].tuple.src_v6);
diff --git a/target/linux/generic/backport-5.10/610-v5.13-55-netfilter-conntrack-Introduce-tcp-offload-timeout-co.patch b/target/linux/generic/backport-5.10/610-v5.13-55-netfilter-conntrack-Introduce-tcp-offload-timeout-co.patch
new file mode 100644
index 0000000000..e5a346cac4
--- /dev/null
+++ b/target/linux/generic/backport-5.10/610-v5.13-55-netfilter-conntrack-Introduce-tcp-offload-timeout-co.patch
@@ -0,0 +1,94 @@
+From: Oz Shlomo <ozsh at nvidia.com>
+Date: Thu, 3 Jun 2021 15:12:33 +0300
+Subject: [PATCH] netfilter: conntrack: Introduce tcp offload timeout
+ configuration
+
+TCP connections may be offloaded from nf conntrack to nf flow table.
+Offloaded connections are aged after 30 seconds of inactivity.
+Once aged, ownership is returned to conntrack with a hard coded pickup
+time of 120 seconds, after which the connection may be deleted.
+eted. The current aging intervals may be too aggressive for some users.
+
+Provide users with the ability to control the nf flow table offload
+aging and pickup time intervals via sysctl parameter as a pre-step for
+configuring the nf flow table GC timeout intervals.
+
+Signed-off-by: Oz Shlomo <ozsh at nvidia.com>
+Reviewed-by: Paul Blakey <paulb at nvidia.com>
+Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
+---
+
+--- a/include/net/netns/conntrack.h
++++ b/include/net/netns/conntrack.h
+@@ -27,6 +27,10 @@ struct nf_tcp_net {
+ 	int tcp_loose;
+ 	int tcp_be_liberal;
+ 	int tcp_max_retrans;
++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
++	unsigned int offload_timeout;
++	unsigned int offload_pickup;
++#endif
+ };
+ 
+ enum udp_conntrack {
+--- a/net/netfilter/nf_conntrack_proto_tcp.c
++++ b/net/netfilter/nf_conntrack_proto_tcp.c
+@@ -1438,6 +1438,11 @@ void nf_conntrack_tcp_init_net(struct ne
+ 	tn->tcp_loose = nf_ct_tcp_loose;
+ 	tn->tcp_be_liberal = nf_ct_tcp_be_liberal;
+ 	tn->tcp_max_retrans = nf_ct_tcp_max_retrans;
++
++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
++	tn->offload_timeout = 30 * HZ;
++	tn->offload_pickup = 120 * HZ;
++#endif
+ }
+ 
+ const struct nf_conntrack_l4proto nf_conntrack_l4proto_tcp =
+--- a/net/netfilter/nf_conntrack_standalone.c
++++ b/net/netfilter/nf_conntrack_standalone.c
+@@ -567,6 +567,10 @@ enum nf_ct_sysctl_index {
+ 	NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_CLOSE,
+ 	NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_RETRANS,
+ 	NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_UNACK,
++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
++	NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_OFFLOAD,
++	NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_OFFLOAD_PICKUP,
++#endif
+ 	NF_SYSCTL_CT_PROTO_TCP_LOOSE,
+ 	NF_SYSCTL_CT_PROTO_TCP_LIBERAL,
+ 	NF_SYSCTL_CT_PROTO_TCP_MAX_RETRANS,
+@@ -758,6 +762,20 @@ static struct ctl_table nf_ct_sysctl_tab
+ 		.mode		= 0644,
+ 		.proc_handler	= proc_dointvec_jiffies,
+ 	},
++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
++	[NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_OFFLOAD] = {
++		.procname	= "nf_flowtable_tcp_timeout",
++		.maxlen		= sizeof(unsigned int),
++		.mode		= 0644,
++		.proc_handler	= proc_dointvec_jiffies,
++	},
++	[NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_OFFLOAD_PICKUP] = {
++		.procname	= "nf_flowtable_tcp_pickup",
++		.maxlen		= sizeof(unsigned int),
++		.mode		= 0644,
++		.proc_handler	= proc_dointvec_jiffies,
++	},
++#endif
+ 	[NF_SYSCTL_CT_PROTO_TCP_LOOSE] = {
+ 		.procname	= "nf_conntrack_tcp_loose",
+ 		.maxlen		= sizeof(int),
+@@ -967,6 +985,12 @@ static void nf_conntrack_standalone_init
+ 	XASSIGN(LIBERAL, &tn->tcp_be_liberal);
+ 	XASSIGN(MAX_RETRANS, &tn->tcp_max_retrans);
+ #undef XASSIGN
++
++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
++	table[NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_OFFLOAD].data = &tn->offload_timeout;
++	table[NF_SYSCTL_CT_PROTO_TIMEOUT_TCP_OFFLOAD_PICKUP].data = &tn->offload_pickup;
++#endif
++
+ }
+ 
+ static void nf_conntrack_standalone_init_sctp_sysctl(struct net *net,
diff --git a/target/linux/generic/backport-5.10/610-v5.13-56-netfilter-conntrack-Introduce-udp-offload-timeout-co.patch b/target/linux/generic/backport-5.10/610-v5.13-56-netfilter-conntrack-Introduce-udp-offload-timeout-co.patch
new file mode 100644
index 0000000000..8a70f375ed
--- /dev/null
+++ b/target/linux/generic/backport-5.10/610-v5.13-56-netfilter-conntrack-Introduce-udp-offload-timeout-co.patch
@@ -0,0 +1,92 @@
+From: Oz Shlomo <ozsh at nvidia.com>
+Date: Thu, 3 Jun 2021 15:12:34 +0300
+Subject: [PATCH] netfilter: conntrack: Introduce udp offload timeout
+ configuration
+
+UDP connections may be offloaded from nf conntrack to nf flow table.
+Offloaded connections are aged after 30 seconds of inactivity.
+Once aged, ownership is returned to conntrack with a hard coded pickup
+time of 30 seconds, after which the connection may be deleted.
+eted. The current aging intervals may be too aggressive for some users.
+
+Provide users with the ability to control the nf flow table offload
+aging and pickup time intervals via sysctl parameter as a pre-step for
+configuring the nf flow table GC timeout intervals.
+
+Signed-off-by: Oz Shlomo <ozsh at nvidia.com>
+Reviewed-by: Paul Blakey <paulb at nvidia.com>
+Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
+---
+
+--- a/include/net/netns/conntrack.h
++++ b/include/net/netns/conntrack.h
+@@ -41,6 +41,10 @@ enum udp_conntrack {
+ 
+ struct nf_udp_net {
+ 	unsigned int timeouts[UDP_CT_MAX];
++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
++	unsigned int offload_timeout;
++	unsigned int offload_pickup;
++#endif
+ };
+ 
+ struct nf_icmp_net {
+--- a/net/netfilter/nf_conntrack_proto_udp.c
++++ b/net/netfilter/nf_conntrack_proto_udp.c
+@@ -270,6 +270,11 @@ void nf_conntrack_udp_init_net(struct ne
+ 
+ 	for (i = 0; i < UDP_CT_MAX; i++)
+ 		un->timeouts[i] = udp_timeouts[i];
++
++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
++	un->offload_timeout = 30 * HZ;
++	un->offload_pickup = 30 * HZ;
++#endif
+ }
+ 
+ const struct nf_conntrack_l4proto nf_conntrack_l4proto_udp =
+--- a/net/netfilter/nf_conntrack_standalone.c
++++ b/net/netfilter/nf_conntrack_standalone.c
+@@ -576,6 +576,10 @@ enum nf_ct_sysctl_index {
+ 	NF_SYSCTL_CT_PROTO_TCP_MAX_RETRANS,
+ 	NF_SYSCTL_CT_PROTO_TIMEOUT_UDP,
+ 	NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_STREAM,
++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
++	NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_OFFLOAD,
++	NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_OFFLOAD_PICKUP,
++#endif
+ 	NF_SYSCTL_CT_PROTO_TIMEOUT_ICMP,
+ 	NF_SYSCTL_CT_PROTO_TIMEOUT_ICMPV6,
+ #ifdef CONFIG_NF_CT_PROTO_SCTP
+@@ -810,6 +814,20 @@ static struct ctl_table nf_ct_sysctl_tab
+ 		.mode		= 0644,
+ 		.proc_handler	= proc_dointvec_jiffies,
+ 	},
++#if IS_ENABLED(CONFIG_NFT_FLOW_OFFLOAD)
++	[NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_OFFLOAD] = {
++		.procname	= "nf_flowtable_udp_timeout",
++		.maxlen		= sizeof(unsigned int),
++		.mode		= 0644,
++		.proc_handler	= proc_dointvec_jiffies,
++	},
++	[NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_OFFLOAD_PICKUP] = {
++		.procname	= "nf_flowtable_udp_pickup",
++		.maxlen		= sizeof(unsigned int),
++		.mode		= 0644,
++		.proc_handler	= proc_dointvec_jiffies,
++	},
++#endif
+ 	[NF_SYSCTL_CT_PROTO_TIMEOUT_ICMP] = {
+ 		.procname	= "nf_conntrack_icmp_timeout",
+ 		.maxlen		= sizeof(unsigned int),
+@@ -1078,6 +1096,10 @@ static int nf_conntrack_standalone_init_
+ 	table[NF_SYSCTL_CT_PROTO_TIMEOUT_ICMPV6].data = &nf_icmpv6_pernet(net)->timeout;
+ 	table[NF_SYSCTL_CT_PROTO_TIMEOUT_UDP].data = &un->timeouts[UDP_CT_UNREPLIED];
+ 	table[NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_STREAM].data = &un->timeouts[UDP_CT_REPLIED];
++#if IS_ENABLED(CONFIG_NF_FLOW_TABLE)
++	table[NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_OFFLOAD].data = &un->offload_timeout;
++	table[NF_SYSCTL_CT_PROTO_TIMEOUT_UDP_OFFLOAD_PICKUP].data = &un->offload_pickup;
++#endif
+ 
+ 	nf_conntrack_standalone_init_tcp_sysctl(net, table);
+ 	nf_conntrack_standalone_init_sctp_sysctl(net, table);
diff --git a/target/linux/generic/backport-5.10/610-v5.13-57-netfilter-flowtable-Set-offload-timeouts-according-t.patch b/target/linux/generic/backport-5.10/610-v5.13-57-netfilter-flowtable-Set-offload-timeouts-according-t.patch
new file mode 100644
index 0000000000..5410e2751a
--- /dev/null
+++ b/target/linux/generic/backport-5.10/610-v5.13-57-netfilter-flowtable-Set-offload-timeouts-according-t.patch
@@ -0,0 +1,134 @@
+From: Oz Shlomo <ozsh at nvidia.com>
+Date: Thu, 3 Jun 2021 15:12:35 +0300
+Subject: [PATCH] netfilter: flowtable: Set offload timeouts according to proto
+ values
+
+Currently the aging period for tcp/udp connections is hard coded to
+30 seconds. Aged tcp/udp connections configure a hard coded 120/30
+seconds pickup timeout for conntrack.
+This configuration may be too aggressive or permissive for some users.
+
+Dynamically configure the nf flow table GC timeout intervals according
+to the user defined values.
+
+Signed-off-by: Oz Shlomo <ozsh at nvidia.com>
+Reviewed-by: Paul Blakey <paulb at nvidia.com>
+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
+@@ -174,6 +174,8 @@ struct flow_offload {
+ #define NF_FLOW_TIMEOUT (30 * HZ)
+ #define nf_flowtable_time_stamp	(u32)jiffies
+ 
++unsigned long flow_offload_get_timeout(struct flow_offload *flow);
++
+ static inline __s32 nf_flow_timeout_delta(unsigned int timeout)
+ {
+ 	return (__s32)(timeout - nf_flowtable_time_stamp);
+--- a/net/netfilter/nf_flow_table_core.c
++++ b/net/netfilter/nf_flow_table_core.c
+@@ -175,12 +175,10 @@ static void flow_offload_fixup_tcp(struc
+ 	tcp->seen[1].td_maxwin = 0;
+ }
+ 
+-#define NF_FLOWTABLE_TCP_PICKUP_TIMEOUT	(120 * HZ)
+-#define NF_FLOWTABLE_UDP_PICKUP_TIMEOUT	(30 * HZ)
+-
+ static void flow_offload_fixup_ct_timeout(struct nf_conn *ct)
+ {
+ 	const struct nf_conntrack_l4proto *l4proto;
++	struct net *net = nf_ct_net(ct);
+ 	int l4num = nf_ct_protonum(ct);
+ 	unsigned int timeout;
+ 
+@@ -188,12 +186,17 @@ static void flow_offload_fixup_ct_timeou
+ 	if (!l4proto)
+ 		return;
+ 
+-	if (l4num == IPPROTO_TCP)
+-		timeout = NF_FLOWTABLE_TCP_PICKUP_TIMEOUT;
+-	else if (l4num == IPPROTO_UDP)
+-		timeout = NF_FLOWTABLE_UDP_PICKUP_TIMEOUT;
+-	else
++	if (l4num == IPPROTO_TCP) {
++		struct nf_tcp_net *tn = nf_tcp_pernet(net);
++
++		timeout = tn->offload_pickup;
++	} else if (l4num == IPPROTO_UDP) {
++		struct nf_udp_net *tn = nf_udp_pernet(net);
++
++		timeout = tn->offload_pickup;
++	} else {
+ 		return;
++	}
+ 
+ 	if (nf_flow_timeout_delta(ct->timeout) > (__s32)timeout)
+ 		ct->timeout = nfct_time_stamp + timeout;
+@@ -265,11 +268,35 @@ static const struct rhashtable_params nf
+ 	.automatic_shrinking	= true,
+ };
+ 
++unsigned long flow_offload_get_timeout(struct flow_offload *flow)
++{
++	const struct nf_conntrack_l4proto *l4proto;
++	unsigned long timeout = NF_FLOW_TIMEOUT;
++	struct net *net = nf_ct_net(flow->ct);
++	int l4num = nf_ct_protonum(flow->ct);
++
++	l4proto = nf_ct_l4proto_find(l4num);
++	if (!l4proto)
++		return timeout;
++
++	if (l4num == IPPROTO_TCP) {
++		struct nf_tcp_net *tn = nf_tcp_pernet(net);
++
++		timeout = tn->offload_timeout;
++	} else if (l4num == IPPROTO_UDP) {
++		struct nf_udp_net *tn = nf_udp_pernet(net);
++
++		timeout = tn->offload_timeout;
++	}
++
++	return timeout;
++}
++
+ int flow_offload_add(struct nf_flowtable *flow_table, struct flow_offload *flow)
+ {
+ 	int err;
+ 
+-	flow->timeout = nf_flowtable_time_stamp + NF_FLOW_TIMEOUT;
++	flow->timeout = nf_flowtable_time_stamp + flow_offload_get_timeout(flow);
+ 
+ 	err = rhashtable_insert_fast(&flow_table->rhashtable,
+ 				     &flow->tuplehash[0].node,
+@@ -301,7 +328,7 @@ EXPORT_SYMBOL_GPL(flow_offload_add);
+ void flow_offload_refresh(struct nf_flowtable *flow_table,
+ 			  struct flow_offload *flow)
+ {
+-	flow->timeout = nf_flowtable_time_stamp + NF_FLOW_TIMEOUT;
++	flow->timeout = nf_flowtable_time_stamp + flow_offload_get_timeout(flow);
+ 
+ 	if (likely(!nf_flowtable_hw_offload(flow_table)))
+ 		return;
+--- a/net/netfilter/nf_flow_table_offload.c
++++ b/net/netfilter/nf_flow_table_offload.c
+@@ -885,7 +885,7 @@ static void flow_offload_work_stats(stru
+ 
+ 	lastused = max_t(u64, stats[0].lastused, stats[1].lastused);
+ 	offload->flow->timeout = max_t(u64, offload->flow->timeout,
+-				       lastused + NF_FLOW_TIMEOUT);
++				       lastused + flow_offload_get_timeout(offload->flow));
+ 
+ 	if (offload->flowtable->flags & NF_FLOWTABLE_COUNTER) {
+ 		if (stats[0].pkts)
+@@ -989,7 +989,7 @@ void nf_flow_offload_stats(struct nf_flo
+ 	__s32 delta;
+ 
+ 	delta = nf_flow_timeout_delta(flow->timeout);
+-	if ((delta >= (9 * NF_FLOW_TIMEOUT) / 10))
++	if ((delta >= (9 * flow_offload_get_timeout(flow)) / 10))
+ 		return;
+ 
+ 	offload = nf_flow_offload_work_alloc(flowtable, flow, FLOW_CLS_STATS);
diff --git a/target/linux/generic/hack-5.10/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/target/linux/generic/hack-5.10/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
index 44e897f10a..77c24ccc7a 100644
--- a/target/linux/generic/hack-5.10/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
+++ b/target/linux/generic/hack-5.10/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
@@ -767,7 +767,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #include <net/netfilter/nf_flow_table.h>
  #include <net/netfilter/nf_conntrack.h>
  #include <net/netfilter/nf_conntrack_core.h>
-@@ -355,8 +354,7 @@ flow_offload_lookup(struct nf_flowtable
+@@ -395,8 +394,7 @@ flow_offload_lookup(struct nf_flowtable
  }
  EXPORT_SYMBOL_GPL(flow_offload_lookup);
  
@@ -777,13 +777,13 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		      void (*iter)(struct flow_offload *flow, void *data),
  		      void *data)
  {
-@@ -388,6 +386,7 @@ nf_flow_table_iterate(struct nf_flowtabl
+@@ -428,6 +426,7 @@ nf_flow_table_iterate(struct nf_flowtabl
  
  	return err;
  }
 +EXPORT_SYMBOL_GPL(nf_flow_table_iterate);
  
- static void nf_flow_offload_gc_step(struct flow_offload *flow, void *data)
+ static bool flow_offload_stale_dst(struct flow_offload_tuple *tuple)
  {
 --- /dev/null
 +++ b/include/uapi/linux/netfilter/xt_FLOWOFFLOAD.h
@@ -807,7 +807,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +#endif /* _XT_FLOWOFFLOAD_H */
 --- a/include/net/netfilter/nf_flow_table.h
 +++ b/include/net/netfilter/nf_flow_table.h
-@@ -265,6 +265,10 @@ void nf_flow_table_free(struct nf_flowta
+@@ -270,6 +270,10 @@ void nf_flow_table_free(struct nf_flowta
  
  void flow_offload_teardown(struct flow_offload *flow);
  
diff --git a/target/linux/generic/pending-5.10/613-netfilter_optional_tcp_window_check.patch b/target/linux/generic/pending-5.10/613-netfilter_optional_tcp_window_check.patch
index b70ef886b1..97e449510d 100644
--- a/target/linux/generic/pending-5.10/613-netfilter_optional_tcp_window_check.patch
+++ b/target/linux/generic/pending-5.10/613-netfilter_optional_tcp_window_check.patch
@@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static bool enable_hooks __read_mostly;
  MODULE_PARM_DESC(enable_hooks, "Always enable conntrack hooks");
  module_param(enable_hooks, bool, 0000);
-@@ -652,6 +655,7 @@ enum nf_ct_sysctl_index {
+@@ -660,6 +663,7 @@ enum nf_ct_sysctl_index {
  	NF_SYSCTL_CT_PROTO_TIMEOUT_GRE_STREAM,
  #endif
  
@@ -57,7 +57,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	__NF_SYSCTL_CT_LAST_SYSCTL,
  };
  
-@@ -978,6 +982,13 @@ static struct ctl_table nf_ct_sysctl_tab
+@@ -1014,6 +1018,13 @@ static struct ctl_table nf_ct_sysctl_tab
  		.proc_handler   = proc_dointvec_jiffies,
  	},
  #endif


From lede-commits at lists.infradead.org  Fri Jul  9 08:12:23 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 09 Jul 2021 11:12:23 -0400
Subject: [openwrt/openwrt]  ath79: add missing MTD_NAND_RB91X symbol
In-Reply-To: <162584354362.31413.13176938965085208370@git-01.infra.openwrt.org>
References: <162584354362.31413.13176938965085208370@git-01.infra.openwrt.org>
Message-ID: <mailman.6471.1625843549.1072.lede-commits@lists.infradead.org>

xback pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/918908fe7639fde76c486b9be559992873978656

commit 918908fe7639fde76c486b9be559992873978656
Author: Koen Vandeputte <koen.vandeputte at ncentric.com>
AuthorDate: Fri Jul 9 13:50:57 2021 +0200

    ath79: add missing MTD_NAND_RB91X symbol
    
    Looks like the symbol was forgotten for 5.4
    
    Fixes: 820e660cd7 ("ath79: add NAND driver for MikroTik RB91xG series")
    Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
---
 target/linux/ath79/config-5.4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ath79/config-5.4 b/target/linux/ath79/config-5.4
index 9c5520775d..e37b728554 100644
--- a/target/linux/ath79/config-5.4
+++ b/target/linux/ath79/config-5.4
@@ -173,6 +173,7 @@ CONFIG_MTD_CFI_GEOMETRY=y
 CONFIG_MTD_CMDLINE_PARTS=y
 # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
+# CONFIG_MTD_NAND_RB91X is not set
 CONFIG_MTD_PARSER_CYBERTAN=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_SPI_NOR=y


From lede-commits at lists.infradead.org  Fri Jul  9 08:14:38 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 09 Jul 2021 11:14:38 -0400
Subject: [openwrt/openwrt]  ath79: add missing MTD_NAND_RB91X symbol
In-Reply-To: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
References: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
Message-ID: <mailman.6472.1625843676.1072.lede-commits@lists.infradead.org>

xback pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/febf6db0d02c1bdadd4db621a0070b80eb94b7fb

commit febf6db0d02c1bdadd4db621a0070b80eb94b7fb
Author: Koen Vandeputte <koen.vandeputte at ncentric.com>
AuthorDate: Fri Jul 9 13:50:57 2021 +0200

    ath79: add missing MTD_NAND_RB91X symbol
    
    Looks like the symbol was forgotten for 5.4
    
    Fixes: 820e660cd7 ("ath79: add NAND driver for MikroTik RB91xG series")
    Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
    (cherry picked from commit 52c27dab1973d523453fc1e319d8636e1cb10927)
---
 target/linux/ath79/config-5.4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ath79/config-5.4 b/target/linux/ath79/config-5.4
index 4760e55b62..60f57692e2 100644
--- a/target/linux/ath79/config-5.4
+++ b/target/linux/ath79/config-5.4
@@ -173,6 +173,7 @@ CONFIG_MTD_CFI_GEOMETRY=y
 CONFIG_MTD_CMDLINE_PARTS=y
 # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
 # CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
+# CONFIG_MTD_NAND_RB91X is not set
 CONFIG_MTD_PARSER_CYBERTAN=y
 CONFIG_MTD_PHYSMAP=y
 CONFIG_MTD_SPI_NOR=y


From lede-commits at lists.infradead.org  Fri Jul  9 08:14:37 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 09 Jul 2021 11:14:37 -0400
Subject: [openwrt/openwrt]  ath79: add missing GPIO_LATCH symbol
In-Reply-To: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
References: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
Message-ID: <mailman.6473.1625843676.1072.lede-commits@lists.infradead.org>

xback pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/983fcc42a4ef40f9922901cde4f9d4387a29d4de

commit 983fcc42a4ef40f9922901cde4f9d4387a29d4de
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Mon Jun 21 23:50:05 2021 +0200

    ath79: add missing GPIO_LATCH symbol
    
    Fixes commit 7b8931678c36 ("ath79: add gpio-latch driver for MikroTik RouterBOARDs")
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
    (cherry picked from commit f2f137593eb6c0e849352e85c003c91f8be81dd1)
---
 target/linux/ath79/config-5.4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ath79/config-5.4 b/target/linux/ath79/config-5.4
index 25c3a08e69..4760e55b62 100644
--- a/target/linux/ath79/config-5.4
+++ b/target/linux/ath79/config-5.4
@@ -90,6 +90,7 @@ CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_GPIO_74X164=y
 CONFIG_GPIO_ATH79=y
 CONFIG_GPIO_GENERIC=y
+# CONFIG_GPIO_LATCH is not set
 CONFIG_HANDLE_DOMAIN_IRQ=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y


From lede-commits at lists.infradead.org  Fri Jul  9 08:14:36 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 09 Jul 2021 11:14:36 -0400
Subject: [openwrt/openwrt] ath79: mikrotik: fix beeper phantom noise on RB912
In-Reply-To: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
References: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
Message-ID: <mailman.6474.1625843678.1072.lede-commits@lists.infradead.org>

xback pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/0ad49d368b33de12a20ee5c9adcf0273aac891fa

commit 0ad49d368b33de12a20ee5c9adcf0273aac891fa
Author: Koen Vandeputte <koen.vandeputte at ncentric.com>
AuthorDate: Mon Jun 28 10:57:21 2021 +0200

    ath79: mikrotik: fix beeper phantom noise on RB912
    
    Analysis done by Denis Kalashnikov:
    
    It seems that some ROS versions on some routerboard models have this bug:
    after silence boot (no output to uart, no beeps) beeper clicks when wireless traffic is.
    
    https://forum.mikrotik.com/viewtopic.php?f=3&t=92269
    https://forum.mikrotik.com/viewtopic.php?t=63399
    
    From these links:
    
    1)
    Hello, I have RB951G-2HnD and I noticed strange thing
    when I loaded the device with some wireless traffic it
    produced strange sound - like hissing, fizzing etc.
    
    2)
    Same problem still on 6.33, with silent boot enabled
    I hear buzzing noise on wireless load.
    
    3)
    The sound is fixed in v5.19, it was a bug that caused beeper to make clicks.
    
    It also got fixed in RouterOS:
    
    * What's new in 5.19 (2012-Jul-16 10:51):
    fix ticking sound on RB411UAHL;
    
    * What's new in 6.38.3 (2017-Feb-07 09:52):
    rb3011 - fixed noise from buzzer after silent boot;
    
    I've checked with an oscilloscope that:
    * When on the ssr beeper pin is 0,
      on the beeper itself is 1 (~5V),
      and when on the ssr beeper pin is 1,
      on the beeper is 0
      The beeper doesn't consume power,
      so 1 should be a default/idle value for the ssr beeper pin).
    * When there is wireless traffic (ping packets)
      in the background and the beeper clicks, I see
      pulses on the beeper itself,
      but no pulses on the ssr beeper pin (Q5 pin of 74hc595).
      When I manually toggle the ssr beeper pin I see pulses on both.
      So, it is likely that the phantom beeper clicks are caused by the EMI.
    
    Suggested-by: Denis Kalashnikov <denis281089 at gmail.com>
    Reviewed-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
    Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
    (cherry picked from commit a58bcc9e673db3c6aa39f2089d216d51c8356418)
---
 target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts
index cc5553acda..ee2c12b4e0 100644
--- a/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts
+++ b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts
@@ -107,6 +107,12 @@
 	gpio-export {
 		compatible = "gpio-export";
 
+		beeper {
+			gpio-export,name = "beeper";
+			gpio-export,output = <1>;	/* Must be 1 to avoid EMI induced clicking noise */
+			gpios = <&ssr 5 GPIO_ACTIVE_HIGH>;
+		};
+
 		usb_power {
 			gpio-export,name = "power-usb";
 			gpio-export,output = <1>;


From lede-commits at lists.infradead.org  Fri Jul  9 08:14:34 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 09 Jul 2021 11:14:34 -0400
Subject: [openwrt/openwrt] ath79: add support for MikroTik RouterBOARD
 912UAG-2HPnD
In-Reply-To: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
References: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
Message-ID: <mailman.6475.1625843678.1072.lede-commits@lists.infradead.org>

xback pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/88e1c9b0b565f92e26b739eacf105b19928aea44

commit 88e1c9b0b565f92e26b739eacf105b19928aea44
Author: Denis Kalashnikov <denis281089 at gmail.com>
AuthorDate: Thu May 27 11:16:46 2021 +0300

    ath79: add support for MikroTik RouterBOARD 912UAG-2HPnD
    
    This board has been supported in the ar71xx.
    
    Links:
    * https://mikrotik.com/product/RB912UAG-2HPnD
    * https://openwrt.org/toh/hwdata/mikrotik/mikrotik_rb912uag-2hpnd
    
    This also supports the 5GHz flavour of the board.
    
    Hardware:
    * SoC: Atheros AR9342,
    * RAM: DDR 64MB,
    * SPI NOR: 64KB,
    * NAND: 128MB,
    * Ethernet: x1 10/100/1000 port with passive POE in,
    * Wi-Fi: 802.11 b/g/n,
    * PCIe,
    * USB: 2.0 EHCI controller, connected to mPCIe slot and a Type-A
      port -- both can be used for LTE modem, but only one can be
      used at any time.
    * LEDs: 5 general purpose LEDs (led1..led5), power LED, user LED,
      Ethernet phy LED,
    * Button,
    * Beeper.
    
    Not working:
    * Button: it shares gpio line 15 with NAND ALE and NAND IO7,
      and current drivers doesn't easily support this configuration,
    * Beeper: it is connected to bit 5 of a serial shift register
      (tested with sysfs led trigger timer). But kmod-gpio-beeper
      doesn't work -- we left this as is for now.
    
    Flashing:
    * Use the RouterBOARD Reset button to enable TFTP netboot,
    boot kernel and initramfs and then perform sysupgrade.
    * From ar71xx OpenWrt firmware run:
      $ sysupgrade -F /tmp/<sysupgrade.bin>
    For more info see: https://openwrt.org/toh/mikrotik/common.
    
    Co-Developed-by: Koen Vandeputte <koen.vandeputte at citymesh.com>
    Reviewed-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
    Signed-off-by: Denis Kalashnikov <denis281089 at gmail.com>
    (cherry-picked from commit 695a1cd53ca52c678b3f837deb1bf30204285360)
---
 .../ar9342_mikrotik_routerboard-912uag-2hpnd.dts   | 212 +++++++++++++++++++++
 target/linux/ath79/image/mikrotik.mk               |   9 +
 .../mikrotik/base-files/etc/board.d/02_network     |   2 +
 .../etc/hotplug.d/firmware/10-ath9k-eeprom         |   1 +
 .../mikrotik/base-files/lib/upgrade/platform.sh    |   1 +
 5 files changed, 225 insertions(+)

diff --git a/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts
new file mode 100644
index 0000000000..cc5553acda
--- /dev/null
+++ b/target/linux/ath79/dts/ar9342_mikrotik_routerboard-912uag-2hpnd.dts
@@ -0,0 +1,212 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "ar9344.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "mikrotik,routerboard-912uag-2hpnd", "qca,ar9342";
+	model = "MikroTik RouterBOARD 912UAG-2HPnD";
+
+	aliases {
+                led-boot = &led_power;
+                led-failsafe = &led_power;
+                led-running = &led_power;
+                led-upgrade = &led_power;
+        };
+
+	gpio_latch: gpio_latch {
+		compatible = "gpio-latch";
+		gpio-controller;
+		#gpio-cells = <2>;
+		gpios = <&gpio 0 GPIO_ACTIVE_HIGH>,
+			<&gpio 1 GPIO_ACTIVE_HIGH>,
+			<&gpio 2 GPIO_ACTIVE_HIGH>,
+			<&gpio 3 GPIO_ACTIVE_HIGH>,
+			<0>, /* Not connected */
+			<&gpio 13 GPIO_ACTIVE_HIGH>,
+			<&gpio 14 GPIO_ACTIVE_HIGH>,
+			<&gpio 15 GPIO_ACTIVE_HIGH>,
+			<&gpio 11 GPIO_ACTIVE_LOW>; /* Latch Enable */
+	};
+
+	nand_gpio {
+		compatible = "mikrotik,rb91x-nand";
+
+		gpios = <&gpio_latch 3 GPIO_ACTIVE_HIGH>, /* Read */
+			<&gpio 4 GPIO_ACTIVE_HIGH>,       /* Ready (RDY) */
+			<&gpio_latch 5 GPIO_ACTIVE_LOW>,  /* Chip Enable (nCE) */
+			<&gpio_latch 6 GPIO_ACTIVE_HIGH>, /* Command Latch Enable (CLE) */
+			<&gpio_latch 7 GPIO_ACTIVE_HIGH>, /* Address Latch Enable (ALE) */
+			<&gpio 12 GPIO_ACTIVE_LOW>,       /* Read/Write Enable (nRW) */
+			<&gpio_latch 8 GPIO_ACTIVE_LOW>;  /* Latch Enable (nLE) */
+
+		partitions {
+			compatible = "fixed-partitions";
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "booter";
+				reg = <0x0 0x0040000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "kernel";
+				reg = <0x0040000 0x03c0000>;
+			};
+
+			partition at 400000 {
+				label = "ubi";
+				reg = <0x0400000 0x7c00000>;
+			};
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_power: power {
+			label = "green:power";
+			gpios = <&gpio_latch 1 GPIO_ACTIVE_HIGH>;
+			default-state = "on";
+		};
+
+		user {
+			label = "green:user";
+			gpios = <&gpio_latch 2 GPIO_ACTIVE_HIGH>;
+		};
+
+		led1 {
+			label = "green:led1";
+			gpios = <&ssr 0 GPIO_ACTIVE_HIGH>;
+		};
+
+		led2 {
+			label = "green:led2";
+			gpios = <&ssr 1 GPIO_ACTIVE_HIGH>;
+		};
+
+		led3 {
+			label = "green:led3";
+			gpios = <&ssr 2 GPIO_ACTIVE_HIGH>;
+		};
+
+		led4 {
+			label = "green:led4";
+			gpios = <&ssr 3 GPIO_ACTIVE_HIGH>;
+		};
+
+		led5 {
+			label = "green:led5";
+			gpios = <&ssr 4 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+
+		usb_power {
+			gpio-export,name = "power-usb";
+			gpio-export,output = <1>;
+			gpios = <&ssr 6 GPIO_ACTIVE_HIGH>;
+		};
+
+		pcie_power {
+			gpio-export,name = "power-pcie";
+			gpio-export,output = <0>;
+			gpios = <&ssr 7 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&spi {
+	status = "okay";
+
+	compatible = "qca,ar7100-spi";
+
+	cs-gpios = <0>, <&gpio_latch 0 GPIO_ACTIVE_LOW>;
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+
+		partitions {
+			compatible = "mikrotik,routerboot-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "routerboot";
+				reg = <0x0 0x0>;
+				read-only;
+			};
+
+			hard_config: hard_config {
+				read-only;
+			};
+
+			bios {
+				size = <0x1000>;
+				read-only;
+			};
+
+			soft_config {
+			};
+		};
+	};
+
+	ssr: ssr at 1 {
+		compatible = "fairchild,74hc595";
+		gpio-controller;
+		#gpio-cells = <2>;
+		registers-number = <1>;
+		reg = <1>;
+		spi-max-frequency = <50000000>;
+	};
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy-mask = <0>;
+
+	phy0: ethernet-phy at 0 {
+		reg = <0>;
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	phy-mode = "rgmii-id";
+	phy-handle = <&phy0>;
+	pll-data = <0x02000000 0x00000101 0x00001313>;
+
+	gmac-config {
+		device = <&gmac>;
+		rgmii-gmac0 = <1>;
+		rgmii-enabled = <1>;
+		rxd-delay = <1>;
+		txd-delay = <1>;
+	};
+};
+
+&wmac {
+	status = "okay";
+	qca,no-eeprom;
+};
+
+&pcie {
+	status = "okay";
+};
+
+&usb {
+	status = "okay";
+};
+
+&usb_phy {
+	status = "okay";
+};
diff --git a/target/linux/ath79/image/mikrotik.mk b/target/linux/ath79/image/mikrotik.mk
index 74f8603b5a..4256f77379 100644
--- a/target/linux/ath79/image/mikrotik.mk
+++ b/target/linux/ath79/image/mikrotik.mk
@@ -9,6 +9,15 @@ define Device/mikrotik_routerboard-493g
 endef
 TARGET_DEVICES += mikrotik_routerboard-493g
 
+define Device/mikrotik_routerboard-912uag-2hpnd
+  $(Device/mikrotik_nand)
+  SOC := ar9342
+  DEVICE_MODEL := RouterBOARD 912UAG-2HPnD
+  DEVICE_PACKAGES += kmod-usb-ehci kmod-usb2
+  SUPPORTED_DEVICES += rb-912uag-2hpnd
+endef
+TARGET_DEVICES += mikrotik_routerboard-912uag-2hpnd
+
 define Device/mikrotik_routerboard-921gs-5hpacd-15s
   $(Device/mikrotik_nand)
   SOC := qca9558
diff --git a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
index 54e7bb20cf..bd249e0b86 100755
--- a/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/mikrotik/base-files/etc/board.d/02_network
@@ -15,6 +15,7 @@ ath79_setup_interfaces()
 		ucidef_add_switch "switch1" \
 			"0 at eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
 		;;
+	mikrotik,routerboard-912uag-2hpnd|\
 	mikrotik,routerboard-921gs-5hpacd-15s|\
 	mikrotik,routerboard-lhg-2nd|\
 	mikrotik,routerboard-sxt-5nd-r2|\
@@ -37,6 +38,7 @@ ath79_setup_macs()
 	local mac_base="$(cat /sys/firmware/mikrotik/hard_config/mac_base)"
 
 	case "$board" in
+	mikrotik,routerboard-912uag-2hpnd|\
 	mikrotik,routerboard-921gs-5hpacd-15s|\
 	mikrotik,routerboard-lhg-2nd|\
 	mikrotik,routerboard-sxt-5nd-r2|\
diff --git a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 7ef6fdbe0f..ae0c94d8ec 100644
--- a/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/mikrotik/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -23,6 +23,7 @@ board=$(board_name)
 case "$FIRMWARE" in
 "ath9k-eeprom-ahb-18100000.wmac.bin")
 	case $board in
+	mikrotik,routerboard-912uag-2hpnd|\
 	mikrotik,routerboard-lhg-2nd|\
 	mikrotik,routerboard-sxt-5nd-r2|\
 	mikrotik,routerboard-wapr-2nd)
diff --git a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
index 97d388168f..6962c6fdcc 100644
--- a/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh
@@ -32,6 +32,7 @@ platform_do_upgrade() {
 
 	case "$board" in
 	mikrotik,routerboard-493g|\
+	mikrotik,routerboard-912uag-2hpnd|\
 	mikrotik,routerboard-921gs-5hpacd-15s|\
 	mikrotik,routerboard-922uags-5hpacd|\
 	mikrotik,routerboard-sxt-5nd-r2)


From lede-commits at lists.infradead.org  Fri Jul  9 08:14:35 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 09 Jul 2021 11:14:35 -0400
Subject: [openwrt/openwrt] ath79: ar934x: fix mounting issues if subpage is
 not supported
In-Reply-To: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
References: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
Message-ID: <mailman.6476.1625843681.1072.lede-commits@lists.infradead.org>

xback pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/ffa943f0b913f0f26018df7eebddab2f0a1daada

commit ffa943f0b913f0f26018df7eebddab2f0a1daada
Author: Koen Vandeputte <koen.vandeputte at ncentric.com>
AuthorDate: Mon May 17 17:52:53 2021 +0200

    ath79: ar934x: fix mounting issues if subpage is not supported
    
    Currently, the option to disable subpage writing is only set
    when a HW ECC engine is used.
    
    Some boards lack a HW ECC engine and use software for that.
    In this case, this NAND option does not get set when the NAND chip
    does not support it, resulting in mounting errors.
    
    Move the setting of this option to a generic init location so it
    gets set for all types where required.
    
    While at it, also OR the option instead of just setting it
    so we don't overwrite potential flags being set somewhere else.
    
    Before:
    
    [    1.681273] UBI: auto-attach mtd2
    [    1.684669] ubi0: attaching mtd2
    [    1.688877] ubi0 error: validate_ec_hdr: bad VID header offset 2048, expected 512
    [    1.696469] ubi0 error: validate_ec_hdr: bad EC header
    [    1.701712] Erase counter header dump:
    [    1.705512]  magic          0x55424923
    [    1.709322]  version        1
    [    1.712330]  ec             1
    [    1.715331]  vid_hdr_offset 2048
    [    1.718610]  data_offset    4096
    [    1.721880]  image_seq      1462320675
    [    1.725680]  hdr_crc        0x12255a15
    
    After:
    
        1.680917] UBI: auto-attach mtd2
    [    1.684308] ubi0: attaching mtd2
    [    2.954504] random: crng init done
    [    3.142813] ubi0: scanning is finished
    [    3.163455] ubi0: attached mtd2 (name "ubi", size 124 MiB)
    [    3.169069] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
    [    3.176037] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
    [    3.182942] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
    [    3.190013] ubi0: good PEBs: 992, bad PEBs: 0, corrupted PEBs: 0
    [    3.196102] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
    [    3.203434] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1462320675
    [    3.212700] ubi0: available PEBs: 0, total reserved PEBs: 992, PEBs reserved for bad PEB handling: 20
    [    3.222124] ubi0: background thread "ubi_bgt0d" started, PID 317
    [    3.230246] block ubiblock0_1: created from ubi0:1(rootfs)
    [    3.235819] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
    [    3.256830] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
    
    Signed-off-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
    (cherry-picked from commit 6561ca1fa510003a19ea7f8800535f12e5098ce2)
---
 target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
index 5f0026b475..7ba7b68d57 100644
--- a/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
+++ b/target/linux/ath79/files/drivers/mtd/nand/raw/ar934x_nand.c
@@ -1266,7 +1266,6 @@ static int ar934x_nfc_setup_hwecc(struct ar934x_nfc *nfc)
 		 * Writing a subpage separately is not supported, because
 		 * the controller only does ECC on full-page accesses.
 		 */
-		nand->options = NAND_NO_SUBPAGE_WRITE;
 
 		nand->ecc.size = 512;
 		nand->ecc.bytes = 7;
@@ -1325,6 +1324,9 @@ static int ar934x_nfc_attach_chip(struct nand_chip *nand)
 	if (ret)
 		return ret;
 
+	if (mtd->writesize == 2048)
+		nand->options |= NAND_NO_SUBPAGE_WRITE;
+
 	if (nand->ecc.mode == NAND_ECC_HW) {
 		ret = ar934x_nfc_setup_hwecc(nfc);
 		if (ret)


From lede-commits at lists.infradead.org  Fri Jul  9 08:14:32 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 09 Jul 2021 11:14:32 -0400
Subject: [openwrt/openwrt] ath79: add gpio-latch driver for MikroTik
 RouterBOARDs
In-Reply-To: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
References: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
Message-ID: <mailman.6479.1625843681.1072.lede-commits@lists.infradead.org>

xback pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/43723e6db9a5fca33ccdc1f9344cc6f7cf04e7df

commit 43723e6db9a5fca33ccdc1f9344cc6f7cf04e7df
Author: Denis Kalashnikov <denis281089 at gmail.com>
AuthorDate: Thu May 27 11:16:44 2021 +0300

    ath79: add gpio-latch driver for MikroTik RouterBOARDs
    
    This is a slighty modified version of ar71xx gpio-latch driver
    written by Gabor Juhos <juhosg at openwrt.org>.
    
    Changes:
    * DTS support,
    * New gpio API (gpiod_*).
    
    Reviewed-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
    Signed-off-by: Denis Kalashnikov <denis281089 at gmail.com>
    (cherry-picked from commit 7b8931678c36c8d8c333b446258a653b1358bf70)
---
 target/linux/ath79/files/drivers/gpio/gpio-latch.c | 203 +++++++++++++++++++++
 .../ath79/patches-5.4/939-mikrotik-rb91x.patch     |  23 +++
 2 files changed, 226 insertions(+)

diff --git a/target/linux/ath79/files/drivers/gpio/gpio-latch.c b/target/linux/ath79/files/drivers/gpio/gpio-latch.c
new file mode 100644
index 0000000000..f3545a663e
--- /dev/null
+++ b/target/linux/ath79/files/drivers/gpio/gpio-latch.c
@@ -0,0 +1,203 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ *  GPIO latch driver
+ *
+ *  Copyright (C) 2014 Gabor Juhos <juhosg at openwrt.org>
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/gpio/consumer.h>
+#include <linux/gpio/driver.h>
+#include <linux/platform_device.h>
+#include <linux/of_platform.h>
+#include <linux/of_gpio.h>
+
+#define GPIO_LATCH_DRIVER_NAME  "gpio-latch"
+#define GPIO_LATCH_LINES 9
+
+struct gpio_latch_chip {
+	struct gpio_chip gc;
+	struct mutex mutex;
+	struct mutex latch_mutex;
+	bool latch_enabled;
+	int le_gpio;
+	bool le_active_low;
+	struct gpio_desc *gpios[GPIO_LATCH_LINES];
+};
+
+static inline struct gpio_latch_chip *to_gpio_latch_chip(struct gpio_chip *gc)
+{
+	return container_of(gc, struct gpio_latch_chip, gc);
+}
+
+static void gpio_latch_lock(struct gpio_latch_chip *glc, bool enable)
+{
+	mutex_lock(&glc->mutex);
+
+	if (enable)
+		glc->latch_enabled = true;
+
+	if (glc->latch_enabled)
+		mutex_lock(&glc->latch_mutex);
+}
+
+static void gpio_latch_unlock(struct gpio_latch_chip *glc, bool disable)
+{
+	if (glc->latch_enabled)
+		mutex_unlock(&glc->latch_mutex);
+
+	if (disable)
+		glc->latch_enabled = true;
+
+	mutex_unlock(&glc->mutex);
+}
+
+static int
+gpio_latch_get(struct gpio_chip *gc, unsigned offset)
+{
+	struct gpio_latch_chip *glc = to_gpio_latch_chip(gc);
+	int ret;
+
+	gpio_latch_lock(glc, false);
+	ret = gpiod_get_value(glc->gpios[offset]);
+	gpio_latch_unlock(glc, false);
+
+	return ret;
+}
+
+static void
+gpio_latch_set(struct gpio_chip *gc, unsigned offset, int value)
+{
+	struct gpio_latch_chip *glc = to_gpio_latch_chip(gc);
+	bool enable_latch = false;
+	bool disable_latch = false;
+
+	if (offset == glc->le_gpio) {
+		enable_latch = value ^ glc->le_active_low;
+		disable_latch = !enable_latch;
+	}
+
+	gpio_latch_lock(glc, enable_latch);
+	gpiod_set_raw_value(glc->gpios[offset], value);
+	gpio_latch_unlock(glc, disable_latch);
+}
+
+static int
+gpio_latch_direction_output(struct gpio_chip *gc, unsigned offset, int value)
+{
+	struct gpio_latch_chip *glc = to_gpio_latch_chip(gc);
+	bool enable_latch = false;
+	bool disable_latch = false;
+	int ret;
+
+	if (offset == glc->le_gpio) {
+		enable_latch = value ^ glc->le_active_low;
+		disable_latch = !enable_latch;
+	}
+
+	gpio_latch_lock(glc, enable_latch);
+	ret = gpiod_direction_output_raw(glc->gpios[offset], value);
+	gpio_latch_unlock(glc, disable_latch);
+
+	return ret;
+}
+
+static int gpio_latch_probe(struct platform_device *pdev)
+{
+	struct gpio_latch_chip *glc;
+	struct gpio_chip *gc;
+	struct device *dev = &pdev->dev;
+	struct device_node *of_node = dev->of_node;
+	int i, n;
+
+	glc = devm_kzalloc(dev, sizeof(*glc), GFP_KERNEL);
+	if (!glc)
+		return -ENOMEM;
+
+	mutex_init(&glc->mutex);
+	mutex_init(&glc->latch_mutex);
+
+	n = gpiod_count(dev, NULL);
+	if (n <= 0) {
+		dev_err(dev, "failed to get gpios: %d\n", n);
+		return n;
+	} else if (n != GPIO_LATCH_LINES) {
+		dev_err(dev, "expected %d gpios\n", GPIO_LATCH_LINES);
+		return -EINVAL;
+	}
+
+	for (i = 0; i < n; i++) {
+		glc->gpios[i] = devm_gpiod_get_index_optional(dev, NULL, i,
+			GPIOD_OUT_LOW);
+		if (IS_ERR(glc->gpios[i])) {
+			dev_err(dev, "failed to get gpio %d: %d\n", i,
+				PTR_ERR(glc->gpios[i]));
+			return PTR_ERR(glc->gpios[i]);
+		}
+	}
+
+	glc->le_gpio = 8;
+	glc->le_active_low = gpiod_is_active_low(glc->gpios[glc->le_gpio]);
+
+	if (!glc->gpios[glc->le_gpio]) {
+		dev_err(dev, "missing required latch-enable gpio %d\n",
+			glc->le_gpio);
+		return -EINVAL;
+	}
+
+	gc = &glc->gc;
+	gc->label = GPIO_LATCH_DRIVER_NAME;
+	gc->can_sleep = true;
+	gc->base = -1;
+	gc->ngpio = GPIO_LATCH_LINES;
+	gc->get = gpio_latch_get;
+	gc->set = gpio_latch_set;
+	gc->direction_output = gpio_latch_direction_output;
+	gc->of_node = of_node;
+
+	platform_set_drvdata(pdev, glc);
+
+	i = gpiochip_add(&glc->gc);
+	if (i) {
+		dev_err(dev, "gpiochip_add() failed: %d\n", i);
+		return i;
+	}
+
+	return 0;
+}
+
+static int gpio_latch_remove(struct platform_device *pdev)
+{
+	struct gpio_latch_chip *glc = platform_get_drvdata(pdev);
+
+	gpiochip_remove(&glc->gc);
+	return 0;
+}
+
+static const struct of_device_id gpio_latch_match[] = {
+	{ .compatible = GPIO_LATCH_DRIVER_NAME },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, gpio_latch_match);
+
+static struct platform_driver gpio_latch_driver = {
+	.probe = gpio_latch_probe,
+	.remove = gpio_latch_remove,
+	.driver = {
+		.name = GPIO_LATCH_DRIVER_NAME,
+		.owner = THIS_MODULE,
+		.of_match_table = gpio_latch_match,
+	},
+};
+
+module_platform_driver(gpio_latch_driver);
+
+MODULE_DESCRIPTION("GPIO latch driver");
+MODULE_AUTHOR("Gabor Juhos <juhosg at openwrt.org>");
+MODULE_AUTHOR("Denis Kalashnikov <denis281089 at gmail.com>");
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:" GPIO_LATCH_DRIVER_NAME);
diff --git a/target/linux/ath79/patches-5.4/939-mikrotik-rb91x.patch b/target/linux/ath79/patches-5.4/939-mikrotik-rb91x.patch
new file mode 100644
index 0000000000..baeaab4611
--- /dev/null
+++ b/target/linux/ath79/patches-5.4/939-mikrotik-rb91x.patch
@@ -0,0 +1,23 @@
+--- a/drivers/gpio/Kconfig
++++ b/drivers/gpio/Kconfig
+@@ -130,6 +130,10 @@ config GPIO_ATH79
+ 	  Select this option to enable GPIO driver for
+ 	  Atheros AR71XX/AR724X/AR913X SoC devices.
+ 
++config GPIO_LATCH
++	tristate "MikroTik RouterBOARD GPIO latch support"
++	depends on ATH79
++
+ config GPIO_RASPBERRYPI_EXP
+ 	tristate "Raspberry Pi 3 GPIO Expander"
+ 	default RASPBERRYPI_FIRMWARE
+--- a/drivers/gpio/Makefile
++++ b/drivers/gpio/Makefile
+@@ -67,6 +67,7 @@ obj-$(CONFIG_GPIO_IT87)			+= gpio-it87.o
+ obj-$(CONFIG_GPIO_IXP4XX)		+= gpio-ixp4xx.o
+ obj-$(CONFIG_GPIO_JANZ_TTL)		+= gpio-janz-ttl.o
+ obj-$(CONFIG_GPIO_KEMPLD)		+= gpio-kempld.o
++obj-$(CONFIG_GPIO_LATCH)		+= gpio-latch.o
+ obj-$(CONFIG_GPIO_LOONGSON1)		+= gpio-loongson1.o
+ obj-$(CONFIG_GPIO_LOONGSON)		+= gpio-loongson.o
+ obj-$(CONFIG_GPIO_LP3943)		+= gpio-lp3943.o


From lede-commits at lists.infradead.org  Fri Jul  9 08:14:33 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 09 Jul 2021 11:14:33 -0400
Subject: [openwrt/openwrt] ath79: add NAND driver for MikroTik RB91xG series
In-Reply-To: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
References: <162584367272.709.4187257450073069720@git-01.infra.openwrt.org>
Message-ID: <mailman.6480.1625843683.1072.lede-commits@lists.infradead.org>

xback pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/bd2e070557cfa0dd77ee0f726cdab262c82cd5c1

commit bd2e070557cfa0dd77ee0f726cdab262c82cd5c1
Author: Denis Kalashnikov <denis281089 at gmail.com>
AuthorDate: Thu May 27 11:16:45 2021 +0300

    ath79: add NAND driver for MikroTik RB91xG series
    
    Main part is copied from ar71xx original driver rb91x_nand
    written by Gabor Juhos <juhosg at openwrt.org>.
    
    What is done:
    * Support of kernel 5.4 and 5.10,
    * DTS support,
    * New gpio API (gpiod_*) support.
    
    Reviewed-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
    Signed-off-by: Denis Kalashnikov <denis281089 at gmail.com>
    (cherry-picked from commit 820e660cd7463aa6d5ed9d31baf0f3c35596ce57)
---
 .../ath79/files/drivers/mtd/nand/raw/rb91x_nand.c  | 375 +++++++++++++++++++++
 target/linux/ath79/mikrotik/config-default         |   1 +
 .../ath79/patches-5.4/939-mikrotik-rb91x.patch     |  21 ++
 3 files changed, 397 insertions(+)

diff --git a/target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c b/target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c
new file mode 100644
index 0000000000..e231944519
--- /dev/null
+++ b/target/linux/ath79/files/drivers/mtd/nand/raw/rb91x_nand.c
@@ -0,0 +1,375 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ *  MikroTik RB91x NAND flash driver
+ *
+ *  Main part is copied from original driver written by Gabor Juhos.
+ *
+ *  Copyright (C) 2013-2014 Gabor Juhos <juhosg at openwrt.org>
+ */
+
+/*
+ * WARNING: to speed up NAND reading/writing we are working with SoC GPIO
+ * controller registers directly -- not through standard GPIO API.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/mtd/rawnand.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/platform_device.h>
+#include <linux/gpio/consumer.h>
+#include <linux/version.h>
+#include <linux/of_platform.h>
+
+#include <asm/mach-ath79/ar71xx_regs.h>
+
+/* Bit masks for NAND data lines in ath79 gpio 32-bit register */
+#define RB91X_NAND_NRW_BIT BIT(12)
+#define RB91X_NAND_DATA_BITS (BIT(0) | BIT(1) | BIT(2) | BIT(3) | BIT(4) \
+			    | BIT(13) | BIT(14) | BIT(15))
+#define RB91X_NAND_LOW_DATA_MASK	0x1f
+#define RB91X_NAND_HIGH_DATA_MASK	0xe0
+#define RB91X_NAND_HIGH_DATA_SHIFT	8
+
+enum rb91x_nand_gpios {
+	RB91X_NAND_READ,/* Read */
+	RB91X_NAND_RDY, /* NAND Ready */
+	RB91X_NAND_NCE, /* Chip Enable. Active low */
+	RB91X_NAND_CLE, /* Command Latch Enable */
+	RB91X_NAND_ALE, /* Address Latch Enable */
+	RB91X_NAND_NRW, /* Read/Write. Active low */
+	RB91X_NAND_NLE, /* Latch Enable. Active low */
+
+	RB91X_NAND_GPIOS,
+};
+
+struct rb91x_nand_drvdata {
+	struct nand_chip chip;
+	struct device *dev;
+	struct gpio_desc **gpio;
+	void __iomem *ath79_gpio_base;
+};
+
+static inline void rb91x_nand_latch_lock(struct rb91x_nand_drvdata *drvdata,
+					 int lock)
+{
+	gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_NLE], lock);
+}
+
+static int rb91x_ooblayout_ecc(struct mtd_info *mtd, int section,
+			       struct mtd_oob_region *oobregion)
+{
+	switch (section) {
+	case 0:
+		oobregion->offset = 8;
+		oobregion->length = 3;
+		return 0;
+	case 1:
+		oobregion->offset = 13;
+		oobregion->length = 3;
+		return 0;
+	default:
+		return -ERANGE;
+	}
+}
+
+static int rb91x_ooblayout_free(struct mtd_info *mtd, int section,
+				struct mtd_oob_region *oobregion)
+{
+	switch (section) {
+	case 0:
+		oobregion->offset = 0;
+		oobregion->length = 4;
+		return 0;
+	case 1:
+		oobregion->offset = 4;
+		oobregion->length = 1;
+		return 0;
+	case 2:
+		oobregion->offset = 6;
+		oobregion->length = 2;
+		return 0;
+	case 3:
+		oobregion->offset = 11;
+		oobregion->length = 2;
+		return 0;
+	default:
+		return -ERANGE;
+	}
+}
+
+static const struct mtd_ooblayout_ops rb91x_nand_ecclayout_ops = {
+	.ecc = rb91x_ooblayout_ecc,
+	.free = rb91x_ooblayout_free,
+};
+
+static void rb91x_nand_write(struct rb91x_nand_drvdata *drvdata,
+			     const u8 *buf,
+			     unsigned len)
+{
+	void __iomem *base = drvdata->ath79_gpio_base;
+	u32 oe_reg;
+	u32 out_reg;
+	u32 out;
+	unsigned i;
+
+	rb91x_nand_latch_lock(drvdata, 1);
+
+	oe_reg = __raw_readl(base + AR71XX_GPIO_REG_OE);
+	out_reg = __raw_readl(base + AR71XX_GPIO_REG_OUT);
+
+	/* Set data lines to output mode */
+	__raw_writel(oe_reg & ~(RB91X_NAND_DATA_BITS | RB91X_NAND_NRW_BIT),
+		     base + AR71XX_GPIO_REG_OE);
+
+	out = out_reg & ~(RB91X_NAND_DATA_BITS | RB91X_NAND_NRW_BIT);
+	for (i = 0; i != len; i++) {
+		u32 data;
+
+		data = (buf[i] & RB91X_NAND_HIGH_DATA_MASK) <<
+			RB91X_NAND_HIGH_DATA_SHIFT;
+		data |= buf[i] & RB91X_NAND_LOW_DATA_MASK;
+		data |= out;
+		__raw_writel(data, base + AR71XX_GPIO_REG_OUT);
+
+		/* Deactivate WE line */
+		data |= RB91X_NAND_NRW_BIT;
+		__raw_writel(data, base + AR71XX_GPIO_REG_OUT);
+		/* Flush write */
+		__raw_readl(base + AR71XX_GPIO_REG_OUT);
+	}
+
+	/* Restore registers */
+	__raw_writel(out_reg, base + AR71XX_GPIO_REG_OUT);
+	__raw_writel(oe_reg, base + AR71XX_GPIO_REG_OE);
+	/* Flush write */
+	__raw_readl(base + AR71XX_GPIO_REG_OUT);
+
+	rb91x_nand_latch_lock(drvdata, 0);
+}
+
+static void rb91x_nand_read(struct rb91x_nand_drvdata *drvdata,
+			    u8 *read_buf,
+			    unsigned len)
+{
+	void __iomem *base = drvdata->ath79_gpio_base;
+	u32 oe_reg;
+	u32 out_reg;
+	unsigned i;
+
+	/* Enable read mode */
+	gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_READ], 1);
+
+	rb91x_nand_latch_lock(drvdata, 1);
+
+	/* Save registers */
+	oe_reg = __raw_readl(base + AR71XX_GPIO_REG_OE);
+	out_reg = __raw_readl(base + AR71XX_GPIO_REG_OUT);
+
+	/* Set data lines to input mode */
+	__raw_writel(oe_reg | RB91X_NAND_DATA_BITS,
+		     base + AR71XX_GPIO_REG_OE);
+
+	for (i = 0; i < len; i++) {
+		u32 in;
+		u8 data;
+
+		/* Activate RE line */
+		__raw_writel(RB91X_NAND_NRW_BIT, base + AR71XX_GPIO_REG_CLEAR);
+		/* Flush write */
+		__raw_readl(base + AR71XX_GPIO_REG_CLEAR);
+
+		/* Read input lines */
+		in = __raw_readl(base + AR71XX_GPIO_REG_IN);
+
+		/* Deactivate RE line */
+		__raw_writel(RB91X_NAND_NRW_BIT, base + AR71XX_GPIO_REG_SET);
+
+		data = (in & RB91X_NAND_LOW_DATA_MASK);
+		data |= (in >> RB91X_NAND_HIGH_DATA_SHIFT) &
+			RB91X_NAND_HIGH_DATA_MASK;
+
+		read_buf[i] = data;
+	}
+
+	/* Restore  registers */
+	__raw_writel(out_reg, base + AR71XX_GPIO_REG_OUT);
+	__raw_writel(oe_reg, base + AR71XX_GPIO_REG_OE);
+	/* Flush write */
+	__raw_readl(base + AR71XX_GPIO_REG_OUT);
+
+	rb91x_nand_latch_lock(drvdata, 0);
+
+	/* Disable read mode */
+	gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_READ], 0);
+}
+
+static int rb91x_nand_dev_ready(struct nand_chip *chip)
+{
+	struct rb91x_nand_drvdata *drvdata = (struct rb91x_nand_drvdata *)(chip->priv);
+
+	return gpiod_get_value_cansleep(drvdata->gpio[RB91X_NAND_RDY]);
+}
+
+static void rb91x_nand_cmd_ctrl(struct nand_chip *chip, int cmd,
+				unsigned int ctrl)
+{
+	struct rb91x_nand_drvdata *drvdata = chip->priv;
+
+	if (ctrl & NAND_CTRL_CHANGE) {
+		gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_CLE],
+					(ctrl & NAND_CLE) ? 1 : 0);
+		gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_ALE],
+					(ctrl & NAND_ALE) ? 1 : 0);
+		gpiod_set_value_cansleep(drvdata->gpio[RB91X_NAND_NCE],
+					(ctrl & NAND_NCE) ? 1 : 0);
+	}
+
+	if (cmd != NAND_CMD_NONE) {
+		u8 t = cmd;
+
+		rb91x_nand_write(drvdata, &t, 1);
+	}
+}
+
+static u8 rb91x_nand_read_byte(struct nand_chip *chip)
+{
+	u8 data = 0xff;
+
+	rb91x_nand_read(chip->priv, &data, 1);
+
+	return data;
+}
+
+static void rb91x_nand_read_buf(struct nand_chip *chip, u8 *buf, int len)
+{
+	rb91x_nand_read(chip->priv, buf, len);
+}
+
+static void rb91x_nand_write_buf(struct nand_chip *chip, const u8 *buf, int len)
+{
+	rb91x_nand_write(chip->priv, buf, len);
+}
+
+static void rb91x_nand_release(struct rb91x_nand_drvdata *drvdata)
+{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0)
+	mtd_device_unregister(nand_to_mtd(&drvdata->chip));
+	nand_cleanup(&drvdata->chip);
+#else
+	nand_release(&drvdata->chip);
+#endif
+}
+
+static int rb91x_nand_probe(struct platform_device *pdev)
+{
+	struct rb91x_nand_drvdata *drvdata;
+	struct mtd_info *mtd;
+	int r;
+	struct device *dev = &pdev->dev;
+	struct gpio_descs *gpios;
+
+	drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
+	if (!drvdata)
+		return -ENOMEM;
+
+	platform_set_drvdata(pdev, drvdata);
+
+	gpios = gpiod_get_array(dev, NULL, GPIOD_OUT_LOW);
+	if (IS_ERR(gpios)) {
+		dev_err(dev, "failed to get gpios: %d\n", (int)gpios);
+		return -EINVAL;
+	}
+
+	if (gpios->ndescs != RB91X_NAND_GPIOS) {
+		dev_err(dev, "expected %d gpios\n", RB91X_NAND_GPIOS);
+		return -EINVAL;
+	}
+
+	drvdata->gpio = gpios->desc;
+
+	gpiod_direction_input(drvdata->gpio[RB91X_NAND_RDY]);
+
+	drvdata->ath79_gpio_base = ioremap(AR71XX_GPIO_BASE, AR71XX_GPIO_SIZE);
+
+	drvdata->dev = dev;
+
+	drvdata->chip.priv = drvdata;
+
+	drvdata->chip.legacy.cmd_ctrl = rb91x_nand_cmd_ctrl;
+	drvdata->chip.legacy.dev_ready = rb91x_nand_dev_ready;
+	drvdata->chip.legacy.read_byte = rb91x_nand_read_byte;
+	drvdata->chip.legacy.write_buf = rb91x_nand_write_buf;
+	drvdata->chip.legacy.read_buf = rb91x_nand_read_buf;
+
+	drvdata->chip.legacy.chip_delay = 25;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,9,0)
+	drvdata->chip.ecc.engine_type      = NAND_ECC_ENGINE_TYPE_SOFT;
+	drvdata->chip.ecc.algo             = NAND_ECC_ALGO_HAMMING;
+#else
+	drvdata->chip.ecc.mode             = NAND_ECC_SOFT;
+	drvdata->chip.ecc.algo             = NAND_ECC_HAMMING;
+#endif
+	drvdata->chip.options = NAND_NO_SUBPAGE_WRITE;
+
+	r = nand_scan(&drvdata->chip, 1);
+	if (r) {
+		dev_err(dev, "nand_scan() failed: %d\n", r);
+		return r;
+	}
+
+	mtd = nand_to_mtd(&drvdata->chip);
+	mtd->dev.parent = dev;
+	mtd_set_of_node(mtd, dev->of_node);
+	mtd->owner = THIS_MODULE;
+	if (mtd->writesize == 512)
+		mtd_set_ooblayout(mtd, &rb91x_nand_ecclayout_ops);
+
+	r = mtd_device_register(mtd, NULL, 0);
+	if (r) {
+		dev_err(dev, "mtd_device_register() failed: %d\n",
+			r);
+		goto err_release_nand;
+	}
+
+	return 0;
+
+err_release_nand:
+	rb91x_nand_release(drvdata);
+	return r;
+}
+
+static int rb91x_nand_remove(struct platform_device *pdev)
+{
+	struct rb91x_nand_drvdata *drvdata = platform_get_drvdata(pdev);
+
+	rb91x_nand_release(drvdata);
+
+	return 0;
+}
+
+static const struct of_device_id rb91x_nand_match[] = {
+	{ .compatible = "mikrotik,rb91x-nand" },
+	{},
+};
+
+MODULE_DEVICE_TABLE(of, rb91x_nand_match);
+
+static struct platform_driver rb91x_nand_driver = {
+	.probe	= rb91x_nand_probe,
+	.remove	= rb91x_nand_remove,
+	.driver	= {
+		.name	= "rb91x-nand",
+		.owner	= THIS_MODULE,
+		.of_match_table = rb91x_nand_match,
+	},
+};
+
+module_platform_driver(rb91x_nand_driver);
+
+MODULE_DESCRIPTION("MikrotTik RB91x NAND flash driver");
+MODULE_VERSION(DRV_VERSION);
+MODULE_AUTHOR("Gabor Juhos <juhosg at openwrt.org>");
+MODULE_AUTHOR("Denis Kalashnikov <denis281089 at gmail.com>");
+MODULE_LICENSE("GPL v2");
diff --git a/target/linux/ath79/mikrotik/config-default b/target/linux/ath79/mikrotik/config-default
index 8609893f6e..97dddfb197 100644
--- a/target/linux/ath79/mikrotik/config-default
+++ b/target/linux/ath79/mikrotik/config-default
@@ -15,6 +15,7 @@ CONFIG_MTD_NAND_AR934X=y
 CONFIG_MTD_NAND_CORE=y
 CONFIG_MTD_NAND_ECC=y
 CONFIG_MTD_NAND_RB4XX=y
+CONFIG_MTD_NAND_RB91X=y
 CONFIG_MTD_RAW_NAND=y
 CONFIG_MTD_ROUTERBOOT_PARTS=y
 CONFIG_MTD_SPI_NAND=y
diff --git a/target/linux/ath79/patches-5.4/939-mikrotik-rb91x.patch b/target/linux/ath79/patches-5.4/939-mikrotik-rb91x.patch
index baeaab4611..6d84443945 100644
--- a/target/linux/ath79/patches-5.4/939-mikrotik-rb91x.patch
+++ b/target/linux/ath79/patches-5.4/939-mikrotik-rb91x.patch
@@ -1,3 +1,24 @@
+--- a/drivers/mtd/nand/raw/Kconfig
++++ b/drivers/mtd/nand/raw/Kconfig
+@@ -559,4 +559,8 @@ config MTD_NAND_RB4XX
+ 	  Enables support for the NAND flash chip on Mikrotik Routerboard
+ 	  RB4xx series.
+ 
++config MTD_NAND_RB91X
++	tristate "MikroTik RB91x NAND driver support"
++	depends on ATH79 && MTD_RAW_NAND
++
+ endif # MTD_RAW_NAND
+--- a/drivers/mtd/nand/raw/Makefile
++++ b/drivers/mtd/nand/raw/Makefile
+@@ -59,6 +59,7 @@ obj-$(CONFIG_MTD_NAND_STM32_FMC2)	+= stm
+ obj-$(CONFIG_MTD_NAND_MESON)		+= meson_nand.o
+ obj-$(CONFIG_MTD_NAND_AR934X)		+= ar934x_nand.o
+ obj-$(CONFIG_MTD_NAND_RB4XX)		+= nand_rb4xx.o
++obj-$(CONFIG_MTD_NAND_RB91X)		+= rb91x_nand.o
+ 
+ nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
+ nand-objs += nand_onfi.o
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
 @@ -130,6 +130,10 @@ config GPIO_ATH79


From lede-commits at lists.infradead.org  Sat Jul 10 11:36:02 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 10 Jul 2021 14:36:02 -0400
Subject: [openwrt/openwrt] ramips: mt7628an: remove redundant console setup
 for bootargs
In-Reply-To: <162594216039.10544.8021039665783170336@git-01.infra.openwrt.org>
References: <162594216039.10544.8021039665783170336@git-01.infra.openwrt.org>
Message-ID: <mailman.6624.1625942166.1072.lede-commits@lists.infradead.org>

adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5e8eaac8c3984fa5860e3b5e97504be54c4fea22

commit 5e8eaac8c3984fa5860e3b5e97504be54c4fea22
Author: Adrian Schmutzler <freifunk at adrianschmutzler.de>
AuthorDate: Sat Jul 10 20:33:26 2021 +0200

    ramips: mt7628an: remove redundant console setup for bootargs
    
    This is already set in mt7628an.dtsi
    
    Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 target/linux/ramips/dts/mt7628an_minew_g1-c.dts        | 4 ----
 target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts | 4 ----
 2 files changed, 8 deletions(-)

diff --git a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts
index 74ea47aee0..12cf47f5a7 100644
--- a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts
+++ b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts
@@ -16,10 +16,6 @@
 		led-upgrade = &led_system;
 	};
 
-	chosen {
-		bootargs = "console=ttyS0,57600";
-	};
-
 	memory at 0 {
 		device_type = "memory";
 		reg = <0x0 0x8000000>;
diff --git a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
index 6962651e1b..859568b1c1 100644
--- a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
+++ b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
@@ -16,10 +16,6 @@
 		led-upgrade = &led_globe;
 	};
 
-	chosen {
-		bootargs = "console=ttyS0,57600";
-	};
-
 	leds {
 		compatible = "gpio-leds";
 


From lede-commits at lists.infradead.org  Sat Jul 10 11:36:01 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 10 Jul 2021 14:36:01 -0400
Subject: [openwrt/openwrt]  ramips: add support for D-Link DIR-853-R1
In-Reply-To: <162594216039.10544.8021039665783170336@git-01.infra.openwrt.org>
References: <162594216039.10544.8021039665783170336@git-01.infra.openwrt.org>
Message-ID: <mailman.6625.1625942167.1072.lede-commits@lists.infradead.org>

adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/b8168f4716ad64863db8a6a2aba24bbff4664ffe

commit b8168f4716ad64863db8a6a2aba24bbff4664ffe
Author: Stas Fiduchi <fiduchi at protonmail.com>
AuthorDate: Sat Jun 12 11:35:27 2021 +0300

    ramips: add support for D-Link DIR-853-R1
    
    This PR adds support for router D-Link DIR-853-R1
    
    Specifications:
    
        SoC: MT7621AT
        RAM: 128MB
        Flash: 16MB SPI
        WiFi: MT7615DN (2.4GHz+5Ghz) with DBDC (This mode allows this
          single chip act as an 2x2 11n radio and an 2x2 11ac radio at the
          same time)
        LAN: 5x1000M
        LEDs Power Blue+Orange,Wan Blue+Orange,WPS Blue,"2.4G"Blue, "5G" Blue
        USB Blue
        Buttons Reset,WPS, Wifi
    
    MAC addresses:
    
    |Interface   |        MAC      |    Factory  |Comment
    |------------|-----------------|-------------|----------------
    |WAN sticker |C4:XX:XX:6E:XX:2A|             |Sticker
    |LAN         |C4:XX:XX:6E:XX:2B|             |
    |Wifi (5g)   |C4:XX:XX:6E:XX:2C|0x4          |
    |Wifi (2.4g) |C6:XX:XX:7E:XX:2C|             |
    |            |                 |             |
    |            |C4:XX:XX:6E:XX:2E|0x8004 0xe000|
    |            |C4:XX:XX:6E:XX:2F|0xe006       |
    
    The increment of the 4th byte for the 2.4g address appears to vary.
    Reported cases:
    
           5g                 2.4g         increment
     C4:XX:XX:6E:XX:2C  C6:XX:XX:7E:XX:2C  0x10
     f4:XX:XX:16:XX:32  f6:XX:XX:36:XX:32  0x20
     F4:XX:XX:A6:XX:E3  F6:XX:XX:B6:XX:E3  0x10
    
    Since increment is inconsistent and there is no obvious pattern
    in swapping bytes, and the 2.4g address has local bit set anyway,
    it seems safer to use the LAN address with flipped byte here in
    order to prevent collisions between OpenWrt devices and OEM devices
    for this interface. This way we at least use an address as base
    that is definitely owned by the device at hand.
    
    Flashing instruction:
    
    The Dlink "Emergency Room"
    
    Connect your client computer to LAN1 of the device
    Set your client IP address manually to 192.168.0.101 / 255.255.255.0.
    Then, power down the router, press and hold the reset button, then
    re-plug it. Keep the reset button pressed until the internet LED stops
    flashing
    Call the recovery page or tftp for the device at http://192.168.0.1
    Use the provided emergency web GUI to upload and flash a new firmware to
    the device.
    
    Signed-off-by: Stas Fiduchi <fiduchi at protonmail.com>
    [commit title/message improvements, use correct label MAC address,
     calculate MAC addresses based on 0x4, minor DTS style fixes, add
     uart2 to state_default, remove factory image, add 2.4g MAC address,
     use partition DTSI, add macaddr comment in DTS]
    Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../linux/ramips/dts/mt7621_dlink_dir-853-r1.dts   | 144 +++++++++++++++++++++
 target/linux/ramips/image/mt7621.mk                |   8 ++
 .../ramips/mt7621/base-files/etc/board.d/01_leds   |   3 +
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac        |   6 +
 4 files changed, 161 insertions(+)

diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts
new file mode 100644
index 0000000000..09e46b011e
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-r1.dts
@@ -0,0 +1,144 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621.dtsi"
+
+#include "mt7621_dlink_flash-16m-r1.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "dlink,dir-853-r1", "mediatek,mt7621-soc";
+	model = "D-Link DIR-853 R1";
+
+	aliases {
+		label-mac-device = &wan;
+		led-boot = &led_power_orange;
+		led-failsafe = &led_power_blue;
+		led-running = &led_power_blue;
+		led-upgrade = &led_net_orange;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_power_orange: power_orange {
+			label = "orange:power";
+			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+		};
+
+		led_power_blue: power_blue {
+			label = "blue:power";
+			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+		};
+
+		led_net_orange: net_orange {
+			label = "orange:net";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+		};
+
+		net_blue {
+			label = "blue:net";
+			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+		};
+
+		usb_blue {
+			label = "blue:usb";
+			gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&xhci_ehci_port1>;
+			linux,default-trigger = "usbport";
+		};
+
+		wlan2g {
+			label = "blue:wlan2g";
+			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0radio";
+		};
+
+		wlan5g {
+			label = "blue:wlan5g";
+			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1radio";
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+
+		wifi {
+			label = "wifi";
+			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RFKILL>;
+		};
+	};
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie0 {
+	wifi at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x0>;
+		/* 5 GHz (phy1) does not take the address from calibration data,
+		   but setting it manually here works */
+		mtd-mac-address = <&factory 0x4>;
+	};
+};
+
+&gmac0 {
+	mtd-mac-address = <&factory 0x4>;
+	mtd-mac-address-increment = <(-1)>;
+};
+
+&switch0 {
+	ports {
+		port at 0 {
+			status = "okay";
+			label = "lan4";
+		};
+
+		port at 1 {
+			status = "okay";
+			label = "lan3";
+		};
+
+		port at 2 {
+			status = "okay";
+			label = "lan2";
+		};
+
+		port at 3 {
+			status = "okay";
+			label = "lan1";
+		};
+
+		wan: port at 4 {
+			status = "okay";
+			label = "wan";
+			mtd-mac-address = <&factory 0x4>;
+			mtd-mac-address-increment = <(-2)>;
+		};
+	};
+};
+
+&state_default {
+	gpio {
+		groups = "i2c", "uart3", "uart2", "jtag", "wdt";
+		function = "gpio";
+	};
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index a11fa21fb4..63d28530b6 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -342,6 +342,14 @@ define Device/dlink_dir-2660-a1
 endef
 TARGET_DEVICES += dlink_dir-2660-a1
 
+define Device/dlink_dir-853-r1
+  $(Device/dlink_dir-8xx-r1)
+  DEVICE_MODEL := DIR-853
+  DEVICE_VARIANT := R1
+  DEVICE_PACKAGES += kmod-usb3 kmod-usb-ledtrig-usbport
+endef
+TARGET_DEVICES += dlink_dir-853-r1
+
 define Device/dlink_dir-860l-b1
   $(Device/dsa-migration)
   $(Device/seama)
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 c04dae4f0d..cb889de208 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
@@ -23,6 +23,9 @@ d-team,newifi-d2)
 	ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "blue:wlan2g" "wlan0"
 	ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "blue:wlan5g" "wlan1"
 	;;
+dlink,dir-853-r1)
+	ucidef_set_led_netdev "internet" "internet" "blue:net" "wan"
+	;;
 d-team,pbr-m1|\
 gehua,ghl-r-001|\
 jcg,y2|\
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 bd0f0254c6..24d73b039d 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
@@ -10,6 +10,12 @@ PHYNBR=${DEVPATH##*/phy}
 board=$(board_name)
 
 case "$board" in
+	dlink,dir-853-r1)
+		[ "$PHYNBR" = "0" ] && \
+			base_mac=$(mtd_get_mac_binary factory 0x4)
+			base_mac=$(macaddr_add "$base_mac" -1)
+			macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress
+		;;
 	glinet,gl-mt1300)
 		[ "$PHYNBR" = "1" ] && \
 			macaddr_add "$(mtd_get_mac_binary factory 0x4)" 1 > /sys${DEVPATH}/macaddress


From lede-commits at lists.infradead.org  Sat Jul 10 11:36:00 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 10 Jul 2021 14:36:00 -0400
Subject: [openwrt/openwrt] treewide: call check-size before append-metadata
In-Reply-To: <162594216039.10544.8021039665783170336@git-01.infra.openwrt.org>
References: <162594216039.10544.8021039665783170336@git-01.infra.openwrt.org>
Message-ID: <mailman.6626.1625942170.1072.lede-commits@lists.infradead.org>

adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/cce8d16bf18909e1634c0aeac05e40a7be96a519

commit cce8d16bf18909e1634c0aeac05e40a7be96a519
Author: Adrian Schmutzler <freifunk at adrianschmutzler.de>
AuthorDate: Sun Jun 20 18:54:36 2021 +0200

    treewide: call check-size before append-metadata
    
    sysupgrade metadata is not flashed to the device, so check-size
    should be called _before_ adding metadata to the image.
    
    While at it, do some obvious wrapping improvements.
    
    Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
    Acked-by: Paul Spooren <mail at aparcar.org>
---
 target/linux/ath79/image/Makefile           |  2 +-
 target/linux/ath79/image/common-mikrotik.mk |  2 +-
 target/linux/ath79/image/common-netgear.mk  | 10 ++++----
 target/linux/ath79/image/common-tp-link.mk  |  5 ++--
 target/linux/ath79/image/generic-tp-link.mk |  2 +-
 target/linux/ath79/image/generic-ubnt.mk    |  4 ++--
 target/linux/ath79/image/generic.mk         | 36 ++++++++++++-----------------
 target/linux/ath79/image/nand.mk            |  3 +--
 target/linux/ath79/image/tiny.mk            |  3 +--
 target/linux/ipq40xx/image/generic.mk       |  8 +++----
 target/linux/ipq40xx/image/mikrotik.mk      |  2 +-
 target/linux/ipq806x/image/Makefile         |  2 +-
 target/linux/lantiq/image/Makefile          |  4 ++--
 target/linux/lantiq/image/ar9.mk            |  6 ++---
 target/linux/lantiq/image/tp-link.mk        |  2 +-
 target/linux/lantiq/image/vr9.mk            |  2 +-
 target/linux/ramips/image/Makefile          |  6 ++---
 target/linux/ramips/image/common-tp-link.mk | 10 ++++----
 target/linux/ramips/image/mt7620.mk         | 10 ++++----
 target/linux/ramips/image/mt7621.mk         | 10 ++++----
 target/linux/ramips/image/rt305x.mk         |  6 ++---
 target/linux/ramips/image/rt3883.mk         |  2 +-
 target/linux/realtek/image/Makefile         |  2 +-
 23 files changed, 64 insertions(+), 75 deletions(-)

diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile
index aa8665fbb2..aee4ddf963 100644
--- a/target/linux/ath79/image/Makefile
+++ b/target/linux/ath79/image/Makefile
@@ -81,7 +81,7 @@ define Device/Default
   COMPILE :=
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
-	append-rootfs | pad-rootfs | append-metadata | check-size
+	append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 
 include $(SUBTARGET).mk
diff --git a/target/linux/ath79/image/common-mikrotik.mk b/target/linux/ath79/image/common-mikrotik.mk
index 6e739f2d85..5f5fa7899a 100644
--- a/target/linux/ath79/image/common-mikrotik.mk
+++ b/target/linux/ath79/image/common-mikrotik.mk
@@ -9,7 +9,7 @@ define Device/mikrotik_nor
   $(Device/mikrotik)
   IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 -e | \
 	pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
 endef
 
 define Device/mikrotik_nand
diff --git a/target/linux/ath79/image/common-netgear.mk b/target/linux/ath79/image/common-netgear.mk
index 8a74fdc0c9..5a61caf1f6 100644
--- a/target/linux/ath79/image/common-netgear.mk
+++ b/target/linux/ath79/image/common-netgear.mk
@@ -32,10 +32,8 @@ define Device/netgear_generic
   KERNEL := kernel-bin | append-dtb | lzma -d20 | uImage lzma
   KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | uImage lzma
   IMAGES += factory.img
-  IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | \
-	append-rootfs | pad-rootfs
-  IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
-	check-size
-  IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | \
-	check-size
+  IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | \
+	netgear-squashfs | append-rootfs | pad-rootfs
+  IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata
+  IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size
 endef
diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk
index 0b7b0e1935..f1d5614aa7 100644
--- a/target/linux/ath79/image/common-tp-link.mk
+++ b/target/linux/ath79/image/common-tp-link.mk
@@ -22,8 +22,7 @@ define Device/tplink-v2
   TPLINK_HVERSION := 3
   KERNEL := kernel-bin | append-dtb | lzma
   KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-v2-header
-  IMAGE/sysupgrade.bin := tplink-v2-image -s | append-metadata | \
-	check-size
+  IMAGE/sysupgrade.bin := tplink-v2-image -s | check-size | append-metadata
 endef
 
 define Device/tplink-nolzma
@@ -74,7 +73,7 @@ define Device/tplink-safeloader
   KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O
   KERNEL_INITRAMFS := $$(KERNEL)
   IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
-	append-metadata | check-size
+	check-size | append-metadata
   IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
 endef
 
diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index daeac8341f..9c4920b4e6 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -692,7 +692,7 @@ define Device/tplink_tl-wr2543-v1
   DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport
   TPLINK_HWID := 0x25430001
   IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade -v 3.13.99 | \
-	append-metadata | check-size
+	check-size | append-metadata
   IMAGE/factory.bin := tplink-v1-image factory -v 3.13.99
   SUPPORTED_DEVICES += tl-wr2543n
 endef
diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk
index e8ea06a07a..01e8533fd6 100644
--- a/target/linux/ath79/image/generic-ubnt.mk
+++ b/target/linux/ath79/image/generic-ubnt.mk
@@ -128,7 +128,7 @@ define Device/ubnt-unifi-jffs2
   KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | jffs2 kernel0
   IMAGES := sysupgrade.bin factory.bin
   IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs |\
-	pad-rootfs | append-metadata | check-size
+	pad-rootfs | check-size | append-metadata
   IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage2
 endef
 
@@ -373,7 +373,7 @@ define Device/ubnt_routerstation_common
   IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | \
 	check-size
   IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | \
-	append-metadata | check-size
+	check-size | append-metadata
   KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
   KERNEL_INITRAMFS := kernel-bin | append-dtb
 endef
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 0db9987d70..fbcc9d186a 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -172,7 +172,7 @@ define Device/seama
   # - 36 bytes of META data (4-bytes aligned)
   IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
   IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \
 	seama-seal | check-size
   SEAMA_SIGNATURE :=
@@ -336,7 +336,7 @@ define Device/avm
   KERNEL_INITRAMFS := $$(KERNEL)
   IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | \
 	append-squashfs-fakeroot-be | pad-to 256 | append-rootfs | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_PACKAGES := fritz-tffs
 endef
 
@@ -777,7 +777,7 @@ define Device/dlink_dap-2xxx
   IMAGE/factory.img := append-kernel | pad-offset 6144k 160 | \
 	append-rootfs | wrgg-pad-rootfs | mkwrggimg | check-size
   IMAGE/sysupgrade.bin := append-kernel | mkwrggimg | \
-	pad-to $$$$(BLOCKSIZE) | append-rootfs | append-metadata | check-size
+	pad-to $$$$(BLOCKSIZE) | append-rootfs | check-size | append-metadata
   KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma
   KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg
 endef
@@ -829,7 +829,7 @@ define Device/dlink_dap-2695-a1
   IMAGE/factory.img := $$(IMAGE/default) | append-rootfs | wrgg-pad-rootfs | \
 	mkwrggimg | check-size
   IMAGE/sysupgrade.bin := $$(IMAGE/default) | mkwrggimg | append-rootfs | \
-	wrgg-pad-rootfs | append-metadata |  check-size
+	wrgg-pad-rootfs | check-size | append-metadata
   KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma
   KERNEL_INITRAMFS := $$(KERNEL) | mkwrggimg
   DAP_SIGNATURE := wapac02_dkbs_dap2695
@@ -891,7 +891,7 @@ define Device/dlink_dir-825-b1
   DEVICE_VARIANT := B1
   IMAGE_SIZE := 6208k
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport \
 	kmod-leds-reset kmod-owl-loader
   SUPPORTED_DEVICES += dir-825-b1
@@ -912,8 +912,7 @@ define Device/dlink_dir-825-c1
 	pad-rootfs
   IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \
 	append-string 00DB120AR9344-RT-101214-00 | check-size
-  IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
-	check-size
+  IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata
 endef
 TARGET_DEVICES += dlink_dir-825-c1
 
@@ -930,8 +929,7 @@ define Device/dlink_dir-835-a1
 	pad-rootfs
   IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \
 	append-string 00DB120AR9344-RT-101214-00 | check-size
-  IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
-	check-size
+  IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata
 endef
 TARGET_DEVICES += dlink_dir-835-a1
 
@@ -950,7 +948,7 @@ define Device/dlink_dir-842-c
   IMAGE/default := append-kernel | uImage lzma | \
 	pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
   IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \
 	seama-seal | check-size
   IMAGE_SIZE := 15680k
@@ -1363,7 +1361,7 @@ define Device/jjplus_ja76pf2
   IMAGE/kernel.bin := append-kernel
   IMAGE/rootfs.bin := append-rootfs | pad-rootfs
   IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | \
-	append-metadata | check-size
+	check-size | append-metadata
   KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
   KERNEL_INITRAMFS := kernel-bin | append-dtb
   IMAGE_SIZE := 16000k
@@ -1430,7 +1428,7 @@ define Device/nec_wx1200cr
   DEVICE_VENDOR := NEC
   IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
   IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
 endef
 
@@ -1482,10 +1480,8 @@ define Device/netgear_ex6400_ex7300
   IMAGE_SIZE := 15552k
   IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | \
 	netgear-rootfs | pad-rootfs
-  IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
-	check-size
-  IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | \
-	check-size
+  IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata
+  IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size
   DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca99x0-ct
 endef
 
@@ -1868,7 +1864,7 @@ define Device/phicomm_k2t
   DEVICE_MODEL := K2T
   IMAGE_SIZE := 15744k
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9888-ct
 endef
 TARGET_DEVICES += phicomm_k2t
@@ -2230,8 +2226,7 @@ define Device/teltonika_rut955
 	pad-rootfs | teltonika-fw-fake-checksum 20 | append-string master |\
 	append-md5sum-bin | check-size
   IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) |\
-	append-rootfs | pad-rootfs | append-metadata |\
-	check-size
+	append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 TARGET_DEVICES += teltonika_rut955
 
@@ -2254,8 +2249,7 @@ define Device/trendnet_tew-823dru
 	pad-rootfs
   IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \
 	append-string 00AP135AR9558-RT-131129-00 | check-size
-  IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
-	check-size
+  IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata
 endef
 TARGET_DEVICES += trendnet_tew-823dru
 
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index caaa01c92d..20cb2f60fa 100644
--- a/target/linux/ath79/image/nand.mk
+++ b/target/linux/ath79/image/nand.mk
@@ -166,8 +166,7 @@ define Device/netgear_ath79_nand
   IMAGES := sysupgrade.bin factory.img
   IMAGE/factory.img := append-kernel | append-ubi | netgear-dni | \
 	check-size
-  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | \
-	check-size
+  IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata
   UBINIZE_OPTS := -E 5
 endef
 
diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk
index 29e411c058..f4a03e2840 100644
--- a/target/linux/ath79/image/tiny.mk
+++ b/target/linux/ath79/image/tiny.mk
@@ -21,8 +21,7 @@ define Device/dlink_dir-615-e4
   FACTORY_IMAGE_SIZE := 3456k
   IMAGES += factory.bin
   IMAGE/default := append-kernel | append-rootfs | pad-rootfs
-  IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | \
-	check-size
+  IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata
   IMAGE/factory.bin := $$(IMAGE/default) | \
 	check-size $$$$(FACTORY_IMAGE_SIZE) | pad-to $$$$(FACTORY_IMAGE_SIZE) | \
 	append-string "AP99-AR7240-RT-091105-05"
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 68e565594d..9dee742eb4 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -35,7 +35,7 @@ define Device/DniImage
 	IMAGES += factory.img
 	IMAGE/factory.img := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | append-rootfs | pad-rootfs | netgear-dni
 	IMAGE/sysupgrade.bin := append-kernel | pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
-		append-rootfs | pad-rootfs | append-metadata | check-size
+		append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 
 define Build/append-rootfshdr
@@ -106,7 +106,7 @@ define Device/8dev_habanero-dvk
 	IMAGE_SIZE := 30976k
 	SOC := qcom-ipq4019
 	DEVICE_PACKAGES := ipq-wifi-8dev_habanero-dvk
-	IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | append-metadata | check-size
+	IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 TARGET_DEVICES += 8dev_habanero-dvk
 
@@ -207,7 +207,7 @@ define Device/avm_fritzbox-4040
 	UBOOT_PARTITION_SIZE := 524288
 	IMAGES += eva.bin
 	IMAGE/eva.bin := append-uboot | pad-to $$$$(UBOOT_PARTITION_SIZE) | append-kernel | append-rootfs | pad-rootfs
-	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size
+	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
 	DEVICE_PACKAGES := fritz-tffs fritz-caldata
 endef
 TARGET_DEVICES += avm_fritzbox-4040
@@ -822,7 +822,7 @@ define Device/zyxel_wre6606
 	DEVICE_DTS_CONFIG := config at 4
 	SOC := qcom-ipq4018
 	IMAGE_SIZE := 13184k
-	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size
+	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
 	DEVICE_PACKAGES := -kmod-ath10k-ct kmod-ath10k-ct-smallbuffers
 endef
 TARGET_DEVICES += zyxel_wre6606
diff --git a/target/linux/ipq40xx/image/mikrotik.mk b/target/linux/ipq40xx/image/mikrotik.mk
index 7c2fa52738..31497608be 100644
--- a/target/linux/ipq40xx/image/mikrotik.mk
+++ b/target/linux/ipq40xx/image/mikrotik.mk
@@ -7,7 +7,7 @@ define Device/mikrotik_nor
 	IMAGES = sysupgrade.bin
 	IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \
 		pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | \
-		append-metadata | check-size
+		check-size | append-metadata
 endef
 
 define Device/mikrotik_hap-ac2
diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
index e53fba1e1d..93e7ba3151 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -401,7 +401,7 @@ define Device/ubnt_unifi-ac-hd
 	BLOCKSIZE := 64k
 	IMAGE_SIZE := 14784k
 	DEVICE_PACKAGES := ath10k-firmware-qca9984-ct
-	IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | check-size
+	IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 TARGET_DEVICES += ubnt_unifi-ac-hd
 
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile
index c90975d098..ec10cd882a 100644
--- a/target/linux/lantiq/image/Makefile
+++ b/target/linux/lantiq/image/Makefile
@@ -63,7 +63,7 @@ define Device/Default
   SOC := $(DEFAULT_SOC)
   DEVICE_DTS = $$(SOC)_$(1)
   IMAGES := sysupgrade.bin
-  IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size
+  IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 
 define Device/NAND/xway
@@ -102,7 +102,7 @@ define Device/AVM
   KERNEL := kernel-bin | append-dtb | lzma | eva-image
   KERNEL_INITRAMFS := $$(KERNEL)
   IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-avm-fakeroot | \
-	append-rootfs | pad-rootfs | append-metadata | check-size
+	append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 
 ifeq ($(SUBTARGET),ase)
diff --git a/target/linux/lantiq/image/ar9.mk b/target/linux/lantiq/image/ar9.mk
index ea3836ea9d..a68868f0d9 100644
--- a/target/linux/lantiq/image/ar9.mk
+++ b/target/linux/lantiq/image/ar9.mk
@@ -90,10 +90,10 @@ define Device/netgear_dgn3500
 	factory-na.img factory.img
   IMAGE/sysupgrade-na.bin := \
 	append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "NA" | \
-	pad-rootfs | append-metadata | check-size
+	pad-rootfs | check-size | append-metadata
   IMAGE/sysupgrade.bin := \
 	append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "WW" | \
-	pad-rootfs | append-metadata | check-size
+	pad-rootfs | check-size | append-metadata
   IMAGE/factory-na.img := \
 	pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \
 	dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "NA" | pad-rootfs | \
@@ -119,7 +119,7 @@ define Device/netgear_dgn3500b
   IMAGES += factory.img
   IMAGE/sysupgrade.bin := \
 	append-kernel | append-rootfs | dgn3500-sercom-footer 0x0 "DE" | \
-	pad-rootfs | append-metadata | check-size
+	pad-rootfs | check-size | append-metadata
   IMAGE/factory.img := \
 	pad-extra $(DGN3500_KERNEL_OFFSET_DEC) | append-kernel | append-rootfs | \
 	dgn3500-sercom-footer $(DGN3500_KERNEL_OFFSET_HEX) "DE" | pad-rootfs | \
diff --git a/target/linux/lantiq/image/tp-link.mk b/target/linux/lantiq/image/tp-link.mk
index e269aacd02..756105b94c 100644
--- a/target/linux/lantiq/image/tp-link.mk
+++ b/target/linux/lantiq/image/tp-link.mk
@@ -14,7 +14,7 @@ define Device/lantiqTpLink
 	tplink-v2-header -s -V "ver. 1.0"
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin := tplink-v2-image -s -V "ver. 1.0" | \
-	append-metadata | check-size
+	check-size | append-metadata
 endef
 
 define Device/tplink_tdw8970
diff --git a/target/linux/lantiq/image/vr9.mk b/target/linux/lantiq/image/vr9.mk
index 5bc31314f8..d997866568 100644
--- a/target/linux/lantiq/image/vr9.mk
+++ b/target/linux/lantiq/image/vr9.mk
@@ -253,7 +253,7 @@ define Device/netgear_dm200
   IMAGE/sysupgrade.bin := append-kernel | \
 	pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
 	pad-offset 64k 64 | append-uImage-fakehdr filesystem | \
-	append-rootfs | pad-rootfs | append-metadata | check-size
+	append-rootfs | pad-rootfs | check-size | append-metadata
   IMAGE/factory.img := $$(IMAGE/sysupgrade.bin) | netgear-dni
   IMAGE_SIZE := 7872k
   NETGEAR_BOARD_ID := DM200
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index fc5223f3a4..cd2c425cef 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -166,7 +166,7 @@ define Device/Default
   IMAGES := sysupgrade.bin
   COMPILE :=
   sysupgrade_bin := append-kernel | append-rootfs | pad-rootfs
-  IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size
+  IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 
 define Device/netgear_sercomm_nor
@@ -175,7 +175,7 @@ define Device/netgear_sercomm_nor
   IMAGES += factory.img
   IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
 	pad-rootfs
-  IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size
+  IMAGE/sysupgrade.bin := $$(IMAGE/default) | check-size | append-metadata
   IMAGE/factory.img := pad-extra $$$$(SERCOMM_PAD) | $$(IMAGE/default) | \
 	pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | \
 	zip $$$$(SERCOMM_HWNAME).bin | sercom-seal
@@ -190,7 +190,7 @@ define Device/seama
   # - 36 bytes of META data (4-bytes aligned)
   IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs
   IMAGE/sysupgrade.bin := \
-	$$(IMAGE/default) | seama | pad-rootfs | append-metadata | check-size
+	$$(IMAGE/default) | seama | pad-rootfs | check-size | append-metadata
   IMAGE/factory.bin := \
 	$$(IMAGE/default) | pad-rootfs -x 64 | seama | seama-seal | check-size
   SEAMA_SIGNATURE :=
diff --git a/target/linux/ramips/image/common-tp-link.mk b/target/linux/ramips/image/common-tp-link.mk
index 07ad1ea250..915a086f98 100644
--- a/target/linux/ramips/image/common-tp-link.mk
+++ b/target/linux/ramips/image/common-tp-link.mk
@@ -11,8 +11,8 @@ define Device/tplink-v1
   KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v1-header -e -O
   IMAGES += factory.bin
   IMAGE/factory.bin := tplink-v1-image factory -e -O
-  IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade -e -O | append-metadata | \
-	check-size
+  IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade -e -O | check-size | \
+	append-metadata
 endef
 
 define Device/tplink-v2
@@ -26,8 +26,8 @@ define Device/tplink-v2
   KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e
   IMAGES += factory.bin
   IMAGE/factory.bin := tplink-v2-image -e
-  IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata | \
-	check-size
+  IMAGE/sysupgrade.bin := tplink-v2-image -s -e | check-size | \
+	append-metadata
 endef
 
 define Device/tplink-safeloader
@@ -39,6 +39,6 @@ define Device/tplink-safeloader
   KERNEL := $(KERNEL_DTB) | tplink-v1-header -e -O
   IMAGES += factory.bin
   IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
-	append-metadata | check-size
+	check-size | append-metadata
   IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
 endef
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 849bd31ef8..c3b9bc9f6b 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -327,7 +327,7 @@ define Device/edimax_br-6478ac-v2
   IMAGE_SIZE := 7744k
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
 	edimax-header -s CSYS -m RN68 -f 0x70000 -S 0x01100000 | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci \
 	kmod-usb-ledtrig-usbport
 endef
@@ -341,7 +341,7 @@ define Device/edimax_ew-7476rpc
   IMAGE_SIZE := 7744k
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
 	edimax-header -s CSYS -m RN79 -f 0x70000 -S 0x01100000 | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_PACKAGES := kmod-mt76x2 kmod-phy-realtek
 endef
 TARGET_DEVICES += edimax_ew-7476rpc
@@ -354,7 +354,7 @@ define Device/edimax_ew-7478ac
   IMAGE_SIZE := 7744k
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
 	edimax-header -s CSYS -m RN70 -f 0x70000 -S 0x01100000 | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_PACKAGES := kmod-mt76x2 kmod-phy-realtek
 endef
 TARGET_DEVICES += edimax_ew-7478ac
@@ -367,7 +367,7 @@ define Device/edimax_ew-7478apc
   IMAGE_SIZE := 7744k
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
 	edimax-header -s CSYS -m RN75 -f 0x70000 -S 0x01100000 | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci \
 	kmod-usb-ledtrig-usbport
 endef
@@ -407,7 +407,7 @@ define Device/fon_fon2601
   DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci
   KERNEL_INITRAMFS := $$(KERNEL) | uimage-padhdr
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | uimage-padhdr | \
-	pad-rootfs | append-metadata | check-size
+	pad-rootfs | check-size | append-metadata
 endef
 TARGET_DEVICES += fon_fon2601
 
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index cf3225dc81..a11fa21fb4 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -289,7 +289,7 @@ define Device/dlink_dir-8xx-a1
   KERNEL_INITRAMFS := $$(KERNEL) | uimage-padhdr 96
   IMAGES += factory.bin
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\
-	pad-rootfs | append-metadata | check-size
+	pad-rootfs | check-size | append-metadata
   IMAGE/factory.bin := append-kernel | append-rootfs | uimage-padhdr 96 |\
 	check-size
 endef
@@ -440,7 +440,7 @@ define Device/edimax_re23s
   DEVICE_ALT0_MODEL := Gemini RE23S
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
 	edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   IMAGES += factory.bin
   IMAGE/factory.bin := append-kernel | append-rootfs | \
 	edimax-header -s CSYS -m RN76 -f 0x70000 -S 0x01100000 | pad-rootfs | \
@@ -824,7 +824,7 @@ define Device/linksys_ea7xxx
 	uboot-envtools
   UBINIZE_OPTS := -E 5
   IMAGES := sysupgrade.bin factory.bin
-  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata | check-size
+  IMAGE/sysupgrade.bin := sysupgrade-tar | check-size | append-metadata
   IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \
 	append-ubi | check-size | linksys-image type=$$$$(LINKSYS_HWNAME)
 endef
@@ -901,8 +901,8 @@ define Device/MikroTik
   KERNEL_NAME := vmlinuz
   KERNEL := kernel-bin | append-dtb-elf
   IMAGE/sysupgrade.bin := append-kernel | kernel2minor -s 1024 | \
-	pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | \
-	check-size
+	pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | \
+	append-metadata
 endef
 
 define Device/mikrotik_routerboard-750gr3
diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk
index 4edc2eb3c4..6c339dcba1 100644
--- a/target/linux/ramips/image/rt305x.mk
+++ b/target/linux/ramips/image/rt305x.mk
@@ -500,7 +500,7 @@ define Device/edimax_3g-6200n
   IMAGE_SIZE := 3648k
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
 	edimax-header -s CSYS -m 3G62 -f 0x50000 -S 0x01100000 | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_VENDOR := Edimax
   DEVICE_MODEL := 3g-6200n
   SUPPORTED_DEVICES += 3g-6200n
@@ -513,7 +513,7 @@ define Device/edimax_3g-6200nl
   IMAGE_SIZE := 3648k
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
 	edimax-header -s CSYS -m 3G62 -f 0x50000 -S 0x01100000 | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_VENDOR := Edimax
   DEVICE_MODEL := 3g-6200nl
   SUPPORTED_DEVICES += 3g-6200nl
@@ -1047,7 +1047,7 @@ define Device/trendnet_tew-638apb-v2
   BLOCKSIZE := 64k
   IMAGE_SIZE := 3776k
   IMAGE/sysupgrade.bin := $$(sysupgrade_bin) | umedia-header 0x026382 | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_VENDOR := TRENDnet
   DEVICE_MODEL := TEW-638APB
   DEVICE_VARIANT := v2
diff --git a/target/linux/ramips/image/rt3883.mk b/target/linux/ramips/image/rt3883.mk
index 1b46d570fd..148bfbbe44 100644
--- a/target/linux/ramips/image/rt3883.mk
+++ b/target/linux/ramips/image/rt3883.mk
@@ -52,7 +52,7 @@ define Device/edimax_br-6475nd
   IMAGE_SIZE := 7744k
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | \
 	edimax-header -s CSYS -m RN54 -f 0x70000 -S 0x01100000 | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
   DEVICE_VENDOR := Edimax
   DEVICE_MODEL := BR-6475nD
   SUPPORTED_DEVICES += br-6475nd
diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile
index ebc0c0a784..cf0d588851 100644
--- a/target/linux/realtek/image/Makefile
+++ b/target/linux/realtek/image/Makefile
@@ -24,7 +24,7 @@ define Device/Default
   DEVICE_DTS = $$(SOC)_$(1)
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin := append-kernel | pad-to 64k | append-rootfs | pad-rootfs | \
-	append-metadata | check-size
+	check-size | append-metadata
 endef
 
 # "NGE" refers to the uImage magic


From lede-commits at lists.infradead.org  Sat Jul 10 14:14:26 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 10 Jul 2021 17:14:26 -0400
Subject: [openwrt/openwrt]  lua: make it easier to detect host-built Lua
In-Reply-To: <162595166673.16003.5261578716298793760@git-01.infra.openwrt.org>
References: <162595166673.16003.5261578716298793760@git-01.infra.openwrt.org>
Message-ID: <mailman.6634.1625951674.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/315f52e0f3bfa3d65ad14ca21a696c6d31c4edcd

commit 315f52e0f3bfa3d65ad14ca21a696c6d31c4edcd
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat Jul 10 20:21:26 2021 +0100

    lua: make it easier to detect host-built Lua
    
    Install pkg-config file also for host-build, clean up Lua symlinks.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/utils/lua/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile
index d262d1e1fc..e15142d8d2 100644
--- a/package/utils/lua/Makefile
+++ b/package/utils/lua/Makefile
@@ -134,8 +134,12 @@ define Host/Install
 		INSTALL_TOP="$(STAGING_DIR_HOSTPKG)" \
 		install
 
-	$(LN) $(STAGING_DIR_HOSTPKG)/bin/lua5.1 $(STAGING_DIR_HOSTPKG)/bin/lua
-	$(LN) $(STAGING_DIR_HOSTPKG)/bin/luac5.1 $(STAGING_DIR_HOSTPKG)/bin/luac
+	$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/lib/pkgconfig
+	$(CP) $(HOST_BUILD_DIR)/etc/lua.pc $(STAGING_DIR_HOSTPKG)/lib/pkgconfig/lua5.1.pc
+
+	$(LN) lua5.1 $(STAGING_DIR_HOSTPKG)/bin/lua
+	$(LN) luac5.1 $(STAGING_DIR_HOSTPKG)/bin/luac
+	$(LN) lua5.1.pc $(STAGING_DIR_HOSTPKG)/lib/pkgconfig/lua.pc
 endef
 
 define Build/InstallDev


From lede-commits at lists.infradead.org  Sat Jul 10 15:02:11 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 10 Jul 2021 18:02:11 -0400
Subject: [openwrt/openwrt]  procd: update to git HEAD
In-Reply-To: <162595453161.23860.13226409587177455866@git-01.infra.openwrt.org>
References: <162595453161.23860.13226409587177455866@git-01.infra.openwrt.org>
Message-ID: <mailman.6635.1625954535.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f46a38a1ac83f8ce715e6fe03ec4192202527ca8

commit f46a38a1ac83f8ce715e6fe03ec4192202527ca8
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat Jul 10 22:43:47 2021 +0100

    procd: update to git HEAD
    
     2dcefbd jail: add support for cgroup devices as in OCI run-time spec
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 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 2b0ea6d119..36e7f11c29 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2021-05-05
-PKG_SOURCE_VERSION:=021ece84de430fca988acd6934f6046ea59d8c37
-PKG_MIRROR_HASH:=edbe464cadbae000f4a48a6f1e6a0f5d27ae3ad521e308205252ad89639b6f9d
+PKG_SOURCE_DATE:=2021-07-10
+PKG_SOURCE_VERSION:=2dcefbd6094681dcbd2d7ff608590e74425a9220
+PKG_MIRROR_HASH:=6f2615230a1db09740e8125517488a53b62baef0731b9adbd377765cad130289
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Sat Jul 10 16:39:27 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 10 Jul 2021 19:39:27 -0400
Subject: [openwrt/openwrt] ipq40xx: increase SPI frequency for Zyxel NBG6617
In-Reply-To: <162596036783.6894.14244774859480860774@git-01.infra.openwrt.org>
References: <162596036783.6894.14244774859480860774@git-01.infra.openwrt.org>
Message-ID: <mailman.6636.1625960372.1072.lede-commits@lists.infradead.org>

chunkeey pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/88f39b72da6ceb5f2f87692369dc41e9c9cced12

commit 88f39b72da6ceb5f2f87692369dc41e9c9cced12
Author: Dmitry Tunin <hanipouspilot at gmail.com>
AuthorDate: Fri Jul 9 13:33:15 2021 +0300

    ipq40xx: increase SPI frequency for Zyxel NBG6617
    
    The mx25l25635f supports clock speed up to 50Mhz.
    
    Also remove obsolete "mx25l25635f" hack and rename
    the matching device-tree flash node.
    
    Signed-off-by: Dmitry Tunin <hanipouspilot at gmail.com>
    [mention node rename as well. chip is very very likely
    always the "f" revision for all NBG6617]
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 .../linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts
index 4d17325c8d..caafc1beb4 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts
@@ -210,10 +210,10 @@
 	status = "okay";
 	cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
 
-	mx25l25635f at 0 {
-		compatible = "mx25l25635f", "jedec,spi-nor";
+	flash at 0 {
+		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <24000000>;
+		spi-max-frequency = <50000000>;
 		status = "okay";
 		m25p,fast-read;
 


From lede-commits at lists.infradead.org  Sun Jul 11 07:08:44 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 11 Jul 2021 10:08:44 -0400
Subject: [openwrt/openwrt] iwinfo: update to latest Git HEAD and move device
 info into -data package
In-Reply-To: <162601252460.18735.15696511882905290624@git-01.infra.openwrt.org>
References: <162601252460.18735.15696511882905290624@git-01.infra.openwrt.org>
Message-ID: <mailman.6719.1626012529.1072.lede-commits@lists.infradead.org>

jow pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/c13d7c82aa4cd2cbf1f61bad857cd01b795318e3

commit c13d7c82aa4cd2cbf1f61bad857cd01b795318e3
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Sun Jul 11 15:59:48 2021 +0200

    iwinfo: update to latest Git HEAD and move device info into -data package
    
    a0a0e02 iwinfo: rename hardware.txt to devices.txt
    
    Also split common devices.txt (former hardware.txt) into a common
    libiwinfo-data package to allow different libiwinfo versions to
    coexist without file clashes.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 package/network/utils/iwinfo/Makefile | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile
index 3802d8d614..9dbf91efe9 100644
--- a/package/network/utils/iwinfo/Makefile
+++ b/package/network/utils/iwinfo/Makefile
@@ -7,13 +7,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libiwinfo
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
-PKG_SOURCE_DATE:=2021-06-28
-PKG_SOURCE_VERSION:=c9b1672f5a83c8dcb14fdbaee651f775a7defe52
-PKG_MIRROR_HASH:=f33779035153da6bd0b2f100f402f62f1554ab87ed6fbbd938d41df6b9947a1f
+PKG_SOURCE_DATE:=2021-07-11
+PKG_SOURCE_VERSION:=a0a0e02dd91d14a50155390d5fd3b95d6ec87bf4
+PKG_MIRROR_HASH:=7b4f745c2cace836e57bd116399973d9ac32cee7f98d4628a17395caa3d0cebc
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=GPL-2.0
 
@@ -26,7 +26,7 @@ define Package/libiwinfo
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Generalized Wireless Information Library (iwinfo)
-  DEPENDS:=+libnl-tiny +libuci +libubus
+  DEPENDS:=+libnl-tiny +libuci +libubus +libiwinfo-data
   ABI_VERSION:=$(IWINFO_ABI_VERSION)
 endef
 
@@ -50,6 +50,12 @@ define Package/libiwinfo-lua/description
 endef
 
 
+define Package/libiwinfo-data
+  TITLE:=libiwinfo Lua binding
+  HIDDEN:=1
+endef
+
+
 define Package/iwinfo
   SECTION:=utils
   CATEGORY:=Utilities
@@ -90,8 +96,6 @@ endef
 define Package/libiwinfo/install
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so.$(IWINFO_ABI_VERSION) $(1)/usr/lib/libiwinfo.so.$(IWINFO_ABI_VERSION)
-	$(INSTALL_DIR) $(1)/usr/share/libiwinfo
-	$(INSTALL_DATA) $(PKG_BUILD_DIR)/hardware.txt $(1)/usr/share/libiwinfo/hardware.txt
 endef
 
 define Package/libiwinfo-lua/install
@@ -99,6 +103,11 @@ define Package/libiwinfo-lua/install
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so
 endef
 
+define Package/libiwinfo-data/install
+	$(INSTALL_DIR) $(1)/usr/share/libiwinfo
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/devices.txt $(1)/usr/share/libiwinfo/devices.txt
+endef
+
 define Package/iwinfo/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo $(1)/usr/bin/iwinfo
@@ -106,4 +115,5 @@ endef
 
 $(eval $(call BuildPackage,libiwinfo))
 $(eval $(call BuildPackage,libiwinfo-lua))
+$(eval $(call BuildPackage,libiwinfo-data))
 $(eval $(call BuildPackage,iwinfo))


From lede-commits at lists.infradead.org  Sun Jul 11 07:09:38 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 11 Jul 2021 10:09:38 -0400
Subject: [openwrt/openwrt] build: ensure that dash isn't prepended twice to
 abi version suffix
In-Reply-To: <162601257701.19520.908517130042561479@git-01.infra.openwrt.org>
References: <162601257701.19520.908517130042561479@git-01.infra.openwrt.org>
Message-ID: <mailman.6720.1626012581.1072.lede-commits@lists.infradead.org>

jow pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/d3278c4343856bb2ebd1badca93234fb815d6a8c

commit d3278c4343856bb2ebd1badca93234fb815d6a8c
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Tue Jun 15 09:54:45 2021 +0200

    build: ensure that dash isn't prepended twice to abi version suffix
    
    The ABIV_$(pkgname) variable already is formatted so return it as-is from
    the GetABISuffix macro and only filter through FormatABISuffix if we read
    the raw ABI version value from a version stamp file.
    
    This ensures that binary intra-package dependencies on ABI versioned
    libraries are properly formatted.
    
    Ref: https://github.com/openwrt/packages/issues/15871
    Fixes: f6a03bff5b ("build: prepend ABI suffixes with a dash if package name ends with digit")
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
    (cherry picked from commit fbb9b1f8ed0d8a76dd989cc6c16a4e0fda2b6e74)
---
 include/feeds.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/feeds.mk b/include/feeds.mk
index e499ac2684..632fecb4a3 100644
--- a/include/feeds.mk
+++ b/include/feeds.mk
@@ -43,7 +43,7 @@ endef
 
 # 1: package name
 define GetABISuffix
-$(call FormatABISuffix,$(1),$(if $(ABIV_$(1)),$(ABIV_$(1)),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
+$(if $(ABIV_$(1)),$(ABIV_$(1)),$(call FormatABISuffix,$(1),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
 endef
 
 # 1: package name


From lede-commits at lists.infradead.org  Sun Jul 11 07:09:37 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 11 Jul 2021 10:09:37 -0400
Subject: [openwrt/openwrt] build: prepend ABI suffixes with a dash if
 package name ends with digit
In-Reply-To: <162601257701.19520.908517130042561479@git-01.infra.openwrt.org>
References: <162601257701.19520.908517130042561479@git-01.infra.openwrt.org>
Message-ID: <mailman.6721.1626012582.1072.lede-commits@lists.infradead.org>

jow pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/47f617ef8d44e4d7428ff3e0b42acb4a75f5cd37

commit 47f617ef8d44e4d7428ff3e0b42acb4a75f5cd37
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Mon Jun 14 14:58:37 2021 +0200

    build: prepend ABI suffixes with a dash if package name ends with digit
    
    Ensure that ABI suffixes are separated with a dash from the package name if
    the name happens to end with a digit. This implementation detail got lost
    during the recent refactoring of the ABI_VERSION handling in buildroot.
    
    Ref: https://github.com/openwrt/packages/pull/14237#issuecomment-860473585
    Fixes: c921650382 ("build: drop ABI version from metadata")
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
    (cherry picked from commit f6a03bff5bccdbf9165087bccbb35095903d05c6)
---
 include/feeds.mk        | 8 +++++++-
 include/package-ipkg.mk | 2 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/include/feeds.mk b/include/feeds.mk
index 98e315bceb..e499ac2684 100644
--- a/include/feeds.mk
+++ b/include/feeds.mk
@@ -43,5 +43,11 @@ endef
 
 # 1: package name
 define GetABISuffix
-$(if $(filter-out kmod-%,$(1)),$(if $(ABIV_$(1)),$(ABIV_$(1)),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
+$(call FormatABISuffix,$(1),$(if $(ABIV_$(1)),$(ABIV_$(1)),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
+endef
+
+# 1: package name
+# 2: abi version
+define FormatABISuffix
+$(if $(filter-out kmod-%,$(1)),$(if $(2),$(if $(filter %0 %1 %2 %3 %4 %5 %6 %7 %8 %9,$(1)),-)$(2)))
 endef
diff --git a/include/package-ipkg.mk b/include/package-ipkg.mk
index c2017cd220..e972b7de0b 100644
--- a/include/package-ipkg.mk
+++ b/include/package-ipkg.mk
@@ -99,7 +99,7 @@ _endef=endef
 
 ifeq ($(DUMP),)
   define BuildTarget/ipkg
-    ABIV_$(1):=$(if $(filter-out kmod-%,$(1)),$(ABI_VERSION))
+    ABIV_$(1):=$(call FormatABISuffix,$(1),$(ABI_VERSION))
     PDIR_$(1):=$(call FeedPackageDir,$(1))
     IPKG_$(1):=$$(PDIR_$(1))/$(1)$$(ABIV_$(1))_$(VERSION)_$(PKGARCH).ipk
     IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)


From lede-commits at lists.infradead.org  Sun Jul 11 07:58:26 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 11 Jul 2021 10:58:26 -0400
Subject: [openwrt/openwrt]  ath79: add support for TP-Link RE455 v1
In-Reply-To: <162601550572.23756.259578557199288078@git-01.infra.openwrt.org>
References: <162601550572.23756.259578557199288078@git-01.infra.openwrt.org>
Message-ID: <mailman.6728.1626015512.1072.lede-commits@lists.infradead.org>

adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/af56075a8ff760832df27546325428f2497a0121

commit af56075a8ff760832df27546325428f2497a0121
Author: Roberto Valentini <valantin89 at gmail.com>
AuthorDate: Thu Jul 1 11:56:30 2021 +0200

    ath79: add support for TP-Link RE455 v1
    
    TP-Link RE455 v1 is a dual band router/range-extender based on
    Qualcomm/Atheros QCA9563 + QCA9880.
    
    This device is nearly identical to RE450 v3
    
    Specification:
    
    - 775 MHz CPU
    - 64 MB of RAM (DDR2)
    - 8 MB of FLASH (SPI NOR)
    - 3T3R 2.4 GHz
    - 3T3R 5 GHz
    - 1x 10/100/1000 Mbps Ethernet (AR8033 PHY)
    - 7x LED, 4x button
    - UART header on PCB[1]
    
    Flash instruction:
    Apply factory image in OEM firmware web-gui.
    
    [1] Didn't work, probably need to short unpopulated resistor R64
        and R69 as RE450v3
    
    Signed-off-by: Roberto Valentini <valantin89 at gmail.com>
---
 target/linux/ath79/dts/qca9563_tplink_re455-v1.dts | 52 ++++++++++++++++++++++
 .../ath79/generic/base-files/etc/board.d/01_leds   |  3 +-
 .../generic/base-files/etc/board.d/02_network      |  1 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata       |  3 +-
 target/linux/ath79/image/generic-tp-link.mk        | 12 +++++
 tools/firmware-utils/src/tplink-safeloader.c       | 40 +++++++++++++++++
 6 files changed, 109 insertions(+), 2 deletions(-)

diff --git a/target/linux/ath79/dts/qca9563_tplink_re455-v1.dts b/target/linux/ath79/dts/qca9563_tplink_re455-v1.dts
new file mode 100644
index 0000000000..b6c1efb846
--- /dev/null
+++ b/target/linux/ath79/dts/qca9563_tplink_re455-v1.dts
@@ -0,0 +1,52 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca9563_tplink_re450.dtsi"
+
+/ {
+	compatible = "tplink,re455-v1", "qca,qca9563";
+	model = "TP-Link RE455 v1";
+};
+
+&partitions {
+	partition at 0 {
+		label = "u-boot";
+		reg = <0x000000 0x020000>;
+		read-only;
+	};
+
+	info: partition at 20000 {
+		label = "info";
+		reg = <0x020000 0x002000>;
+		read-only;
+	};
+
+	partition at 22000 {
+		label = "partition-table";
+		reg = <0x022000 0x002000>;
+		read-only;
+	};
+
+	partition at 24000 {
+		label = "info2";
+		reg = <0x024000 0x00a000>;
+		read-only;
+	};
+
+	partition at 2e000 {
+		label = "config";
+		reg = <0x02e000 0x022000>;
+		read-only;
+	};
+
+	partition at 50000 {
+		compatible = "tplink,firmware";
+		label = "firmware";
+		reg = <0x050000 0x7a0000>;
+	};
+
+	art: partition at 7f0000 {
+		label = "art";
+		reg = <0x7f0000 0x010000>;
+		read-only;
+	};
+};
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 890b38e58a..5e5ccca32f 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
@@ -352,7 +352,8 @@ tplink,tl-wr902ac-v1)
 tplink,re355-v1|\
 tplink,re450-v1|\
 tplink,re450-v2|\
-tplink,re450-v3)
+tplink,re450-v3|\
+tplink,re455-v1)
 	ucidef_set_led_netdev "lan_data" "LAN Data" "green:lan_data" "eth0" "tx rx"
 	ucidef_set_led_netdev "lan_link" "LAN Link" "green:lan_link" "eth0" "link"
 	;;
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 025d55fec0..1731f141af 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
@@ -70,6 +70,7 @@ ath79_setup_interfaces()
 	tplink,re450-v1|\
 	tplink,re450-v2|\
 	tplink,re450-v3|\
+	tplink,re455-v1|\
 	tplink,tl-wr902ac-v1|\
 	ubnt,bullet-ac|\
 	ubnt,bullet-m-ar7240|\
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 8d7407450d..59d692c3d0 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -141,7 +141,8 @@ case "$FIRMWARE" in
 		;;
 	tplink,eap245-v1|\
 	tplink,re450-v2|\
-	tplink,re450-v3)
+	tplink,re450-v3|\
+	tplink,re455-v1)
 		caldata_extract "art" 0x5000 0x844
 		ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary info 0x8) 1)
 		;;
diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index 9c4920b4e6..16494b111f 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -486,6 +486,18 @@ define Device/tplink_re450-v3
 endef
 TARGET_DEVICES += tplink_re450-v3
 
+define Device/tplink_re455-v1
+  $(Device/tplink-safeloader)
+  SOC := qca9563
+  IMAGE_SIZE := 7808k
+  DEVICE_MODEL := RE455
+  DEVICE_VARIANT := v1
+  DEVICE_PACKAGES := kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
+  TPLINK_BOARD_ID := RE455-V1
+  LOADER_TYPE := elf
+endef
+TARGET_DEVICES += tplink_re455-v1
+
 define Device/tplink_tl-mr6400-v1
   $(Device/tplink-8mlzma)
   SOC := qca9531
diff --git a/tools/firmware-utils/src/tplink-safeloader.c b/tools/firmware-utils/src/tplink-safeloader.c
index 432044882c..4e7549d5e6 100644
--- a/tools/firmware-utils/src/tplink-safeloader.c
+++ b/tools/firmware-utils/src/tplink-safeloader.c
@@ -2431,6 +2431,46 @@ static struct device_info boards[] = {
 		.last_sysupgrade_partition = "file-system"
 	},
 
+	/** Firmware layout for the RE455 v1 */
+	{
+		.id     = "RE455-V1",
+		.vendor = "",
+		.support_list =
+			"SupportList:\r\n"
+			"{product_name:RE455,product_ver:1.0.0,special_id:00000000}\r\n"
+			"{product_name:RE455,product_ver:1.0.0,special_id:55530000}\r\n"
+			"{product_name:RE455,product_ver:1.0.0,special_id:45550000}\r\n"
+			"{product_name:RE455,product_ver:1.0.0,special_id:4A500000}\r\n"
+			"{product_name:RE455,product_ver:1.0.0,special_id:43410000}\r\n"
+			"{product_name:RE455,product_ver:1.0.0,special_id:41550000}\r\n"
+			"{product_name:RE455,product_ver:1.0.0,special_id:41530000}\r\n"
+			"{product_name:RE455,product_ver:1.0.0,special_id:4B520000}\r\n"
+			"{product_name:RE455,product_ver:1.0.0,special_id:42520000}\r\n",
+		.part_trail = 0x00,
+		.soft_ver = NULL,
+
+		/* We're using a dynamic kernel/rootfs split here */
+		.partitions = {
+			{"fs-uboot", 0x00000, 0x20000},
+			{"default-mac", 0x20000, 0x00020},
+			{"pin", 0x20020, 0x00020},
+			{"product-info", 0x21000, 0x01000},
+			{"partition-table", 0x22000, 0x02000},
+			{"soft-version", 0x24000, 0x01000},
+			{"support-list", 0x25000, 0x01000},
+			{"profile", 0x26000, 0x08000},
+			{"user-config", 0x2e000, 0x10000},
+			{"default-config", 0x3e000, 0x10000},
+			{"config-info", 0x4e000, 0x00400},
+			{"firmware", 0x50000, 0x7a0000},
+			{"radio", 0x7f0000, 0x10000},
+			{NULL, 0, 0}
+		},
+
+		.first_sysupgrade_partition = "os-image",
+		.last_sysupgrade_partition = "file-system"
+	},
+
 	/** Firmware layout for the RE500 */
 	{
 		.id     = "RE500-V1",


From lede-commits at lists.infradead.org  Sun Jul 11 07:58:25 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 11 Jul 2021 10:58:25 -0400
Subject: [openwrt/openwrt]  ramips: add support for Linksys EA8100 v2
In-Reply-To: <162601550572.23756.259578557199288078@git-01.infra.openwrt.org>
References: <162601550572.23756.259578557199288078@git-01.infra.openwrt.org>
Message-ID: <mailman.6731.1626015512.1072.lede-commits@lists.infradead.org>

adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/0c721434ea56044cdc1c13554c970b82471bc43e

commit 0c721434ea56044cdc1c13554c970b82471bc43e
Author: Tee Hao Wei <angelsl at in04.sg>
AuthorDate: Tue Jul 6 01:19:08 2021 +0800

    ramips: add support for Linksys EA8100 v2
    
    Specifications:
    - SoC: MT7621AT
    - RAM: 256MB
    - Flash: 128MB NAND
    - Ethernet: 5 Gigabit ports
    - WiFi: 2.4G/5G MT7615N
    - USB: 1 USB 3.0, 1 USB 2.0
    
    This device is very similar to the EA7300 v1/v2, EA7500 v2, and EA8100 v1.
    
    Installation:
    
    Upload the generated factory image through the factory web interface.
    
    (following part taken from EA7300 v2 commit message:)
    
    This might fail due to the A/B nature of this device. When flashing, OEM
    firmware writes over the non-booted partition. If booted from 'A',
    flashing over 'B' won't work. To get around this, you should flash the
    OEM image over itself. This will then boot the router from 'B' and
    allow you to flash OpenWRT without problems.
    
    Reverting to factory firmware:
    
    Hard-reset the router three times to force it to boot from 'B.' This is
    where the stock firmware resides. To remove any traces of OpenWRT from
    your router simply flash the OEM image at this point.
    
    With thanks to Tom Wizetek (@wizetek) for testing.
    
    Signed-off-by: Tee Hao Wei <angelsl at in04.sg>
---
 package/boot/uboot-envtools/files/ramips                          | 1 +
 target/linux/ramips/dts/mt7621_linksys_ea8100-v2.dts              | 8 ++++++++
 target/linux/ramips/image/mt7621.mk                               | 8 ++++++++
 target/linux/ramips/mt7621/base-files/etc/board.d/01_leds         | 3 ++-
 target/linux/ramips/mt7621/base-files/etc/board.d/02_network      | 3 ++-
 .../mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac     | 3 ++-
 target/linux/ramips/mt7621/base-files/etc/init.d/bootcount        | 3 ++-
 target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh     | 1 +
 8 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips
index 2bb04997f9..7941c106e4 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -54,6 +54,7 @@ linksys,ea7300-v1|\
 linksys,ea7300-v2|\
 linksys,ea7500-v2|\
 linksys,ea8100-v1|\
+linksys,ea8100-v2|\
 xiaomi,mi-router-3g|\
 xiaomi,mi-router-3-pro|\
 xiaomi,mi-router-4|\
diff --git a/target/linux/ramips/dts/mt7621_linksys_ea8100-v2.dts b/target/linux/ramips/dts/mt7621_linksys_ea8100-v2.dts
new file mode 100644
index 0000000000..db1429ea10
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_linksys_ea8100-v2.dts
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_linksys_ea7xxx.dtsi"
+
+/ {
+	compatible = "linksys,ea8100-v2", "mediatek,mt7621-soc";
+	model = "Linksys EA8100 v2";
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 63d28530b6..853741f9af 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -870,6 +870,14 @@ define Device/linksys_ea8100-v1
 endef
 TARGET_DEVICES += linksys_ea8100-v1
 
+define Device/linksys_ea8100-v2
+  $(Device/linksys_ea7xxx)
+  DEVICE_MODEL := EA8100
+  DEVICE_VARIANT := v2
+  LINKSYS_HWNAME := EA8100v2
+endef
+TARGET_DEVICES += linksys_ea8100-v2
+
 define Device/linksys_re6500
   $(Device/dsa-migration)
   IMAGE_SIZE := 7872k
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 cb889de208..9545d8d0c7 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
@@ -55,7 +55,8 @@ linksys,e5600)
 linksys,ea7300-v1|\
 linksys,ea7300-v2|\
 linksys,ea7500-v2|\
-linksys,ea8100-v1)
+linksys,ea8100-v1|\
+linksys,ea8100-v2)
 	ucidef_set_led_netdev "lan1" "lan1 link" "green:lan1" "lan1" "link"
 	ucidef_set_led_netdev "lan2" "lan2 link" "green:lan2" "lan2" "link"
 	ucidef_set_led_netdev "lan3" "lan3 link" "green:lan3" "lan3" "link"
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index aa1d644938..16148547f7 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -143,7 +143,8 @@ ramips_setup_macs()
 	linksys,ea7300-v1|\
 	linksys,ea7300-v2|\
 	linksys,ea7500-v2|\
-	linksys,ea8100-v1)
+	linksys,ea8100-v1|\
+	linksys,ea8100-v2)
 		lan_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
 		wan_mac=$lan_mac
 		label_mac=$lan_mac
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 24d73b039d..ee847e947b 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
@@ -28,7 +28,8 @@ case "$board" in
 	linksys,ea7300-v1|\
 	linksys,ea7300-v2|\
 	linksys,ea7500-v2|\
-	linksys,ea8100-v1)
+	linksys,ea8100-v1|\
+	linksys,ea8100-v2)
 		hw_mac_addr=$(mtd_get_mac_ascii devinfo hw_mac_addr)
 		[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
diff --git a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
index d3525ea0c9..7b4a63d663 100755
--- a/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
+++ b/target/linux/ramips/mt7621/base-files/etc/init.d/bootcount
@@ -12,7 +12,8 @@ boot() {
 	linksys,ea7300-v1|\
 	linksys,ea7300-v2|\
 	linksys,ea7500-v2|\
-	linksys,ea8100-v1)
+	linksys,ea8100-v1|\
+	linksys,ea8100-v2)
 		mtd resetbc s_env || true
 		;;
 	samknows,whitebox-v8)
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 c2ad4d3ed6..18fea53aee 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -63,6 +63,7 @@ platform_do_upgrade() {
 	linksys,ea7300-v2|\
 	linksys,ea7500-v2|\
 	linksys,ea8100-v1|\
+	linksys,ea8100-v2|\
 	netgear,r6220|\
 	netgear,r6260|\
 	netgear,r6350|\


From lede-commits at lists.infradead.org  Sun Jul 11 10:54:10 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 11 Jul 2021 13:54:10 -0400
Subject: [openwrt/openwrt]  iwinfo: move device info into -data package
In-Reply-To: <162602605087.21679.9276901058888624568@git-01.infra.openwrt.org>
References: <162602605087.21679.9276901058888624568@git-01.infra.openwrt.org>
Message-ID: <mailman.6740.1626026057.1072.lede-commits@lists.infradead.org>

jow pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/8921e36ed8563a81033944d7b625eadaa7b0234e

commit 8921e36ed8563a81033944d7b625eadaa7b0234e
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Sun Jul 11 15:59:48 2021 +0200

    iwinfo: move device info into -data package
    
    Backport upstream patch a0a0e02 ("iwinfo: rename hardware.txt to devices.txt")
    and split devices.txt (former hardware.txt) into a common libiwinfo-data
    package to allow different libiwinfo versions to coexist without file
    clashes.
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
    (backported from commit c13d7c82aa4cd2cbf1f61bad857cd01b795318e3)
---
 package/network/utils/iwinfo/Makefile              | 18 +++++++++++----
 ...iwinfo-rename-hardware.txt-to-devices.txt.patch | 26 ++++++++++++++++++++++
 2 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile
index b3ef261369..815c477988 100644
--- a/package/network/utils/iwinfo/Makefile
+++ b/package/network/utils/iwinfo/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libiwinfo
-PKG_RELEASE:=2
+PKG_RELEASE:=2.1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
@@ -26,7 +26,7 @@ define Package/libiwinfo
   SECTION:=libs
   CATEGORY:=Libraries
   TITLE:=Generalized Wireless Information Library (iwinfo)
-  DEPENDS:=+libnl-tiny +libuci +libubus
+  DEPENDS:=+libnl-tiny +libuci +libubus +libiwinfo-data
   ABI_VERSION:=$(IWINFO_ABI_VERSION)
 endef
 
@@ -50,6 +50,12 @@ define Package/libiwinfo-lua/description
 endef
 
 
+define Package/libiwinfo-data
+  TITLE:=libiwinfo Lua binding
+  HIDDEN:=1
+endef
+
+
 define Package/iwinfo
   SECTION:=utils
   CATEGORY:=Utilities
@@ -90,8 +96,6 @@ endef
 define Package/libiwinfo/install
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/libiwinfo.so.$(IWINFO_ABI_VERSION) $(1)/usr/lib/libiwinfo.so.$(IWINFO_ABI_VERSION)
-	$(INSTALL_DIR) $(1)/usr/share/libiwinfo
-	$(INSTALL_DATA) $(PKG_BUILD_DIR)/hardware.txt $(1)/usr/share/libiwinfo/hardware.txt
 endef
 
 define Package/libiwinfo-lua/install
@@ -99,6 +103,11 @@ define Package/libiwinfo-lua/install
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo.so $(1)/usr/lib/lua/iwinfo.so
 endef
 
+define Package/libiwinfo-data/install
+	$(INSTALL_DIR) $(1)/usr/share/libiwinfo
+	$(INSTALL_DATA) $(PKG_BUILD_DIR)/hardware.txt $(1)/usr/share/libiwinfo/devices.txt
+endef
+
 define Package/iwinfo/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/iwinfo $(1)/usr/bin/iwinfo
@@ -106,4 +115,5 @@ endef
 
 $(eval $(call BuildPackage,libiwinfo))
 $(eval $(call BuildPackage,libiwinfo-lua))
+$(eval $(call BuildPackage,libiwinfo-data))
 $(eval $(call BuildPackage,iwinfo))
diff --git a/package/network/utils/iwinfo/patches/0001-iwinfo-rename-hardware.txt-to-devices.txt.patch b/package/network/utils/iwinfo/patches/0001-iwinfo-rename-hardware.txt-to-devices.txt.patch
new file mode 100644
index 0000000000..f0cfaf372d
--- /dev/null
+++ b/package/network/utils/iwinfo/patches/0001-iwinfo-rename-hardware.txt-to-devices.txt.patch
@@ -0,0 +1,26 @@
+From a0a0e02dd91d14a50155390d5fd3b95d6ec87bf4 Mon Sep 17 00:00:00 2001
+From: Jo-Philipp Wich <jo at mein.io>
+Date: Sun, 11 Jul 2021 15:56:35 +0200
+Subject: [PATCH] iwinfo: rename hardware.txt to devices.txt
+
+Signed-off-by: Jo-Philipp Wich <jo at mein.io>
+---
+ include/iwinfo.h            | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/iwinfo.h b/include/iwinfo.h
+index f7097cc..8469ee7 100644
+--- a/include/iwinfo.h
++++ b/include/iwinfo.h
+@@ -255,7 +255,7 @@ struct iwinfo_hardware_entry {
+ 
+ extern const struct iwinfo_iso3166_label IWINFO_ISO3166_NAMES[];
+ 
+-#define IWINFO_HARDWARE_FILE	"/usr/share/libiwinfo/hardware.txt"
++#define IWINFO_HARDWARE_FILE	"/usr/share/libiwinfo/devices.txt"
+ 
+ 
+ struct iwinfo_ops {
+-- 
+2.30.2
+


From lede-commits at lists.infradead.org  Sun Jul 11 15:24:28 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 11 Jul 2021 18:24:28 -0400
Subject: [openwrt/openwrt] ramips: fix Wifi MAC address setup for D-Link
 DIR-853 R1
In-Reply-To: <162604226719.24440.16723490108836569872@git-01.infra.openwrt.org>
References: <162604226719.24440.16723490108836569872@git-01.infra.openwrt.org>
Message-ID: <mailman.6746.1626042273.1072.lede-commits@lists.infradead.org>

adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3ac13416ca67908a691d3ae3c9b08623a56e9c60

commit 3ac13416ca67908a691d3ae3c9b08623a56e9c60
Author: Adrian Schmutzler <freifunk at adrianschmutzler.de>
AuthorDate: Sun Jul 11 15:19:47 2021 +0200

    ramips: fix Wifi MAC address setup for D-Link DIR-853 R1
    
    Commands in 10_fix_wifi_mac were not properly concatenated, so
    this was also triggered for the second phy without giving a
    MAC address as argument.
    
    Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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 4349a3592d..711af4e3af 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
@@ -16,10 +16,10 @@ case "$board" in
 				> /sys${DEVPATH}/macaddress
 		;;
 	dlink,dir-853-r1)
-		[ "$PHYNBR" = "0" ] && \
-			base_mac=$(mtd_get_mac_binary factory 0x4)
-			base_mac=$(macaddr_add "$base_mac" -1)
+		if [ "$PHYNBR" = "0" ]; then
+			base_mac=$(macaddr_add "$(mtd_get_mac_binary factory 0x4)" -1)
 			macaddr_setbit_la "$base_mac" > /sys${DEVPATH}/macaddress
+		fi
 		;;
 	glinet,gl-mt1300)
 		[ "$PHYNBR" = "1" ] && \


From lede-commits at lists.infradead.org  Sun Jul 11 15:24:27 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 11 Jul 2021 18:24:27 -0400
Subject: [openwrt/openwrt]  ramips: add support for D-Link DIR-853 A3
In-Reply-To: <162604226719.24440.16723490108836569872@git-01.infra.openwrt.org>
References: <162604226719.24440.16723490108836569872@git-01.infra.openwrt.org>
Message-ID: <mailman.6747.1626042275.1072.lede-commits@lists.infradead.org>

adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/6639623e75b84de5cf4a657be7a80383309e290d

commit 6639623e75b84de5cf4a657be7a80383309e290d
Author: Karim Dehouche <karimdplay at gmail.com>
AuthorDate: Tue Aug 18 11:19:16 2020 +0400

    ramips: add support for D-Link DIR-853 A3
    
    Specifications:
    * SoC: MT7621AT
    * RAM: 256MB
    * Flash: 128MB NAND flash
    * WiFi: MT7615DN (2.4GHz+5Ghz) with DBDC
    * LAN: 5x1000M
    * Firmware layout is Uboot with extra 96 bytes in header
    * Base PCB is DIR-1360 REV1.0
    * LEDs Power Blue+Orange,Wan Blue+Orange,WPS Blue,"2.4G"Blue, "5G" Blue,
      USB Blue
    * Buttons Reset,WPS, Wifi
    
    MAC addresses on OEM firmware:
    
    lan      factory 0xe000   f4:*:*:a8:*:65  (label)
    wan      factory 0xe006   f4:*:*:a8:*:68
    2.4 GHz  [not on flash]   f6:*:*:c8:*:66
    5.0 GHz  factory 0x4      f4:*:*:a8:*:66
    
    The increment of the 4th byte for the 2.4g address appears to vary.
    Reported cases:
    
           5g                 2.4g         increment
     f4:XX:XX:a8:XX:66  f6:XX:XX:c8:XX:66  +0x20
     x0:xx:xx:68:xx:xx  x2:xx:xx:48:xx:xx  -0x20
     x4:xx:xx:6a:xx:xx  x6:xx:xx:4a:xx:xx  -0x20
    
    Since increment is inconsistent and there is no obvious pattern
    in swapping bytes, and the 2.4g address has local bit set anyway,
    it seems safer to use the LAN address with flipped byte here in
    order to prevent collisions between OpenWrt devices and OEM devices
    for this interface. This way we at least use an address as base
    that is definitely owned by the device at hand.
    
    Flashing instruction:
    
    The Dlink "Emergency Room" cannot be accessed through the reset
    button on this device. You can either use console or use the
    encrypted factory image availble in the openwrt forum.
    
    Once the encrypted image is flashed throuh the stock Dlink web
    interface, the sysupgrade images can be used.
    
    Header pins needs to be soldered near the WPS and Wifi buttons.
    
    The layout for the pins is (VCC,RX,TX,GND). No need to connect the VCC.
    
    the settings are:
    
    Bps/Par/Bits          : 57600 8N1
    Hardware Flow Control : No
    Software Flow Control : No
    
    Connect your client computer to LAN1 of the device
    Set your client IP address manually to 192.168.0.101 / 255.255.255.0.
    Call the recovery page or tftp for the device at http://192.168.0.1
    Use the provided emergency web GUI to upload and flash a new firmware to
    the device
    
    At the time of adding support the wireless config needs to be set up by
    editing the wireless config file:
    
     * Setting the country code is mandatory, otherwise the router loses
       connectivity at the next reboot. This is mandatory and can be done
       from luci. After setting the country code the router boots correctly.
       A reset with the reset button will fix the issue and the user has to
       reconfigure.
    
     * This is minor since the 5g interface does not come up online although
       it is not set as disabled. 2 options here:
    
       1- Either run the "wifi" command. Can be added from LUCI in system -
          startup - local startup and just add wifi above "exit 0".
    
       2- Or add the serialize option in the wireless config file as shown
          below. This one would work and bring both interfaces automatically
          at every boot:
    
          config wifi-device 'radio0'
              option serialize '1'
    
          config wifi-device 'radio1'
              option serialize '1'
    
    Signed-off-by: Karim Dehouche <karimdplay at gmail.com>
    [rebase, improve MAC table, update wireless config comment, fix
     2.4g macaddr setup]
    Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../linux/ramips/dts/mt7621_dlink_dir-853-a3.dts   | 204 +++++++++++++++++++++
 target/linux/ramips/image/mt7621.mk                |   7 +
 .../ramips/mt7621/base-files/etc/board.d/01_leds   |   9 +-
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac        |   5 +
 .../mt7621/base-files/lib/upgrade/platform.sh      |   1 +
 5 files changed, 223 insertions(+), 3 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts
new file mode 100644
index 0000000000..738bcdc7d6
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-853-a3.dts
@@ -0,0 +1,204 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "dlink,dir-853-a3", "mediatek,mt7621-soc";
+	model = "D-Link DIR-853 A3";
+
+	aliases {
+		label-mac-device = &gmac0;
+		led-boot = &led_power_orange;
+		led-failsafe = &led_power_blue;
+		led-running = &led_power_blue;
+		led-upgrade = &led_net_orange;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+
+		wifi {
+			label = "wifi";
+			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RFKILL>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_power_orange: power_orange {
+			label = "orange:power";
+			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+		};
+
+		led_power_blue: power_blue {
+			label = "blue:power";
+			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+		};
+
+		led_net_orange: net_orange {
+			label = "orange:net";
+			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
+		};
+
+		net_blue {
+			label = "blue:net";
+			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
+		};
+
+		usb_blue {
+			label = "blue:usb";
+			gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&xhci_ehci_port1>;
+			linux,default-trigger = "usbport";
+		};
+
+		wlan2g {
+			label = "blue:wlan2g";
+			gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0radio";
+		};
+
+		wlan5g {
+			label = "blue:wlan5g";
+			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1radio";
+		};
+	};
+};
+
+&nand {
+	status = "okay";
+
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition at 0 {
+			label = "u-boot";
+			reg = <0x0 0x80000>;
+			read-only;
+		};
+
+		partition at 80000 {
+			label = "config";
+			reg = <0x80000 0x80000>;
+			read-only;
+		};
+
+		factory: partition at 100000 {
+			label = "factory";
+			reg = <0x100000 0x40000>;
+			read-only;
+		};
+
+		partition at 140000 {
+			label = "config2";
+			reg = <0x140000 0x40000>;
+			read-only;
+		};
+
+		partition at 180000 {
+			label = "firmware";
+			compatible = "openwrt,uimage", "denx,uimage";
+			openwrt,padding = <96>;
+			reg = <0x180000 0x2800000>;
+		};
+
+		partition at 2980000 {
+			label = "private";
+			reg = <0x2980000 0x2000000>;
+			read-only;
+		};
+
+		partition at 4980000 {
+			label = "firmware2";
+			reg = <0x4980000 0x2800000>;
+		};
+
+		partition at 7180000 {
+			label = "mydlink";
+			reg = <0x7180000 0x600000>;
+			read-only;
+		};
+
+		partition at 7780000 {
+			label = "reserved";
+			reg = <0x7780000 0x880000>;
+			read-only;
+		};
+	};
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie0 {
+	wifi at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x0>;
+		/* 5 GHz (phy1) does not take the address from calibration data,
+		   but setting it manually here works */
+		mtd-mac-address = <&factory 0x4>;
+	};
+};
+
+&gmac0 {
+	mtd-mac-address = <&factory 0xe000>;
+};
+
+&switch0 {
+	ports {
+		port at 0 {
+			status = "okay";
+			label = "lan4";
+		};
+
+		port at 1 {
+			status = "okay";
+			label = "lan3";
+		};
+
+		port at 2 {
+			status = "okay";
+			label = "lan2";
+		};
+
+		port at 3 {
+			status = "okay";
+			label = "lan1";
+		};
+
+		port at 4 {
+			status = "okay";
+			label = "wan";
+			mtd-mac-address = <&factory 0xe006>;
+		};
+	};
+};
+
+&state_default {
+	gpio {
+		groups = "i2c", "uart2", "uart3", "jtag", "wdt";
+		function = "gpio";
+	};
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 853741f9af..ea0c3fc619 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -342,6 +342,13 @@ define Device/dlink_dir-2660-a1
 endef
 TARGET_DEVICES += dlink_dir-2660-a1
 
+define Device/dlink_dir-853-a3
+  $(Device/dlink_dir-xx60-a1)
+  DEVICE_MODEL := DIR-853
+  DEVICE_VARIANT := A3
+endef
+TARGET_DEVICES += dlink_dir-853-a3
+
 define Device/dlink_dir-853-r1
   $(Device/dlink_dir-8xx-r1)
   DEVICE_MODEL := DIR-853
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 9545d8d0c7..d01ba53568 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
@@ -23,9 +23,6 @@ d-team,newifi-d2)
 	ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "blue:wlan2g" "wlan0"
 	ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "blue:wlan5g" "wlan1"
 	;;
-dlink,dir-853-r1)
-	ucidef_set_led_netdev "internet" "internet" "blue:net" "wan"
-	;;
 d-team,pbr-m1|\
 gehua,ghl-r-001|\
 jcg,y2|\
@@ -37,6 +34,12 @@ dlink,dir-2640-a1|\
 dlink,dir-2660-a1)
 	ucidef_set_led_netdev "wan" "wan" "white:net" "wan"
 	;;
+dlink,dir-853-a3)
+	ucidef_set_led_netdev "wan" "wan" "blue:net" "wan"
+	;;
+dlink,dir-853-r1)
+	ucidef_set_led_netdev "internet" "internet" "blue:net" "wan"
+	;;
 dlink,dir-860l-b1|\
 dlink,dir-867-a1|\
 dlink,dir-878-a1|\
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 ee847e947b..4349a3592d 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
@@ -10,6 +10,11 @@ PHYNBR=${DEVPATH##*/phy}
 board=$(board_name)
 
 case "$board" in
+	dlink,dir-853-a3)
+		[ "$PHYNBR" = "0" ] && \
+			macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \
+				> /sys${DEVPATH}/macaddress
+		;;
 	dlink,dir-853-r1)
 		[ "$PHYNBR" = "0" ] && \
 			base_mac=$(mtd_get_mac_binary factory 0x4)
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 18fea53aee..ef9b680f32 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -56,6 +56,7 @@ platform_do_upgrade() {
 	dlink,dir-1960-a1|\
 	dlink,dir-2640-a1|\
 	dlink,dir-2660-a1|\
+	dlink,dir-853-a3|\
 	hiwifi,hc5962|\
 	jcg,q20|\
 	linksys,e5600|\


From lede-commits at lists.infradead.org  Sun Jul 11 15:40:15 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 11 Jul 2021 18:40:15 -0400
Subject: [openwrt/openwrt]  uboot-mediatek: several fixes for MT7622
In-Reply-To: <162604321560.4397.15033166303268686812@git-01.infra.openwrt.org>
References: <162604321560.4397.15033166303268686812@git-01.infra.openwrt.org>
Message-ID: <mailman.6771.1626043222.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/349e2b7e658290f967a4aab4fd9d754572f9b0b2

commit 349e2b7e658290f967a4aab4fd9d754572f9b0b2
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Jul 11 15:32:34 2021 +0100

    uboot-mediatek: several fixes for MT7622
    
     * ! Behavior change !
    
       Old behavior: If the Reset button is held down during power-on
       do factory reset and try booting recovery from TFTP forever.
       If valid recovery is received via TFTP, write it to flash and boot.
    
       New behavior: If the Reset button is held down during power-on
       do factory reset, then try TFTP *once*, then try booting on-flash
       recovery, then keep trying via TFTP forever until a valid image is
       received.
       Only if there is no bootable recovery stored on flash, store the
       downloaded recovery. Then boot it.
    
     * Set loadaddr to 0x48000000 in order to allow booting images larger
       than ~47MB (reported by Oskari Lemmel?). Setting loadaddr to
       0x48000000 gives us 384MB on devices with 512MB RAM, which should be
       more than enough as a maximum size for uImage.FIT to be loaded.
    
     * Widely unify device-specific default environment in preparation to
       auto-generate it from parameters.
    
     * backport upstream commit fixing MBR/DOS partitioning
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...os.c-Fix-a-variable-typo-in-write_mbr_par.patch |  26 +++++
 .../404-add-bananapi_bpi-r64_defconfigs.patch      | 117 +++++++++++----------
 .../patches/410-add-linksys-e8450.patch            |  51 ++++-----
 .../patches/412-add-ubnt-unifi-6-lr.patch          |  23 ++--
 4 files changed, 123 insertions(+), 94 deletions(-)

diff --git a/package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch b/package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch
new file mode 100644
index 0000000000..8432053ea0
--- /dev/null
+++ b/package/boot/uboot-mediatek/patches/001-disk-part_dos.c-Fix-a-variable-typo-in-write_mbr_par.patch
@@ -0,0 +1,26 @@
+From c7d1b1890880ee64786b92a1b95ba9ecb4694997 Mon Sep 17 00:00:00 2001
+From: Christian Melki <christian.melki at t2data.com>
+Date: Mon, 7 Jun 2021 11:21:15 +0200
+Subject: [PATCH] disk/part_dos.c: Fix a variable typo in
+ write_mbr_partitions()
+
+This function is passed *dev not *dev_desc, so pass the right name to
+part_init().
+
+Fixes: f14c5ee5ab8b ("disk: part_dos: update partition table entries after write")
+Signed-off-by: Christian Melki <christian.melki at t2data.com>
+---
+ disk/part_dos.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/disk/part_dos.c
++++ b/disk/part_dos.c
+@@ -424,7 +424,7 @@ int write_mbr_partitions(struct blk_desc
+ 	}
+ 
+ 	/* Update the partition table entries*/
+-	part_init(dev_desc);
++	part_init(dev);
+ 
+ 	return 0;
+ }
diff --git a/package/boot/uboot-mediatek/patches/404-add-bananapi_bpi-r64_defconfigs.patch b/package/boot/uboot-mediatek/patches/404-add-bananapi_bpi-r64_defconfigs.patch
index 72913e4d2f..9e694c9c8b 100644
--- a/package/boot/uboot-mediatek/patches/404-add-bananapi_bpi-r64_defconfigs.patch
+++ b/package/boot/uboot-mediatek/patches/404-add-bananapi_bpi-r64_defconfigs.patch
@@ -161,10 +161,10 @@
 +CONFIG_USB_STORAGE=y
 --- /dev/null
 +++ b/bananapi_bpi-r64-sdmmc_env
-@@ -0,0 +1,81 @@
+@@ -0,0 +1,82 @@
 +ipaddr=192.168.1.1
 +serverip=192.168.1.254
-+loadaddr=0x4007ff28
++loadaddr=0x48000000
 +bootargs=root=/dev/mmcblk1p65
 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_sdmmc ; fi
 +bootconf=config-mt7622-bananapi-bpi-r64-pcie1
@@ -172,9 +172,11 @@
 +bootconf_sata=config-mt7622-bananapi-bpi-r64-sata
 +bootdelay=0
 +bootfile=openwrt-mediatek-mt7622-bananapi_bpi-r64-initramfs-recovery.itb
-+bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb
-+bootfile_emmcbl3=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-bl31-uboot.fip
 +bootfile_emmcbl2=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-preloader.bin
++bootfile_emmcbl3=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-bl31-uboot.fip
++bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb
++bootled_pwr=bpi-r64:pio:green
++bootled_rec=bpi-r64:pio:blue
 +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
 +bootmenu_default=0
 +bootmenu_delay=0
@@ -184,34 +186,33 @@
 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
 +bootmenu_2=Boot production system from SD card.=run boot_production ; run bootmenu_confirm_return
 +bootmenu_3=Boot recovery system from SD card.=run boot_recovery ; run bootmenu_confirm_return
-+bootmenu_4=Load production system via TFTP then write to SD card.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return
-+bootmenu_5=Load recovery system via TFTP then write to SD card.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return
++bootmenu_4=Load production system via TFTP then write to SD card.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_5=Load recovery system via TFTP then write to SD card.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
 +bootmenu_6=[31mInstall bootloader, recovery and production to eMMC.[0m=run emmc_init ; run bootmenu_confirm_return
 +bootmenu_7=[31mInstall bootloader, recovery and production to NAND.[0m=run ubi_init ; run bootmenu_confirm_return
 +bootmenu_8=Reboot.=reset
 +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
-+boot_default=run bootcmd ; run boot_recovery ; run boot_tftp_forever
-+boot_first=if button reset ; then run boot_tftp_forever ; fi ; bootmenu
-+boot_production=led bpi-r64:pio:green on ; run sdmmc_read_production && bootm $loadaddr#$bootconf
-+boot_recovery=led bpi-r64:pio:green off ; run sdmmc_read_recovery && bootm $loadaddr#$bootconf
++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
++boot_production=led $bootled_pwr on ; run sdmmc_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
++boot_recovery=led $bootled_rec on ; run sdmmc_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
 +boot_sdmmc=run boot_production ; run boot_recovery
-+boot_tftp_forever=led bpi-r64:pio:blue on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
-+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run sdmmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
-+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run sdmmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run sdmmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run sdmmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
 +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr
-+boot_ubi=ubi part ubi && setenv bootargs && run boot_ubi_production ; run check_recovery
-+boot_ubi_production=led bpi-r64:pio:green on ; run ubi_read_production && bootm $loadaddr
-+boot_ubi_recovery=led bpi-r64:pio:green off ; run check_recovery
-+check_recovery=run ubi_read_recovery ; if iminfo $loadaddr ; then bootm $loadaddr ; else ubi remove recovery ; fi
++boot_ubi=ubi part ubi && setenv bootargs && run boot_ubi_production ; run boot_ubi_recovery
++boot_ubi_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr ; led $bootled_pwr off
++boot_ubi_recovery=led $bootled_rec on ; run ubi_read_recovery ; bootm $loadaddr#$bootconf ; ubi remove recovery ; led $bootled_rec off
 +check_ubi=ubi part ubi || run ubi_format
 +emmc_init=run emmc_init_bl && run emmc_init_openwrt ; env default bootcmd ; saveenv ; saveenv
 +emmc_init_bl=run sdmmc_read_emmc_bl2 && run emmc_write_bl2 && run sdmmc_read_emmc_hdr && run emmc_write_hdr && run sdmmc_read_emmc_fip && run emmc_write_fip
-+emmc_init_openwrt=run sdmmc_read_recovery && run emmc_write_recovery ; run sdmmc_read_production && run emmc_write_production
++emmc_init_openwrt=run sdmmc_read_recovery && iminfo $loadaddr && run emmc_write_recovery ; run sdmmc_read_production && iminfo $loadaddr && run emmc_write_production
 +emmc_write_bl2=mmc dev 0 1 && mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $loadaddr 0x0 0x100 ; mmc partconf 0 1 1 0
 +emmc_write_fip=mmc dev 0 0 && mmc erase 0x1000 0x1000 && mmc write $loadaddr 0x1000 0x1000 && mmc erase 0x2000 0x800
 +emmc_write_hdr=mmc dev 0 0 && mmc erase 0x0 0x40 && mmc write $loadaddr 0x0 0x40
-+emmc_write_production=iminfo $loadaddr && mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
-+emmc_write_recovery=iminfo $loadaddr && mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
++emmc_write_production=mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
++emmc_write_recovery=mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
 +mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$part_size && mmc write $loadaddr 0x$part_addr 0x$image_size
 +mmc_read_vol=mmc read $loadaddr $part_addr 0x8 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200
 +part_default=production
@@ -224,8 +225,8 @@
 +sdmmc_read_recovery=mmc dev 1 && part start mmc 1 $part_recovery part_addr && part size mmc 1 $part_recovery part_size && run mmc_read_vol
 +sdmmc_read_snand_bl2=mmc dev 1 && part start mmc 1 install part_addr && setexpr offset $part_addr + 0x2000 && mmc read $loadaddr $offset 0x400
 +sdmmc_read_snand_fip=mmc dev 1 && part start mmc 1 install part_addr && setexpr offset $part_addr + 0x2400 && mmc read $loadaddr $offset 0x1000
-+sdmmc_write_production=iminfo $fileaddr && mmc dev 1 && part start mmc 1 $part_default part_addr && part size mmc 1 $part_default part_size && run mmc_write_vol
-+sdmmc_write_recovery=iminfo $fileaddr && mmc dev 1 && part start mmc 1 $part_recovery part_addr && part size mmc 1 $part_recovery part_size && run mmc_write_vol
++sdmmc_write_production=mmc dev 1 && part start mmc 1 $part_default part_addr && part size mmc 1 $part_default part_size && run mmc_write_vol
++sdmmc_write_recovery=mmc dev 1 && part start mmc 1 $part_recovery part_addr && part size mmc 1 $part_recovery part_size && run mmc_write_vol
 +snand_write_fip=mtd erase fip && mtd write fip $loadaddr
 +snand_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
 +ubi_create_env=ubi create ubootenv 0x100000 dynamic 0 ; ubi create ubootenv2 0x100000 dynamic 1 ; ubi create fit 0x100000 dynamic 2 ; ubi create recovery 0x100000 dynamic 3
@@ -240,7 +241,7 @@
 +ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
 +ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
 +_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv
-+_firstboot=setenv _firstboot ; led bpi-r64:pio:blue on ; run _switch_to_menu ; run _init_env ; run boot_first
++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
 +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
 +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title       [33m$ver[0m"
 --- /dev/null
@@ -393,10 +394,10 @@
 +CONFIG_USB_STORAGE=y
 --- /dev/null
 +++ b/bananapi_bpi-r64-emmc_env
-@@ -0,0 +1,54 @@
+@@ -0,0 +1,56 @@
 +ipaddr=192.168.1.1
 +serverip=192.168.1.254
-+loadaddr=0x4007ff28
++loadaddr=0x48000000
 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi
 +bootargs=root=/dev/mmcblk0p65
 +bootconf=config-mt7622-bananapi-bpi-r64-pcie1
@@ -405,8 +406,10 @@
 +bootdelay=0
 +bootfile=openwrt-mediatek-mt7622-bananapi_bpi-r64-initramfs-recovery.itb
 +bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb
-+bootfile_fip=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-bl31-uboot.fip
 +bootfile_bl2=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-preloader.bin
++bootfile_fip=openwrt-mediatek-mt7622-bananapi_bpi-r64-emmc-bl31-uboot.fip
++bootled_pwr=bpi-r64:pio:green
++bootled_rec=bpi-r64:pio:blue
 +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
 +bootmenu_default=0
 +bootmenu_delay=0
@@ -416,25 +419,25 @@
 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
 +bootmenu_2=Boot production system from eMMC.=run boot_production ; run bootmenu_confirm_return
 +bootmenu_3=Boot recovery system from eMMC.=run boot_recovery ; run bootmenu_confirm_return
-+bootmenu_4=Load production system via TFTP then write to eMMC.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return
-+bootmenu_5=Load recovery system via TFTP then write to eMMC.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return
++bootmenu_4=Load production system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_5=Load recovery system via TFTP then write to eMMC.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
 +bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to eMMC.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
 +bootmenu_7=[31mLoad BL2 preloader via TFTP then write to eMMC.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
 +bootmenu_8=Reboot.=reset
 +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
-+boot_default=run bootcmd ; run boot_recovery ; run boot_tftp_forever
-+boot_first=if button reset ; then run boot_tftp_forever ; fi ; bootmenu
-+boot_production=led bpi-r64:pio:green on ; run emmc_read_production && bootm $loadaddr#$bootconf
-+boot_recovery=led bpi-r64:pio:green off ; run emmc_read_recovery && bootm $loadaddr#$bootconf
++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
++boot_production=led $bootled_pwr on ; run emmc_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
++boot_recovery=led $bootled_rec on ; run emmc_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
 +boot_emmc=run boot_production ; run boot_recovery
-+boot_tftp_forever=led bpi-r64:pio:blue on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
-+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
-+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run emmc_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run emmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
 +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run emmc_write_bl2
 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run emmc_write_fip
 +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr
-+emmc_write_production=iminfo $fileaddr && mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
-+emmc_write_recovery=iminfo $fileaddr && mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
++emmc_write_production=mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
++emmc_write_recovery=mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
 +emmc_write_bl2=mmc dev 0 1 && mmc partconf 0 1 1 1 && mmc erase 0x0 0x400 && mmc write $loadaddr 0x0 0x100 ; mmc partconf 0 1 1 0
 +emmc_write_fip=mmc dev 0 0 && mmc erase 0x1000 0x1000 && mmc write $loadaddr 0x1000 0x1000 && mmc erase 0x2000 0x800
 +emmc_read_production=mmc dev 0 && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol
@@ -445,7 +448,7 @@
 +part_recovery=recovery
 +reset_factory=eraseenv && reset
 +_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv
-+_firstboot=setenv _firstboot ; led bpi-r64:pio:blue on ; run _switch_to_menu ; run _init_env ; run boot_first
++_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
 +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
 +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title       [33m$ver[0m"
 --- /dev/null
@@ -595,7 +598,7 @@
 @@ -0,0 +1,57 @@
 +ipaddr=192.168.1.1
 +serverip=192.168.1.254
-+loadaddr=0x4007ff28
++loadaddr=0x48000000
 +bootargs=root=/dev/ubiblock0_2p1
 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
 +bootconf=config-mt7622-bananapi-bpi-r64-pcie1
@@ -603,9 +606,11 @@
 +bootconf_sata=config-mt7622-bananapi-bpi-r64-sata
 +bootdelay=0
 +bootfile=openwrt-mediatek-mt7622-bananapi_bpi-r64-initramfs-recovery.itb
-+bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb
 +bootfile_fip=openwrt-mediatek-mt7622-bananapi_bpi-r64-snand-bl31-uboot.fip
 +bootfile_bl2=openwrt-mediatek-mt7622-bananapi_bpi-r64-snand-preloader.bin
++bootfile_upg=openwrt-mediatek-mt7622-bananapi_bpi-r64-squashfs-sysupgrade.itb
++bootled_pwr=bpi-r64:pio:green
++bootled_rec=bpi-r64:pio:blue
 +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
 +bootmenu_default=0
 +bootmenu_delay=0
@@ -615,38 +620,36 @@
 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
 +bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
 +bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
-+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return
-+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return
++bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
 +bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to NAND.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
 +bootmenu_7=[31mLoad BL2 preloader via TFTP then write to NAND.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
 +bootmenu_8=Reboot.=reset
 +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
-+boot_default=run bootcmd ; run boot_recovery ; run boot_tftp_forever
-+boot_first=if button reset ; then run boot_tftp_forever ; fi ; bootmenu
-+boot_production=led bpi-r64:pio:green on ; run ubi_read_production && bootm $loadaddr#$bootconf
-+boot_recovery=led bpi-r64:pio:green off ; run check_recovery
++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
++boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
++boot_recovery=led $bootled_rec on ; run ubi_read_recovery ; bootm $loadaddr#$bootconf ; ubi remove recovery ; led $bootled_rec off
 +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
-+boot_tftp_forever=led bpi-r64:pio:blue on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
-+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
-+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && iminfo $loadaddr && ubi part ubi && run ubi_write_production ubi_prepare_rootfs ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && ubi part ubi && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
 +boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run boot_write_bl2
 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run boot_write_fip
 +boot_ubi=ubi part ubi && run boot_production ; run boot_recovery
++boot_write_bl2=mtd erase bl2 && mtd write spi-nand0 $loadaddr 0x0 0x20000 && mtd write spi-nand0 $loadaddr 0x20000 0x20000 && mtd write spi-nand0 $loadaddr 0x40000 0x20000 && mtd write spi-nand0 $loadaddr 0x60000 0x20000
 +boot_write_fip=mtd erase fip && mtd write fip $loadaddr
-+boot_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
-+check_recovery=run ubi_read_recovery ; if iminfo $loadaddr ; then bootm $loadaddr#$bootconf; else ubi remove recovery ; fi
 +check_ubi=ubi part ubi || run ubi_format
-+part_default=production
-+part_recovery=recovery
 +reset_factory=ubi part ubi ; ubi write 0x0 ubootenv 0x0 ; ubi write 0x0 ubootenv2 0x0 ; ubi remove rootfs_data
 +ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
 +ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
 +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
 +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
 +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
-+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize
-+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize
++ubi_write_production=ubi check fit && env exists replacevol && ubi remove fit ; if ubi check fit ; then else run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize ; fi
++ubi_write_recovery=ubi check recovery && env exists replacevol && ubi remove recovery ; if ubi check recovery ; then else run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize ; fi
 +_create_env=ubi create ubootenv 0x100000 dynamic 0 ; ubi create ubootenv2 0x100000 dynamic 1 ; ubi create fit 0x100000 dynamic 2 ; ubi create recovery 0x100000 dynamic 3
 +_init_env=setenv _init_env ; if ubi check ubootenv && ubi check ubootenv2 ; then else run _create_env ; fi ; setenv _create_env ; saveenv || run ubi_format ; saveenv || run ubi_format
-+_firstboot=setenv _firstboot ; led bpi-r64:pio:blue on ; run _switch_to_menu ; run check_ubi ; run _init_env ; run boot_first
-+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d
++_firstboot=setenv _firstboot ; run _switch_to_menu ; run check_ubi ; run _init_env ; run boot_first
++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title       [33m$ver[0m"
diff --git a/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch b/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch
index f09a7db137..5b52206e1c 100644
--- a/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch
+++ b/package/boot/uboot-mediatek/patches/410-add-linksys-e8450.patch
@@ -1,6 +1,6 @@
 --- /dev/null
 +++ b/configs/mt7622_linksys_e8450_defconfig
-@@ -0,0 +1,134 @@
+@@ -0,0 +1,135 @@
 +CONFIG_ARM=y
 +CONFIG_POSITION_INDEPENDENT=y
 +CONFIG_ARCH_MEDIATEK=y
@@ -16,6 +16,7 @@
 +CONFIG_DEBUG_UART_CLOCK=25000000
 +CONFIG_DEFAULT_DEVICE_TREE="mt7622-linksys-e8450-ubi"
 +CONFIG_DEBUG_UART=y
++CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-nand0:512k(bl2),1280k(fip),1024k(factory),256k(reserved),-(ubi)"
 +CONFIG_SMBIOS_PRODUCT_NAME=""
 +CONFIG_AUTOBOOT_KEYED=y
 +CONFIG_BOOTDELAY=30
@@ -346,17 +347,19 @@
 --- /dev/null
 +++ b/linksys_e8450_env
 @@ -0,0 +1,57 @@
-+mtdparts=spi-nand0:512k(bl2),1280k(fip),1024k(factory),256k(reserved),-(ubi)
 +ethaddr_factory=mtd read spi-nand0 0x40080000 0x220000 0x20000 && env readmem -b ethaddr 0x4009fff4 0x6 ; setenv ethaddr_factory
 +ipaddr=192.168.1.1
 +serverip=192.168.1.254
-+loadaddr=0x4007ff28
++loadaddr=0x48000000
 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
++bootconf=config-1
 +bootdelay=0
 +bootfile=openwrt-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery.itb
 +bootfile_bl2=openwrt-mediatek-mt7622-linksys_e8450-ubi-preloader.bin
 +bootfile_fip=openwrt-mediatek-mt7622-linksys_e8450-ubi-bl31-uboot.fip
 +bootfile_upg=openwrt-mediatek-mt7622-linksys_e8450-ubi-squashfs-sysupgrade.itb
++bootled_pwr=power:blue
++bootled_rec=inet:orange on
 +bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
 +bootmenu_default=0
 +bootmenu_delay=0
@@ -366,40 +369,38 @@
 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
 +bootmenu_2=Boot production system from flash.=run boot_production ; run bootmenu_confirm_return
 +bootmenu_3=Boot recovery system from flash.=run boot_recovery ; run bootmenu_confirm_return
-+bootmenu_4=Load production system via TFTP then write to flash.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return
-+bootmenu_5=Load recovery system via TFTP then write to flash.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return
++bootmenu_4=Load production system via TFTP then write to flash.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_5=Load recovery system via TFTP then write to flash.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
 +bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to flash.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
-+bootmenu_7=[31mLoad BL2 preloader via TFTP then write to flash.[0m=run boot_tftp_write_preloader ; run bootmenu_confirm_return
++bootmenu_7=[31mLoad BL2 preloader via TFTP then write to flash.[0m=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
 +bootmenu_8=Reboot.=reset
 +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
-+boot_first=if button reset ; then run boot_tftp_forever ; fi ; setenv flag_recover 1 ; bootmenu
-+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; run boot_tftp_forever
-+boot_production=led power:blue on ; run ubi_read_production && bootm $loadaddr
-+boot_production_or_recovery=run boot_production ; run boot_recovery
-+boot_recovery=led power:blue off ; led power:orange on ; run check_recovery
++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
++boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
++boot_recovery=led $bootled_rec on ; run ubi_read_recovery ; bootm $loadaddr#$bootconf ; ubi remove recovery ; led $bootled_rec off
++boot_serial_write_bl2=loadx $loadaddr 115200 && run boot_write_bl2
 +boot_serial_write_fip=loadx $loadaddr 115200 && run boot_write_fip
-+boot_serial_write_preloader=loadx $loadaddr 115200 && run boot_write_preloader
-+boot_tftp_forever=led inet:blue on ; while true ; do run boot_tftp_recovery ; led inet:blue off ; led inet:orange on ; sleep 1 ; done
-+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && iminfo $loadaddr && ubi part ubi && run ubi_write_production ubi_prepare_rootfs ; if env exists noboot ; then else bootm $loadaddr ; fi
-+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && ubi part ubi && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi
-+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr
++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && iminfo $loadaddr && ubi part ubi && run ubi_write_production ubi_prepare_rootfs ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && ubi part ubi && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run boot_write_bl2
 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run boot_write_fip
-+boot_tftp_write_preloader=tftpboot $loadaddr $bootfile_bl2 && run boot_write_preloader
-+boot_ubi=ubi part ubi && run boot_production_or_recovery
-+boot_write_fip=mtd erase spi-nand0 0x80000 0x140000 && mtd write spi-nand0 $loadaddr 0x80000 0x140000
-+boot_write_preloader=mtd erase spi-nand0 0x0 0x80000 && mtd write spi-nand0 $loadaddr 0x0 0x20000 && mtd write spi-nand0 $loadaddr 0x20000 0x20000 && mtd write spi-nand0 $loadaddr 0x40000 0x20000 && mtd write spi-nand0 $loadaddr 0x60000 0x20000
-+check_recovery=run ubi_read_recovery ; if iminfo $loadaddr ; then bootm $loadaddr ; else ubi remove recovery ; fi
++boot_ubi=ubi part ubi && run boot_production ; run boot_recovery
++boot_write_bl2=mtd erase bl2 && mtd write spi-nand0 $loadaddr 0x0 0x20000 && mtd write spi-nand0 $loadaddr 0x20000 0x20000 && mtd write spi-nand0 $loadaddr 0x40000 0x20000 && mtd write spi-nand0 $loadaddr 0x60000 0x20000
++boot_write_fip=mtd erase fip && mtd write fip $loadaddr
 +check_ubi=ubi part ubi || run ubi_format
 +reset_factory=ubi part ubi ; ubi write 0x0 ubootenv 0x0 ; ubi write 0x0 ubootenv2 0x0 ; ubi remove rootfs_data
-+ubi_format=ubi detach ; mtd erase spi-nand0 0x300000 0x7D00000 && ubi part ubi ; reset
++ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
 +ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
 +ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
 +ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
 +ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
-+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
-+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
++ubi_write_production=ubi check fit && env exists replacevol && ubi remove fit ; if ubi check fit ; then else run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize ; fi
++ubi_write_recovery=ubi check recovery && env exists replacevol && ubi remove recovery ; if ubi check recovery ; then else run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize ; fi
 +_create_env=ubi create ubootenv 0x100000 dynamic ; ubi create ubootenv2 0x100000 dynamic
 +_init_env=setenv _init_env ; if ubi check ubootenv && ubi check ubootenv2 ; then else run _create_env ; fi ; setenv _create_env ; saveenv || run ubi_format ; saveenv || run ubi_format
-+_firstboot=setenv _firstboot ; led power:orange on ; run _switch_to_menu ; run ethaddr_factory ; run check_ubi ; run _init_env ; run boot_first
++_firstboot=setenv _firstboot ; run _switch_to_menu ; run ethaddr_factory ; run check_ubi ; run _init_env ; run boot_first
 +_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
 +_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title       [33m$ver[0m"
diff --git a/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch b/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch
index d9b8a01f73..bac4a86d05 100644
--- a/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch
+++ b/package/boot/uboot-mediatek/patches/412-add-ubnt-unifi-6-lr.patch
@@ -1,6 +1,6 @@
 --- /dev/null
 +++ b/configs/mt7622_ubnt_unifi-6-lr_defconfig
-@@ -0,0 +1,139 @@
+@@ -0,0 +1,140 @@
 +CONFIG_ARM=y
 +CONFIG_POSITION_INDEPENDENT=y
 +CONFIG_ARCH_MEDIATEK=y
@@ -8,6 +8,7 @@
 +CONFIG_SYS_TEXT_BASE=0x41e00000
 +CONFIG_SYS_MALLOC_F_LEN=0x4000
 +CONFIG_USE_DEFAULT_ENV_FILE=y
++CONFIG_MTDPARTS_DEFAULT="mtdparts=nor0:128k(bl2),640k(fip),64k(u-boot-env),256k(factory),64k(eeprom),15232k(recovery),-(firmware)"
 +CONFIG_ENV_IS_IN_MTD=y
 +CONFIG_ENV_MTD_NAME="nor0"
 +CONFIG_ENV_SIZE_REDUND=0x4000
@@ -357,12 +358,11 @@
  	mt8512-bm1-emmc.dtb \
 --- /dev/null
 +++ b/ubnt_unifi-6-lr_env
-@@ -0,0 +1,52 @@
-+mtdparts=nor0:128k(bl2),640k(fip),64k(u-boot-env),256k(factory),64k(eeprom),15232k(recovery),-(firmware)
+@@ -0,0 +1,50 @@
 +ethaddr_factory=mtd read nor0 $loadaddr 0x110000 0x10000 && env readmem -b ethaddr $loadaddr 0x6 ; setenv ethaddr_factory
 +ipaddr=192.168.1.1
 +serverip=192.168.1.254
-+loadaddr=0x40080000
++loadaddr=0x48000000
 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_nor ; fi
 +bootdelay=0
 +bootfile=openwrt-mediatek-mt7622-ubnt_unifi-6-lr-ubootmod-initramfs-recovery.itb
@@ -378,26 +378,25 @@
 +bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
 +bootmenu_2=Boot production system from flash.=run boot_production ; run bootmenu_confirm_return
 +bootmenu_3=Boot recovery system from flash.=run boot_recovery ; run bootmenu_confirm_return
-+bootmenu_4=Load production system via TFTP then write to flash.=setenv noboot 1 ; run boot_tftp_production ; setenv noboot ; run bootmenu_confirm_return
-+bootmenu_5=Load recovery system via TFTP then write to flash.=setenv noboot 1 ; run boot_tftp_recovery ; setenv noboot ; run bootmenu_confirm_return
++bootmenu_4=Load production system via TFTP then write to flash.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
++bootmenu_5=Load recovery system via TFTP then write to flash.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
 +bootmenu_6=[31mLoad BL31+U-Boot FIP via TFTP then write to flash.[0m=run boot_tftp_write_fip ; run bootmenu_confirm_return
 +bootmenu_7=[31mLoad BL2 preloader via TFTP then write to flash.[0m=run boot_tftp_write_preloader ; run bootmenu_confirm_return
 +bootmenu_8=Reboot.=reset
 +bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
-+boot_first=if button reset ; then run boot_tftp_forever ; fi ; bootmenu
-+boot_default=run bootcmd ; run boot_recovery ; run boot_tftp_forever
++boot_first=if button reset ; then run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
 +boot_production=run nor_read_production && bootm $loadaddr
-+boot_production_or_recovery=run boot_production ; run boot_recovery
 +boot_recovery=run nor_read_recovery ; bootm $loadaddr
 +boot_serial_write_fip=loadx $loadaddr 115200 && run boot_write_fip
 +boot_serial_write_preloader=loadx $loadaddr 115200 && run boot_write_preloader
 +boot_tftp_forever=while true ; do run boot_tftp_recovery ; sleep 1 ; done
-+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && iminfo $loadaddr && run nor_write_production ; if env exists noboot ; then else bootm $loadaddr ; fi
-+boot_tftp_recovery=tftpboot $loadaddr $bootfile && iminfo $loadaddr && run nor_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi
++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run nor_write_production ; if env exists noboot ; then else bootm $loadaddr ; fi
++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run nor_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi
 +boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr
 +boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run boot_write_fip
 +boot_tftp_write_preloader=tftpboot $loadaddr $bootfile_bl2 && run boot_write_preloader
-+boot_nor=run boot_production_or_recovery
++boot_nor=run boot_production ; run boot_recovery
 +boot_write_fip=mtd erase nor0 0x20000 0x80000 && mtd write nor0 $loadaddr 0x20000 0x80000
 +boot_write_preloader=mtd erase nor0 0x0 0x20000 && mtd write nor0 $loadaddr 0x0 0x20000
 +reset_factory=mtd erase nor0 0xc0000 0x10000 && reset


From lede-commits at lists.infradead.org  Mon Jul 12 04:34:48 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 12 Jul 2021 07:34:48 -0400
Subject: [openwrt/openwrt] hostapd: add support for enabling HE on channel
 switch
In-Reply-To: <162608968722.18255.13925431921446396783@git-01.infra.openwrt.org>
References: <162608968722.18255.13925431921446396783@git-01.infra.openwrt.org>
Message-ID: <mailman.6876.1626089694.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/1ec4af41511f6d95ff7a370898a0be3ee43c0f00

commit 1ec4af41511f6d95ff7a370898a0be3ee43c0f00
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 7 17:37:08 2021 +0200

    hostapd: add support for enabling HE on channel switch
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/hostapd/src/src/ap/ubus.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 85fd6f1cc7..49901fc4c3 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -742,6 +742,7 @@ enum {
 	CSA_SEC_CHANNEL_OFFSET,
 	CSA_HT,
 	CSA_VHT,
+	CSA_HE,
 	CSA_BLOCK_TX,
 	__CSA_MAX
 };
@@ -755,6 +756,7 @@ static const struct blobmsg_policy csa_policy[__CSA_MAX] = {
 	[CSA_SEC_CHANNEL_OFFSET] = { "sec_channel_offset", BLOBMSG_TYPE_INT32 },
 	[CSA_HT] = { "ht", BLOBMSG_TYPE_BOOL },
 	[CSA_VHT] = { "vht", BLOBMSG_TYPE_BOOL },
+	[CSA_HE] = { "he", BLOBMSG_TYPE_BOOL },
 	[CSA_BLOCK_TX] = { "block_tx", BLOBMSG_TYPE_BOOL },
 };
 
@@ -791,6 +793,7 @@ hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj,
 	SET_CSA_SETTING(CSA_SEC_CHANNEL_OFFSET, freq_params.sec_channel_offset, u32);
 	SET_CSA_SETTING(CSA_HT, freq_params.ht_enabled, bool);
 	SET_CSA_SETTING(CSA_VHT, freq_params.vht_enabled, bool);
+	SET_CSA_SETTING(CSA_HE, freq_params.he_enabled, bool);
 	SET_CSA_SETTING(CSA_BLOCK_TX, block_tx, bool);
 
 	for (i = 0; i < hapd->iface->num_bss; i++) {


From lede-commits at lists.infradead.org  Mon Jul 12 04:34:50 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 12 Jul 2021 07:34:50 -0400
Subject: [openwrt/openwrt] hostapd: fix uninitialized stack variable on CSA
In-Reply-To: <162608968722.18255.13925431921446396783@git-01.infra.openwrt.org>
References: <162608968722.18255.13925431921446396783@git-01.infra.openwrt.org>
Message-ID: <mailman.6877.1626089694.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/8f7e6db23045b9b4831d10c5bdf29d514a3753c9

commit 8f7e6db23045b9b4831d10c5bdf29d514a3753c9
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Jul 12 13:31:04 2021 +0200

    hostapd: fix uninitialized stack variable on CSA
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...-fix-use-of-uninitialized-stack-variables.patch | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)

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
new file mode 100644
index 0000000000..c7da33f029
--- /dev/null
+++ b/package/network/services/hostapd/patches/022-hostapd-fix-use-of-uninitialized-stack-variables.patch
@@ -0,0 +1,25 @@
+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
+@@ -3431,7 +3431,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) {


From lede-commits at lists.infradead.org  Mon Jul 12 04:34:49 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 12 Jul 2021 07:34:49 -0400
Subject: [openwrt/openwrt] hostapd: initialize ht/vht/he mode on channel
 switch by default
In-Reply-To: <162608968722.18255.13925431921446396783@git-01.infra.openwrt.org>
References: <162608968722.18255.13925431921446396783@git-01.infra.openwrt.org>
Message-ID: <mailman.6878.1626089695.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/da2c244e8c9f30e4fc5bf77f0800d685e35d1888

commit da2c244e8c9f30e4fc5bf77f0800d685e35d1888
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 7 17:40:41 2021 +0200

    hostapd: initialize ht/vht/he mode on channel switch by default
    
    Use the current mode, but allow overwriting via ubus command parameters
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/hostapd/src/src/ap/ubus.c | 26 ++++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 49901fc4c3..9918f17d67 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -768,7 +768,15 @@ hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj,
 {
 	struct blob_attr *tb[__CSA_MAX];
 	struct hostapd_data *hapd = get_hapd_from_object(obj);
-	struct csa_settings css;
+	struct hostapd_config *iconf = hapd->iface->conf;
+	struct csa_settings css = {
+		.freq_params = {
+			.ht_enabled = iconf->ieee80211n,
+			.vht_enabled = iconf->ieee80211ac,
+			.he_enabled = iconf->ieee80211ax,
+			.sec_channel_offset = iconf->secondary_channel,
+		}
+	};
 	int ret = UBUS_STATUS_OK;
 	int i;
 
@@ -777,7 +785,21 @@ hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj,
 	if (!tb[CSA_FREQ])
 		return UBUS_STATUS_INVALID_ARGUMENT;
 
-	memset(&css, 0, sizeof(css));
+	switch (iconf->vht_oper_chwidth) {
+	case CHANWIDTH_USE_HT:
+		if (iconf->secondary_channel)
+			css.freq_params.bandwidth = 40;
+		else
+			css.freq_params.bandwidth = 20;
+		break;
+	case CHANWIDTH_160MHZ:
+		css.freq_params.bandwidth = 160;
+		break;
+	default:
+		css.freq_params.bandwidth = 80;
+		break;
+	}
+
 	css.freq_params.freq = blobmsg_get_u32(tb[CSA_FREQ]);
 
 #define SET_CSA_SETTING(name, field, type) \


From lede-commits at lists.infradead.org  Mon Jul 12 04:34:47 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 12 Jul 2021 07:34:47 -0400
Subject: [openwrt/openwrt] hostapd: make it possible to update station
 airtime weights via ubus
In-Reply-To: <162608968722.18255.13925431921446396783@git-01.infra.openwrt.org>
References: <162608968722.18255.13925431921446396783@git-01.infra.openwrt.org>
Message-ID: <mailman.6879.1626089695.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9aa0561534e8ea210d5a57c40ae0fcad5cada212

commit 9aa0561534e8ea210d5a57c40ae0fcad5cada212
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Jul 6 14:11:33 2021 +0200

    hostapd: make it possible to update station airtime weights via ubus
    
    This allows dynamic tuning based on other runtime information
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../hostapd/patches/600-ubus_support.patch         | 41 +++++++++++++++
 package/network/services/hostapd/src/src/ap/ubus.c | 58 ++++++++++++++++++++++
 2 files changed, 99 insertions(+)

diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch
index 71537c9ec6..005ed54e0c 100644
--- a/package/network/services/hostapd/patches/600-ubus_support.patch
+++ b/package/network/services/hostapd/patches/600-ubus_support.patch
@@ -473,3 +473,44 @@
  	/* 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
+@@ -324,6 +324,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 */
+ 
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 6201dfd524..85fd6f1cc7 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -21,6 +21,7 @@
 #include "rrm.h"
 #include "wnm_ap.h"
 #include "taxonomy.h"
+#include "airtime_policy.h"
 
 static struct ubus_context *ctx;
 static struct blob_buf b;
@@ -1326,11 +1327,68 @@ hostapd_wnm_disassoc_imminent(struct ubus_context *ctx, struct ubus_object *obj,
 }
 #endif
 
+#ifdef CONFIG_AIRTIME_POLICY
+enum {
+	UPDATE_AIRTIME_STA,
+	UPDATE_AIRTIME_WEIGHT,
+	__UPDATE_AIRTIME_MAX,
+};
+
+
+static const struct blobmsg_policy airtime_policy[__UPDATE_AIRTIME_MAX] = {
+	[UPDATE_AIRTIME_STA] = { "sta", BLOBMSG_TYPE_STRING },
+	[UPDATE_AIRTIME_WEIGHT] = { "weight", BLOBMSG_TYPE_INT32 },
+};
+
+static int
+hostapd_bss_update_airtime(struct ubus_context *ctx, struct ubus_object *obj,
+			   struct ubus_request_data *ureq, const char *method,
+			   struct blob_attr *msg)
+{
+	struct hostapd_data *hapd = container_of(obj, struct hostapd_data, ubus.obj);
+	struct blob_attr *tb[__UPDATE_AIRTIME_MAX];
+	struct sta_info *sta = NULL;
+	u8 addr[ETH_ALEN];
+	int weight;
+
+	blobmsg_parse(airtime_policy, __UPDATE_AIRTIME_MAX, tb, blob_data(msg), blob_len(msg));
+
+	if (!tb[UPDATE_AIRTIME_WEIGHT])
+		return UBUS_STATUS_INVALID_ARGUMENT;
+
+	weight = blobmsg_get_u32(tb[UPDATE_AIRTIME_WEIGHT]);
+
+	if (!tb[UPDATE_AIRTIME_STA]) {
+		if (!weight)
+			return UBUS_STATUS_INVALID_ARGUMENT;
+
+		hapd->conf->airtime_weight = weight;
+		return 0;
+	}
+
+	if (hwaddr_aton(blobmsg_data(tb[UPDATE_AIRTIME_STA]), addr))
+		return UBUS_STATUS_INVALID_ARGUMENT;
+
+	sta = ap_get_sta(hapd, addr);
+	if (!sta)
+		return UBUS_STATUS_NOT_FOUND;
+
+	sta->dyn_airtime_weight = weight;
+	airtime_policy_new_sta(hapd, sta);
+
+	return 0;
+}
+#endif
+
+
 static const struct ubus_method bss_methods[] = {
 	UBUS_METHOD_NOARG("reload", hostapd_bss_reload),
 	UBUS_METHOD_NOARG("get_clients", hostapd_bss_get_clients),
 	UBUS_METHOD_NOARG("get_status", hostapd_bss_get_status),
 	UBUS_METHOD("del_client", hostapd_bss_del_client, del_policy),
+#ifdef CONFIG_AIRTIME_POLICY
+	UBUS_METHOD("update_airtime", hostapd_bss_update_airtime, airtime_policy),
+#endif
 	UBUS_METHOD_NOARG("list_bans", hostapd_bss_list_bans),
 #ifdef CONFIG_WPS
 	UBUS_METHOD_NOARG("wps_start", hostapd_bss_wps_start),


From lede-commits at lists.infradead.org  Mon Jul 12 15:57:47 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 12 Jul 2021 18:57:47 -0400
Subject: [openwrt/openwrt]  mediatek: add missing config symbols
In-Reply-To: <162613066612.13490.5827467787152320395@git-01.infra.openwrt.org>
References: <162613066612.13490.5827467787152320395@git-01.infra.openwrt.org>
Message-ID: <mailman.6993.1626130672.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/38cdc57be6350f4890510c9cece535d340c6a3a6

commit 38cdc57be6350f4890510c9cece535d340c6a3a6
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Mon Jul 12 23:24:33 2021 +0200

    mediatek: add missing config symbols
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/mediatek/mt7622/config-5.4 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/mediatek/mt7622/config-5.4 b/target/linux/mediatek/mt7622/config-5.4
index b873bdc40c..282cd0bab5 100644
--- a/target/linux/mediatek/mt7622/config-5.4
+++ b/target/linux/mediatek/mt7622/config-5.4
@@ -331,6 +331,7 @@ CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
 CONFIG_HAVE_UID16=y
 CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 CONFIG_HOLES_IN_ZONE=y
+# CONFIG_HW_RANDOM_MTK is not set
 CONFIG_HZ=250
 CONFIG_HZ_250=y
 CONFIG_I2C=y
@@ -527,6 +528,8 @@ CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SGL_ALLOC=y
 CONFIG_SG_POOL=y
 CONFIG_SMP=y
+# CONFIG_SND_SOC_MT6797 is not set
+# CONFIG_SND_SOC_MT8183 is not set
 CONFIG_SPARSEMEM=y
 CONFIG_SPARSEMEM_EXTREME=y
 CONFIG_SPARSEMEM_MANUAL=y


From lede-commits at lists.infradead.org  Mon Jul 12 15:57:46 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 12 Jul 2021 18:57:46 -0400
Subject: [openwrt/openwrt]  generic: add missing config symbols
In-Reply-To: <162613066612.13490.5827467787152320395@git-01.infra.openwrt.org>
References: <162613066612.13490.5827467787152320395@git-01.infra.openwrt.org>
Message-ID: <mailman.6994.1626130672.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/6073d2c02a26d399abe60c11f99d3de7ff9b6d68

commit 6073d2c02a26d399abe60c11f99d3de7ff9b6d68
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Mon Jul 12 23:22:14 2021 +0200

    generic: add missing config symbols
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/generic/config-5.4 | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index df49bdb2c2..8d0f4a7306 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -961,6 +961,12 @@ CONFIG_CRYPTO_AES=y
 # CONFIG_CRYPTO_AES_ARM is not set
 # CONFIG_CRYPTO_AES_ARM_BS is not set
 # CONFIG_CRYPTO_AES_ARM_CE is not set
+# CONFIG_CRYPTO_AES_ARM64 is not set
+# CONFIG_CRYPTO_AES_ARM64_BS is not set
+# CONFIG_CRYPTO_AES_ARM64_CE is not set
+# CONFIG_CRYPTO_AES_ARM64_CE_BLK is not set
+# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set
+# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set
 # CONFIG_CRYPTO_AES_NI_INTEL is not set
 # CONFIG_CRYPTO_AES_TI is not set
 CONFIG_CRYPTO_ALGAPI=y
@@ -1047,6 +1053,7 @@ CONFIG_CRYPTO_BLKCIPHER2=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_GHASH is not set
 # CONFIG_CRYPTO_GHASH_ARM_CE is not set
+# CONFIG_CRYPTO_GHASH_ARM64_CE is not set
 # CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL is not set
 # CONFIG_CRYPTO_HASH is not set
 # CONFIG_CRYPTO_HMAC is not set
@@ -1104,13 +1111,17 @@ CONFIG_CRYPTO_PCRYPT=y
 # CONFIG_CRYPTO_SHA1_ARM is not set
 # CONFIG_CRYPTO_SHA1_ARM_CE is not set
 # CONFIG_CRYPTO_SHA1_ARM_NEON is not set
+# CONFIG_CRYPTO_SHA1_ARM64_CE is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA256_ARM is not set
+# CONFIG_CRYPTO_SHA256_ARM64 is not set
 # CONFIG_CRYPTO_SHA2_ARM_CE is not set
+# CONFIG_CRYPTO_SHA2_ARM64_CE is not set
 # CONFIG_CRYPTO_SHA3 is not set
 # CONFIG_CRYPTO_SHA3_ARM64 is not set
 # CONFIG_CRYPTO_SHA512 is not set
 # CONFIG_CRYPTO_SHA512_ARM is not set
+# CONFIG_CRYPTO_SHA512_ARM64 is not set
 # CONFIG_CRYPTO_SHA512_ARM64_CE is not set
 # CONFIG_CRYPTO_SIMD is not set
 # CONFIG_CRYPTO_SM3 is not set


From lede-commits at lists.infradead.org  Mon Jul 12 22:58:38 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 13 Jul 2021 01:58:38 -0400
Subject: [openwrt/openwrt]  netifd: update to the latest version
In-Reply-To: <162615591864.13365.1894324110719254955@git-01.infra.openwrt.org>
References: <162615591864.13365.1894324110719254955@git-01.infra.openwrt.org>
Message-ID: <mailman.7036.1626155923.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/1236cbe30cec8e3e8246237005140596f8611ce9

commit 1236cbe30cec8e3e8246237005140596f8611ce9
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Jul 13 07:57:26 2021 +0200

    netifd: update to the latest version
    
    f12b073c0cc3 wireless: add some comments to functions
    b0d090688302 bridge: fix setting pvid for updated vlans
    ff3764ce28e0 device: move hotplug handling logic from system-linux.c to device.c
    16bff892f415 ubus: add a dummy mode ubus call to simulate hotplug events
    7f30b02013f2 examples: make dummy wireless vif names shorter
    013a1171e9b0 device: do not treat devices with non-digit characters after . as vlan devices
    f037b082923a wireless: handle WDS per-sta devices
    db0fa24e1c17 bridge: fix enabling hotplug-added VLANs on the bridge port
    4e92ea74273f bridge: bring up pre-existing vlans on hotplug as well
    1f283c654aeb bridge: fix hotplug vlan overwrite on big-endian systems
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index fb0e470995..ebc601fa4a 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2021-06-04
-PKG_SOURCE_VERSION:=50381d0a2998f6c0fc4823f0c2aa4206063d549e
-PKG_MIRROR_HASH:=2718df3d3538c93ac77accf55716fb341741df3d231aac59e04dd1f80f558889
+PKG_SOURCE_DATE:=2021-07-13
+PKG_SOURCE_VERSION:=1f283c654aeb1f8983e0a81b7a81cc4784fffe3f
+PKG_MIRROR_HASH:=a65bb00f376eec5006c6efa1bc3298687054c3936de9c61997496969c93f9ccc
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Mon Jul 12 23:01:11 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 13 Jul 2021 02:01:11 -0400
Subject: [openwrt/openwrt]  netifd: update to the latest version
In-Reply-To: <162615607149.16296.10007551835322397551@git-01.infra.openwrt.org>
References: <162615607149.16296.10007551835322397551@git-01.infra.openwrt.org>
Message-ID: <mailman.7041.1626156075.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/fe498dd3f108de494594ae8e0eba207fdbf14594

commit fe498dd3f108de494594ae8e0eba207fdbf14594
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Jun 4 09:11:37 2021 +0200

    netifd: update to the latest version
    
    61a71e5e49c3 bridge: dynamically create vlans for hotplug members
    cb6ee9608e10 bridge: fix dynamic delete of hotplug vlans
    7f199050f395 wireless: pass the real network ifname to the setup script
    50381d0a2998 bridge: allow adding/removing VLANs to configured member ports via hotplug
    f12b073c0cc3 wireless: add some comments to functions
    b0d090688302 bridge: fix setting pvid for updated vlans
    ff3764ce28e0 device: move hotplug handling logic from system-linux.c to device.c
    16bff892f415 ubus: add a dummy mode ubus call to simulate hotplug events
    7f30b02013f2 examples: make dummy wireless vif names shorter
    013a1171e9b0 device: do not treat devices with non-digit characters after . as vlan devices
    f037b082923a wireless: handle WDS per-sta devices
    db0fa24e1c17 bridge: fix enabling hotplug-added VLANs on the bridge port
    4e92ea74273f bridge: bring up pre-existing vlans on hotplug as well
    1f283c654aeb bridge: fix hotplug vlan overwrite on big-endian systems
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry-picked from commit 1236cbe30cec8e3e8246237005140596f8611ce9)
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 2f6b779e6d..94e0d9b57f 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2021-05-26
-PKG_SOURCE_VERSION:=899c2a4520526d43113f73cf673f20e2486a40fb
-PKG_MIRROR_HASH:=354905192b30af88ea953241ed332555e67cdb7e3b54dd139250bf1e6ad3a709
+PKG_SOURCE_DATE:=2021-07-13
+PKG_SOURCE_VERSION:=1f283c654aeb1f8983e0a81b7a81cc4784fffe3f
+PKG_MIRROR_HASH:=a65bb00f376eec5006c6efa1bc3298687054c3936de9c61997496969c93f9ccc
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Tue Jul 13 11:43:09 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 13 Jul 2021 14:43:09 -0400
Subject: [openwrt/openwrt]  rpcd: update to latest Git HEAD
In-Reply-To: <162620178899.5106.6998817194523816161@git-01.infra.openwrt.org>
References: <162620178899.5106.6998817194523816161@git-01.infra.openwrt.org>
Message-ID: <mailman.7178.1626201794.1072.lede-commits@lists.infradead.org>

jow pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/324e3fb64f5a84805f7bc9f41549e97a1a6a1563

commit 324e3fb64f5a84805f7bc9f41549e97a1a6a1563
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Tue Jul 13 20:42:26 2021 +0200

    rpcd: update to latest Git HEAD
    
    1fa3576 session: unload rpcd configuration before checking login
    
    Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
 package/system/rpcd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile
index e9040500b5..9880ea4d66 100644
--- a/package/system/rpcd/Makefile
+++ b/package/system/rpcd/Makefile
@@ -12,10 +12,10 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
-PKG_SOURCE_DATE:=2021-05-05
-PKG_SOURCE_VERSION:=7a560a1a5769146ab072f8e0165940459d3e16f7
+PKG_SOURCE_DATE:=2021-07-13
+PKG_SOURCE_VERSION:=1fa35765ddf64976aa48950cac53d501fb71dda0
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
-PKG_MIRROR_HASH:=69d9588a5a910676252eabcd2815af318806cae8316777e8b6eb00b26bdc42cb
+PKG_MIRROR_HASH:=be116e2616b3ae1b5fb9c4c338d6908f8cc9e5de239a2c83aa21b7a69b5c1c93
 
 PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=


From lede-commits at lists.infradead.org  Tue Jul 13 12:28:27 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 13 Jul 2021 15:28:27 -0400
Subject: [openwrt/openwrt]  glibc: update to latest 2.33 HEAD (bug 28011)
In-Reply-To: <162620450713.22803.18241738673682266170@git-01.infra.openwrt.org>
References: <162620450713.22803.18241738673682266170@git-01.infra.openwrt.org>
Message-ID: <mailman.7189.1626204511.1072.lede-commits@lists.infradead.org>

dedeckeh pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9d2dcc83128a035262bf15b8bbd1f57622465b42

commit 9d2dcc83128a035262bf15b8bbd1f57622465b42
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Tue Jul 13 21:21:33 2021 +0200

    glibc: update to latest 2.33 HEAD (bug 28011)
    
    b5711025bc x86_64: Remove unneeded static PIE check for undefined weak diagnostic
    edfd11197e wordexp: handle overflow in positional parameter number (bug 28011)
    
    Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
 toolchain/glibc/common.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk
index ec0621494f..48f2aa26a4 100644
--- a/toolchain/glibc/common.mk
+++ b/toolchain/glibc/common.mk
@@ -12,8 +12,8 @@ PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=58b90461ae100c95e0bc53d29d2187bad290ecaf
-PKG_MIRROR_HASH:=33fc6ec88cbf9235b151bea67db8922ef6f42dd5c1f4ff462077224fa3916be4
+PKG_SOURCE_VERSION:=b5711025bc138c0c94d90b2015d57eda404decbe
+PKG_MIRROR_HASH:=6910af6ca27ea80e600c59fad25d88c51618928316f3bfcc78ad2f0c1794da16
 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
 


From lede-commits at lists.infradead.org  Tue Jul 13 13:19:11 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 13 Jul 2021 16:19:11 -0400
Subject: [openwrt/openwrt]  mpc85xx: add missing Kconfig symbols
In-Reply-To: <162620755120.11403.11213376466370589117@git-01.infra.openwrt.org>
References: <162620755120.11403.11213376466370589117@git-01.infra.openwrt.org>
Message-ID: <mailman.7212.1626207555.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/23cde9d12a1318867d87e13c46fe3193555935ae

commit 23cde9d12a1318867d87e13c46fe3193555935ae
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Tue Jul 13 22:18:37 2021 +0200

    mpc85xx: add missing Kconfig symbols
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/mpc85xx/config-5.4           | 1 +
 target/linux/mpc85xx/p1020/config-default | 1 +
 2 files changed, 2 insertions(+)

diff --git a/target/linux/mpc85xx/config-5.4 b/target/linux/mpc85xx/config-5.4
index babd921200..d6683dab35 100644
--- a/target/linux/mpc85xx/config-5.4
+++ b/target/linux/mpc85xx/config-5.4
@@ -110,6 +110,7 @@ CONFIG_HZ_250=y
 CONFIG_HZ_PERIODIC=y
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_DESIGNWARE_SLAVE is not set
 CONFIG_I2C_MPC=y
 CONFIG_ILLEGAL_POINTER_VALUE=0
 CONFIG_INITRAMFS_SOURCE=""
diff --git a/target/linux/mpc85xx/p1020/config-default b/target/linux/mpc85xx/p1020/config-default
index c4c102ca45..ad3c3a292f 100644
--- a/target/linux/mpc85xx/p1020/config-default
+++ b/target/linux/mpc85xx/p1020/config-default
@@ -15,6 +15,7 @@ CONFIG_I2C_CHARDEV=y
 CONFIG_LEDS_LP5521=y
 CONFIG_LEDS_LP55XX_COMMON=y
 CONFIG_LOCK_SPIN_ON_OWNER=y
+# CONFIG_MAX77620_THERMAL is not set
 # CONFIG_MAX77620_WATCHDOG is not set
 CONFIG_MFD_CORE=y
 CONFIG_MFD_MAX77620=y


From lede-commits at lists.infradead.org  Tue Jul 13 21:39:00 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 14 Jul 2021 00:39:00 -0400
Subject: [openwrt/openwrt]  fstools: update to git HEAD
In-Reply-To: <162623754043.25651.10138605363379110747@git-01.infra.openwrt.org>
References: <162623754043.25651.10138605363379110747@git-01.infra.openwrt.org>
Message-ID: <mailman.7285.1626237546.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/6721c206296d008e03aee5bed35aa1b055118cee

commit 6721c206296d008e03aee5bed35aa1b055118cee
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Jul 14 05:34:23 2021 +0100

    fstools: update to git HEAD
    
     4d4dcfb blockd: detect mountpoint of /dev/mapper/*
     2f42515 block: resolve /dev/mapper/* name for /dev/dm-0 when hotplugging
     39558a1 blockd: also send ubus notification on mount hotplug
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/system/fstools/Makefile          | 6 +++---
 package/system/fstools/files/blockd.init | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index d9009c4365..59765511c6 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
-PKG_MIRROR_HASH:=41c9c51d193f5150db67fcd898b6ea904b88476c94cdfd021d81e2711441b430
-PKG_SOURCE_DATE:=2021-05-16
-PKG_SOURCE_VERSION:=3d40a1b591cd569f95891116cd033b496de0f92b
+PKG_MIRROR_HASH:=950197ab38df584b8239bfac060e70ea97e9188de2cd646d10f5b024c76ed751
+PKG_SOURCE_DATE:=2021-07-14
+PKG_SOURCE_VERSION:=39558a1f3ebbf0a56188ead4f703456feab2102f
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0
diff --git a/package/system/fstools/files/blockd.init b/package/system/fstools/files/blockd.init
index a4ce57d40d..bdd8bbf622 100755
--- a/package/system/fstools/files/blockd.init
+++ b/package/system/fstools/files/blockd.init
@@ -16,6 +16,7 @@ reload_service() {
 start_service() {
 	procd_open_instance
 	procd_set_param command "$PROG"
+	procd_set_param watch block
 	procd_set_param respawn
 	procd_close_instance
 }


From lede-commits at lists.infradead.org  Wed Jul 14 06:33:30 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 14 Jul 2021 09:33:30 -0400
Subject: [openwrt/openwrt]  netifd: update to the latest version
In-Reply-To: <162626961014.11701.8801576813037770291@git-01.infra.openwrt.org>
References: <162626961014.11701.8801576813037770291@git-01.infra.openwrt.org>
Message-ID: <mailman.7423.1626269618.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d1a812c49b57636efcb9ef6f5f0aff4f11eb6b36

commit d1a812c49b57636efcb9ef6f5f0aff4f11eb6b36
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 14 15:31:41 2021 +0200

    netifd: update to the latest version
    
    7f24a063475e vlan: fix device vlan alias handling
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index ebc601fa4a..62f3b60086 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2021-07-13
-PKG_SOURCE_VERSION:=1f283c654aeb1f8983e0a81b7a81cc4784fffe3f
-PKG_MIRROR_HASH:=a65bb00f376eec5006c6efa1bc3298687054c3936de9c61997496969c93f9ccc
+PKG_SOURCE_DATE:=2021-07-14
+PKG_SOURCE_VERSION:=7f24a063475e1e2be4e0c516a5b62c3fae5ec542
+PKG_MIRROR_HASH:=3fad25b8655e01e20f54b6c6decad6a660a34ab3ca2de97fe3c9b7db5aa485fe
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Wed Jul 14 06:34:01 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 14 Jul 2021 09:34:01 -0400
Subject: [openwrt/openwrt]  netifd: update to the latest version
In-Reply-To: <162626964130.12609.13347247238293766337@git-01.infra.openwrt.org>
References: <162626964130.12609.13347247238293766337@git-01.infra.openwrt.org>
Message-ID: <mailman.7424.1626269645.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/f3f70fb9567d12be98357ed5eac160a8f46d4cdd

commit f3f70fb9567d12be98357ed5eac160a8f46d4cdd
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 14 15:31:41 2021 +0200

    netifd: update to the latest version
    
    7f24a063475e vlan: fix device vlan alias handling
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry-picked from commit d1a812c49b57636efcb9ef6f5f0aff4f11eb6b36)
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 94e0d9b57f..f80f07a4ff 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2021-07-13
-PKG_SOURCE_VERSION:=1f283c654aeb1f8983e0a81b7a81cc4784fffe3f
-PKG_MIRROR_HASH:=a65bb00f376eec5006c6efa1bc3298687054c3936de9c61997496969c93f9ccc
+PKG_SOURCE_DATE:=2021-07-14
+PKG_SOURCE_VERSION:=7f24a063475e1e2be4e0c516a5b62c3fae5ec542
+PKG_MIRROR_HASH:=3fad25b8655e01e20f54b6c6decad6a660a34ab3ca2de97fe3c9b7db5aa485fe
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Wed Jul 14 06:49:07 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 14 Jul 2021 09:49:07 -0400
Subject: [openwrt/openwrt] mac80211: merge the virtual time based airtime
 scheduler
In-Reply-To: <162627054779.27127.16520880733845729953@git-01.infra.openwrt.org>
References: <162627054779.27127.16520880733845729953@git-01.infra.openwrt.org>
Message-ID: <mailman.7427.1626270555.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/a5888ad6b33840d913438ce664c0e7da7e7f53e6

commit a5888ad6b33840d913438ce664c0e7da7e7f53e6
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Jul 6 14:12:11 2021 +0200

    mac80211: merge the virtual time based airtime scheduler
    
    Improves airtime fairness, especially for devices with larger firmware buffers
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...0211-introduce-aql_enable-node-in-debugfs.patch |  111 ++
 ...rearrange-struct-txq_info-for-fewer-holes.patch |   39 +
 ...itch-to-a-virtual-time-based-airtime-sche.patch | 1277 ++++++++++++++++++++
 .../500-mac80211_configure_antenna_gain.patch      |    6 +-
 4 files changed, 1430 insertions(+), 3 deletions(-)

diff --git a/package/kernel/mac80211/patches/subsys/380-mac80211-introduce-aql_enable-node-in-debugfs.patch b/package/kernel/mac80211/patches/subsys/380-mac80211-introduce-aql_enable-node-in-debugfs.patch
new file mode 100644
index 0000000000..b21b671c10
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/380-mac80211-introduce-aql_enable-node-in-debugfs.patch
@@ -0,0 +1,111 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Sat, 9 Jan 2021 18:57:51 +0100
+Subject: [PATCH] mac80211: introduce aql_enable node in debugfs
+
+Introduce aql_enable node in debugfs in order to enable/disable aql.
+This is useful for debugging purpose.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Link: https://lore.kernel.org/r/e7a934d5d84e4796c4f97ea5de4e66c824296b07.1610214851.git.lorenzo at kernel.org
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/debugfs.c
++++ b/net/mac80211/debugfs.c
+@@ -281,6 +281,56 @@ static const struct file_operations aql_
+ 	.llseek = default_llseek,
+ };
+ 
++static ssize_t aql_enable_read(struct file *file, char __user *user_buf,
++			       size_t count, loff_t *ppos)
++{
++	char buf[3];
++	int len;
++
++	len = scnprintf(buf, sizeof(buf), "%d\n",
++			!static_key_false(&aql_disable.key));
++
++	return simple_read_from_buffer(user_buf, count, ppos, buf, len);
++}
++
++static ssize_t aql_enable_write(struct file *file, const char __user *user_buf,
++				size_t count, loff_t *ppos)
++{
++	bool aql_disabled = static_key_false(&aql_disable.key);
++	char buf[3];
++	size_t len;
++
++	if (count > sizeof(buf))
++		return -EINVAL;
++
++	if (copy_from_user(buf, user_buf, count))
++		return -EFAULT;
++
++	buf[sizeof(buf) - 1] = '\0';
++	len = strlen(buf);
++	if (len > 0 && buf[len - 1] == '\n')
++		buf[len - 1] = 0;
++
++	if (buf[0] == '0' && buf[1] == '\0') {
++		if (!aql_disabled)
++			static_branch_inc(&aql_disable);
++	} else if (buf[0] == '1' && buf[1] == '\0') {
++		if (aql_disabled)
++			static_branch_dec(&aql_disable);
++	} else {
++		return -EINVAL;
++	}
++
++	return count;
++}
++
++static const struct file_operations aql_enable_ops = {
++	.write = aql_enable_write,
++	.read = aql_enable_read,
++	.open = simple_open,
++	.llseek = default_llseek,
++};
++
+ static ssize_t force_tx_status_read(struct file *file,
+ 				    char __user *user_buf,
+ 				    size_t count,
+@@ -569,6 +619,7 @@ void debugfs_hw_add(struct ieee80211_loc
+ 	DEBUGFS_ADD(power);
+ 	DEBUGFS_ADD(hw_conf);
+ 	DEBUGFS_ADD_MODE(force_tx_status, 0600);
++	DEBUGFS_ADD_MODE(aql_enable, 0600);
+ 
+ 	if (local->ops->wake_tx_queue)
+ 		DEBUGFS_ADD_MODE(aqm, 0600);
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -1140,6 +1140,8 @@ enum mac80211_scan_state {
+ 	SCAN_ABORT,
+ };
+ 
++DECLARE_STATIC_KEY_FALSE(aql_disable);
++
+ struct ieee80211_local {
+ 	/* embed the driver visible part.
+ 	 * don't cast (use the static inlines below), but we keep
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -3887,6 +3887,8 @@ void __ieee80211_schedule_txq(struct iee
+ }
+ EXPORT_SYMBOL(__ieee80211_schedule_txq);
+ 
++DEFINE_STATIC_KEY_FALSE(aql_disable);
++
+ bool ieee80211_txq_airtime_check(struct ieee80211_hw *hw,
+ 				 struct ieee80211_txq *txq)
+ {
+@@ -3896,6 +3898,9 @@ bool ieee80211_txq_airtime_check(struct
+ 	if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL))
+ 		return true;
+ 
++	if (static_branch_unlikely(&aql_disable))
++		return true;
++
+ 	if (!txq->sta)
+ 		return true;
+ 
diff --git a/package/kernel/mac80211/patches/subsys/381-mac80211-rearrange-struct-txq_info-for-fewer-holes.patch b/package/kernel/mac80211/patches/subsys/381-mac80211-rearrange-struct-txq_info-for-fewer-holes.patch
new file mode 100644
index 0000000000..708ad6f460
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/381-mac80211-rearrange-struct-txq_info-for-fewer-holes.patch
@@ -0,0 +1,39 @@
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Fri, 18 Jun 2021 13:41:44 +0300
+Subject: [PATCH] mac80211: rearrange struct txq_info for fewer holes
+
+We can slightly decrease the size of struct txq_info by
+rearranging some fields for fewer holes, so do that.
+
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+Signed-off-by: Luca Coelho <luciano.coelho at intel.com>
+Link: https://lore.kernel.org/r/iwlwifi.20210618133832.1bf019a1fe2e.Ib54622b8d6dc1a9a7dc484e573c073119450538b at changeid
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -5,7 +5,7 @@
+  * Copyright 2006-2007	Jiri Benc <jbenc at suse.cz>
+  * Copyright 2007-2010	Johannes Berg <johannes at sipsolutions.net>
+  * Copyright 2013-2015  Intel Mobile Communications GmbH
+- * Copyright (C) 2018-2020 Intel Corporation
++ * Copyright (C) 2018-2021 Intel Corporation
+  */
+ 
+ #ifndef IEEE80211_I_H
+@@ -848,9 +848,12 @@ struct txq_info {
+ 	struct fq_tin tin;
+ 	struct codel_vars def_cvars;
+ 	struct codel_stats cstats;
+-	struct sk_buff_head frags;
+-	struct list_head schedule_order;
++
+ 	u16 schedule_round;
++	struct list_head schedule_order;
++
++	struct sk_buff_head frags;
++
+ 	unsigned long flags;
+ 
+ 	/* keep last! */
diff --git a/package/kernel/mac80211/patches/subsys/382-mac80211-Switch-to-a-virtual-time-based-airtime-sche.patch b/package/kernel/mac80211/patches/subsys/382-mac80211-Switch-to-a-virtual-time-based-airtime-sche.patch
new file mode 100644
index 0000000000..ba78f7a142
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/382-mac80211-Switch-to-a-virtual-time-based-airtime-sche.patch
@@ -0,0 +1,1277 @@
+From: =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= <toke at redhat.com>
+Date: Wed, 23 Jun 2021 15:47:55 +0200
+Subject: [PATCH] mac80211: Switch to a virtual time-based airtime scheduler
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This switches the airtime scheduler in mac80211 to use a virtual
+time-based scheduler instead of the round-robin scheduler used before.
+This has a couple of advantages:
+
+- No need to sync up the round-robin scheduler in firmware/hardware with
+  the round-robin airtime scheduler.
+
+- If several stations are eligible for transmission we can schedule both
+  of them; no need to hard-block the scheduling rotation until the head
+  of the queue has used up its quantum.
+
+- The check of whether a station is eligible for transmission becomes
+  simpler (in ieee80211_txq_may_transmit()).
+
+The drawback is that scheduling becomes slightly more expensive, as we
+need to maintain an rbtree of TXQs sorted by virtual time. This means
+that ieee80211_register_airtime() becomes O(logN) in the number of
+currently scheduled TXQs because it can change the order of the
+scheduled stations. We mitigate this overhead by only resorting when a
+station changes position in the tree, and hopefully N rarely grows too
+big (it's only TXQs currently backlogged, not all associated stations),
+so it shouldn't be too big of an issue.
+
+To prevent divisions in the fast path, we maintain both station sums and
+pre-computed reciprocals of the sums. This turns the fast-path operation
+into a multiplication, with divisions only happening as the number of
+active stations change (to re-compute the current sum of all active
+station weights). To prevent this re-computation of the reciprocal from
+happening too frequently, we use a time-based notion of station
+activity, instead of updating the weight every time a station gets
+scheduled or de-scheduled. As queues can oscillate between empty and
+occupied quite frequently, this can significantly cut down on the number
+of re-computations. It also has the added benefit of making the station
+airtime calculation independent on whether the queue happened to have
+drained at the time an airtime value was accounted.
+
+Co-developed-by: Yibo Zhao <yiboz at codeaurora.org>
+Signed-off-by: Yibo Zhao <yiboz at codeaurora.org>
+Signed-off-by: Toke H?iland-J?rgensen <toke at redhat.com>
+Link: https://lore.kernel.org/r/20210623134755.235545-1-toke at redhat.com
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -6552,9 +6552,6 @@ static inline void ieee80211_txq_schedul
+ {
+ }
+ 
+-void __ieee80211_schedule_txq(struct ieee80211_hw *hw,
+-			      struct ieee80211_txq *txq, bool force);
+-
+ /**
+  * ieee80211_schedule_txq - schedule a TXQ for transmission
+  *
+@@ -6567,11 +6564,7 @@ void __ieee80211_schedule_txq(struct iee
+  * The driver may call this function if it has buffered packets for
+  * this TXQ internally.
+  */
+-static inline void
+-ieee80211_schedule_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq)
+-{
+-	__ieee80211_schedule_txq(hw, txq, true);
+-}
++void ieee80211_schedule_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq);
+ 
+ /**
+  * ieee80211_return_txq - return a TXQ previously acquired by ieee80211_next_txq()
+@@ -6583,12 +6576,8 @@ ieee80211_schedule_txq(struct ieee80211_
+  * The driver may set force=true if it has buffered packets for this TXQ
+  * internally.
+  */
+-static inline void
+-ieee80211_return_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq,
+-		     bool force)
+-{
+-	__ieee80211_schedule_txq(hw, txq, force);
+-}
++void ieee80211_return_txq(struct ieee80211_hw *hw, struct ieee80211_txq *txq,
++			  bool force);
+ 
+ /**
+  * ieee80211_txq_may_transmit - check whether TXQ is allowed to transmit
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -1442,6 +1442,38 @@ static void sta_apply_mesh_params(struct
+ #endif
+ }
+ 
++static void sta_apply_airtime_params(struct ieee80211_local *local,
++				     struct sta_info *sta,
++				     struct station_parameters *params)
++{
++	u8 ac;
++
++	for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
++		struct airtime_sched_info *air_sched = &local->airtime[ac];
++		struct airtime_info *air_info = &sta->airtime[ac];
++		struct txq_info *txqi;
++		u8 tid;
++
++		spin_lock_bh(&air_sched->lock);
++		for (tid = 0; tid < IEEE80211_NUM_TIDS + 1; tid++) {
++			if (air_info->weight == params->airtime_weight ||
++			    !sta->sta.txq[tid] ||
++			    ac != ieee80211_ac_from_tid(tid))
++				continue;
++
++			airtime_weight_set(air_info, params->airtime_weight);
++
++			txqi = to_txq_info(sta->sta.txq[tid]);
++			if (RB_EMPTY_NODE(&txqi->schedule_order))
++				continue;
++
++			ieee80211_update_airtime_weight(local, air_sched,
++							0, true);
++		}
++		spin_unlock_bh(&air_sched->lock);
++	}
++}
++
+ static int sta_apply_parameters(struct ieee80211_local *local,
+ 				struct sta_info *sta,
+ 				struct station_parameters *params)
+@@ -1629,7 +1661,8 @@ static int sta_apply_parameters(struct i
+ 		sta_apply_mesh_params(local, sta, params);
+ 
+ 	if (params->airtime_weight)
+-		sta->airtime_weight = params->airtime_weight;
++		sta_apply_airtime_params(local, sta, params);
++
+ 
+ 	/* set the STA state after all sta info from usermode has been set */
+ 	if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) ||
+--- a/net/mac80211/debugfs.c
++++ b/net/mac80211/debugfs.c
+@@ -216,14 +216,14 @@ static ssize_t aql_txq_limit_read(struct
+ 			"VI	%u		%u\n"
+ 			"BE	%u		%u\n"
+ 			"BK	%u		%u\n",
+-			local->aql_txq_limit_low[IEEE80211_AC_VO],
+-			local->aql_txq_limit_high[IEEE80211_AC_VO],
+-			local->aql_txq_limit_low[IEEE80211_AC_VI],
+-			local->aql_txq_limit_high[IEEE80211_AC_VI],
+-			local->aql_txq_limit_low[IEEE80211_AC_BE],
+-			local->aql_txq_limit_high[IEEE80211_AC_BE],
+-			local->aql_txq_limit_low[IEEE80211_AC_BK],
+-			local->aql_txq_limit_high[IEEE80211_AC_BK]);
++			local->airtime[IEEE80211_AC_VO].aql_txq_limit_low,
++			local->airtime[IEEE80211_AC_VO].aql_txq_limit_high,
++			local->airtime[IEEE80211_AC_VI].aql_txq_limit_low,
++			local->airtime[IEEE80211_AC_VI].aql_txq_limit_high,
++			local->airtime[IEEE80211_AC_BE].aql_txq_limit_low,
++			local->airtime[IEEE80211_AC_BE].aql_txq_limit_high,
++			local->airtime[IEEE80211_AC_BK].aql_txq_limit_low,
++			local->airtime[IEEE80211_AC_BK].aql_txq_limit_high);
+ 	return simple_read_from_buffer(user_buf, count, ppos,
+ 				       buf, len);
+ }
+@@ -255,11 +255,11 @@ static ssize_t aql_txq_limit_write(struc
+ 	if (ac >= IEEE80211_NUM_ACS)
+ 		return -EINVAL;
+ 
+-	q_limit_low_old = local->aql_txq_limit_low[ac];
+-	q_limit_high_old = local->aql_txq_limit_high[ac];
++	q_limit_low_old = local->airtime[ac].aql_txq_limit_low;
++	q_limit_high_old = local->airtime[ac].aql_txq_limit_high;
+ 
+-	local->aql_txq_limit_low[ac] = q_limit_low;
+-	local->aql_txq_limit_high[ac] = q_limit_high;
++	local->airtime[ac].aql_txq_limit_low = q_limit_low;
++	local->airtime[ac].aql_txq_limit_high = q_limit_high;
+ 
+ 	mutex_lock(&local->sta_mtx);
+ 	list_for_each_entry(sta, &local->sta_list, list) {
+@@ -382,6 +382,46 @@ static const struct file_operations forc
+ 	.llseek = default_llseek,
+ };
+ 
++static ssize_t airtime_read(struct file *file,
++			    char __user *user_buf,
++			    size_t count,
++			    loff_t *ppos)
++{
++	struct ieee80211_local *local = file->private_data;
++	char buf[200];
++	u64 v_t[IEEE80211_NUM_ACS];
++	u64 wt[IEEE80211_NUM_ACS];
++	int len = 0, ac;
++
++	for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
++		spin_lock_bh(&local->airtime[ac].lock);
++		v_t[ac] = local->airtime[ac].v_t;
++		wt[ac] = local->airtime[ac].weight_sum;
++		spin_unlock_bh(&local->airtime[ac].lock);
++	}
++	len = scnprintf(buf, sizeof(buf),
++			"\tVO         VI         BE         BK\n"
++			"Virt-t\t%-10llu %-10llu %-10llu %-10llu\n"
++			"Weight\t%-10llu %-10llu %-10llu %-10llu\n",
++			v_t[0],
++			v_t[1],
++			v_t[2],
++			v_t[3],
++			wt[0],
++			wt[1],
++			wt[2],
++			wt[3]);
++
++	return simple_read_from_buffer(user_buf, count, ppos,
++				       buf, len);
++}
++
++static const struct file_operations airtime_ops = {
++	.read = airtime_read,
++	.open = simple_open,
++	.llseek = default_llseek,
++};
++
+ #ifdef CONFIG_PM
+ static ssize_t reset_write(struct file *file, const char __user *user_buf,
+ 			   size_t count, loff_t *ppos)
+@@ -624,7 +664,11 @@ void debugfs_hw_add(struct ieee80211_loc
+ 	if (local->ops->wake_tx_queue)
+ 		DEBUGFS_ADD_MODE(aqm, 0600);
+ 
+-	DEBUGFS_ADD_MODE(airtime_flags, 0600);
++	if (wiphy_ext_feature_isset(local->hw.wiphy,
++				    NL80211_EXT_FEATURE_AIRTIME_FAIRNESS)) {
++		DEBUGFS_ADD_MODE(airtime, 0600);
++		DEBUGFS_ADD_MODE(airtime_flags, 0600);
++	}
+ 
+ 	DEBUGFS_ADD(aql_txq_limit);
+ 	debugfs_create_u32("aql_threshold", 0600,
+--- a/net/mac80211/debugfs_netdev.c
++++ b/net/mac80211/debugfs_netdev.c
+@@ -513,6 +513,34 @@ static ssize_t ieee80211_if_fmt_aqm(
+ }
+ IEEE80211_IF_FILE_R(aqm);
+ 
++static ssize_t ieee80211_if_fmt_airtime(
++	const struct ieee80211_sub_if_data *sdata, char *buf, int buflen)
++{
++	struct ieee80211_local *local = sdata->local;
++	struct ieee80211_txq *txq = sdata->vif.txq;
++	struct airtime_info *air_info;
++	int len;
++
++	if (!txq)
++		return 0;
++
++	spin_lock_bh(&local->airtime[txq->ac].lock);
++	air_info = to_airtime_info(txq);
++	len = scnprintf(buf,
++			buflen,
++			"RX: %llu us\nTX: %llu us\nWeight: %u\n"
++			"Virt-T: %lld us\n",
++			air_info->rx_airtime,
++			air_info->tx_airtime,
++			air_info->weight,
++			air_info->v_t);
++	spin_unlock_bh(&local->airtime[txq->ac].lock);
++
++	return len;
++}
++
++IEEE80211_IF_FILE_R(airtime);
++
+ IEEE80211_IF_FILE(multicast_to_unicast, u.ap.multicast_to_unicast, HEX);
+ 
+ /* IBSS attributes */
+@@ -661,8 +689,10 @@ static void add_common_files(struct ieee
+ 
+ 	if (sdata->local->ops->wake_tx_queue &&
+ 	    sdata->vif.type != NL80211_IFTYPE_P2P_DEVICE &&
+-	    sdata->vif.type != NL80211_IFTYPE_NAN)
++	    sdata->vif.type != NL80211_IFTYPE_NAN) {
+ 		DEBUGFS_ADD(aqm);
++		DEBUGFS_ADD(airtime);
++	}
+ }
+ 
+ static void add_sta_files(struct ieee80211_sub_if_data *sdata)
+--- a/net/mac80211/debugfs_sta.c
++++ b/net/mac80211/debugfs_sta.c
+@@ -202,7 +202,7 @@ static ssize_t sta_airtime_read(struct f
+ 	size_t bufsz = 400;
+ 	char *buf = kzalloc(bufsz, GFP_KERNEL), *p = buf;
+ 	u64 rx_airtime = 0, tx_airtime = 0;
+-	s64 deficit[IEEE80211_NUM_ACS];
++	u64 v_t[IEEE80211_NUM_ACS];
+ 	ssize_t rv;
+ 	int ac;
+ 
+@@ -210,18 +210,18 @@ static ssize_t sta_airtime_read(struct f
+ 		return -ENOMEM;
+ 
+ 	for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
+-		spin_lock_bh(&local->active_txq_lock[ac]);
++		spin_lock_bh(&local->airtime[ac].lock);
+ 		rx_airtime += sta->airtime[ac].rx_airtime;
+ 		tx_airtime += sta->airtime[ac].tx_airtime;
+-		deficit[ac] = sta->airtime[ac].deficit;
+-		spin_unlock_bh(&local->active_txq_lock[ac]);
++		v_t[ac] = sta->airtime[ac].v_t;
++		spin_unlock_bh(&local->airtime[ac].lock);
+ 	}
+ 
+ 	p += scnprintf(p, bufsz + buf - p,
+ 		"RX: %llu us\nTX: %llu us\nWeight: %u\n"
+-		"Deficit: VO: %lld us VI: %lld us BE: %lld us BK: %lld us\n",
+-		rx_airtime, tx_airtime, sta->airtime_weight,
+-		deficit[0], deficit[1], deficit[2], deficit[3]);
++		"Virt-T: VO: %lld us VI: %lld us BE: %lld us BK: %lld us\n",
++		rx_airtime, tx_airtime, sta->airtime[0].weight,
++		v_t[0], v_t[1], v_t[2], v_t[3]);
+ 
+ 	rv = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
+ 	kfree(buf);
+@@ -236,11 +236,11 @@ static ssize_t sta_airtime_write(struct
+ 	int ac;
+ 
+ 	for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
+-		spin_lock_bh(&local->active_txq_lock[ac]);
++		spin_lock_bh(&local->airtime[ac].lock);
+ 		sta->airtime[ac].rx_airtime = 0;
+ 		sta->airtime[ac].tx_airtime = 0;
+-		sta->airtime[ac].deficit = sta->airtime_weight;
+-		spin_unlock_bh(&local->active_txq_lock[ac]);
++		sta->airtime[ac].v_t = 0;
++		spin_unlock_bh(&local->airtime[ac].lock);
+ 	}
+ 
+ 	return count;
+@@ -263,10 +263,10 @@ static ssize_t sta_aql_read(struct file
+ 		return -ENOMEM;
+ 
+ 	for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) {
+-		spin_lock_bh(&local->active_txq_lock[ac]);
++		spin_lock_bh(&local->airtime[ac].lock);
+ 		q_limit_l[ac] = sta->airtime[ac].aql_limit_low;
+ 		q_limit_h[ac] = sta->airtime[ac].aql_limit_high;
+-		spin_unlock_bh(&local->active_txq_lock[ac]);
++		spin_unlock_bh(&local->airtime[ac].lock);
+ 		q_depth[ac] = atomic_read(&sta->airtime[ac].aql_tx_pending);
+ 	}
+ 
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -840,20 +840,16 @@ enum txq_info_flags {
+  * @def_flow: used as a fallback flow when a packet destined to @tin hashes to
+  *	a fq_flow which is already owned by a different tin
+  * @def_cvars: codel vars for @def_flow
+- * @frags: used to keep fragments created after dequeue
+  * @schedule_order: used with ieee80211_local->active_txqs
+- * @schedule_round: counter to prevent infinite loops on TXQ scheduling
++ * @frags: used to keep fragments created after dequeue
+  */
+ struct txq_info {
+ 	struct fq_tin tin;
+ 	struct codel_vars def_cvars;
+ 	struct codel_stats cstats;
+-
+-	u16 schedule_round;
+-	struct list_head schedule_order;
++	struct rb_node schedule_order;
+ 
+ 	struct sk_buff_head frags;
+-
+ 	unsigned long flags;
+ 
+ 	/* keep last! */
+@@ -930,6 +926,8 @@ struct ieee80211_sub_if_data {
+ 	struct ieee80211_tx_queue_params tx_conf[IEEE80211_NUM_ACS];
+ 	struct mac80211_qos_map __rcu *qos_map;
+ 
++	struct airtime_info airtime[IEEE80211_NUM_ACS];
++
+ 	struct work_struct csa_finalize_work;
+ 	bool csa_block_tx; /* write-protected by sdata_lock and local->mtx */
+ 	struct cfg80211_chan_def csa_chandef;
+@@ -1143,6 +1141,44 @@ enum mac80211_scan_state {
+ 	SCAN_ABORT,
+ };
+ 
++/**
++ * struct airtime_sched_info - state used for airtime scheduling and AQL
++ *
++ * @lock: spinlock that protects all the fields in this struct
++ * @active_txqs: rbtree of currently backlogged queues, sorted by virtual time
++ * @schedule_pos: the current position maintained while a driver walks the tree
++ *                with ieee80211_next_txq()
++ * @active_list: list of struct airtime_info structs that were active within
++ *               the last AIRTIME_ACTIVE_DURATION (100 ms), used to compute
++ *               weight_sum
++ * @last_weight_update: used for rate limiting walking active_list
++ * @last_schedule_time: tracks the last time a transmission was scheduled; used
++ *                      for catching up v_t if no stations are eligible for
++ *                      transmission.
++ * @v_t: global virtual time; queues with v_t < this are eligible for
++ *       transmission
++ * @weight_sum: total sum of all active stations used for dividing airtime
++ * @weight_sum_reciprocal: reciprocal of weight_sum (to avoid divisions in fast
++ *                         path - see comment above
++ *                         IEEE80211_RECIPROCAL_DIVISOR_64)
++ * @aql_txq_limit_low: AQL limit when total outstanding airtime
++ *                     is < IEEE80211_AQL_THRESHOLD
++ * @aql_txq_limit_high: AQL limit when total outstanding airtime
++ *                      is > IEEE80211_AQL_THRESHOLD
++ */
++struct airtime_sched_info {
++	spinlock_t lock;
++	struct rb_root_cached active_txqs;
++	struct rb_node *schedule_pos;
++	struct list_head active_list;
++	u64 last_weight_update;
++	u64 last_schedule_activity;
++	u64 v_t;
++	u64 weight_sum;
++	u64 weight_sum_reciprocal;
++	u32 aql_txq_limit_low;
++	u32 aql_txq_limit_high;
++};
+ DECLARE_STATIC_KEY_FALSE(aql_disable);
+ 
+ struct ieee80211_local {
+@@ -1156,13 +1192,8 @@ struct ieee80211_local {
+ 	struct codel_params cparams;
+ 
+ 	/* protects active_txqs and txqi->schedule_order */
+-	spinlock_t active_txq_lock[IEEE80211_NUM_ACS];
+-	struct list_head active_txqs[IEEE80211_NUM_ACS];
+-	u16 schedule_round[IEEE80211_NUM_ACS];
+-
++	struct airtime_sched_info airtime[IEEE80211_NUM_ACS];
+ 	u16 airtime_flags;
+-	u32 aql_txq_limit_low[IEEE80211_NUM_ACS];
+-	u32 aql_txq_limit_high[IEEE80211_NUM_ACS];
+ 	u32 aql_threshold;
+ 	atomic_t aql_total_pending_airtime;
+ 
+@@ -1581,6 +1612,125 @@ static inline bool txq_has_queue(struct
+ 	return !(skb_queue_empty(&txqi->frags) && !txqi->tin.backlog_packets);
+ }
+ 
++static inline struct airtime_info *to_airtime_info(struct ieee80211_txq *txq)
++{
++	struct ieee80211_sub_if_data *sdata;
++	struct sta_info *sta;
++
++	if (txq->sta) {
++		sta = container_of(txq->sta, struct sta_info, sta);
++		return &sta->airtime[txq->ac];
++	}
++
++	sdata = vif_to_sdata(txq->vif);
++	return &sdata->airtime[txq->ac];
++}
++
++/* To avoid divisions in the fast path, we keep pre-computed reciprocals for
++ * airtime weight calculations. There are two different weights to keep track
++ * of: The per-station weight and the sum of weights per phy.
++ *
++ * For the per-station weights (kept in airtime_info below), we use 32-bit
++ * reciprocals with a devisor of 2^19. This lets us keep the multiplications and
++ * divisions for the station weights as 32-bit operations at the cost of a bit
++ * of rounding error for high weights; but the choice of divisor keeps rounding
++ * errors <10% for weights <2^15, assuming no more than 8ms of airtime is
++ * reported at a time.
++ *
++ * For the per-phy sum of weights the values can get higher, so we use 64-bit
++ * operations for those with a 32-bit divisor, which should avoid any
++ * significant rounding errors.
++ */
++#define IEEE80211_RECIPROCAL_DIVISOR_64 0x100000000ULL
++#define IEEE80211_RECIPROCAL_SHIFT_64 32
++#define IEEE80211_RECIPROCAL_DIVISOR_32 0x80000U
++#define IEEE80211_RECIPROCAL_SHIFT_32 19
++
++static inline void airtime_weight_set(struct airtime_info *air_info, u16 weight)
++{
++	if (air_info->weight == weight)
++		return;
++
++	air_info->weight = weight;
++	if (weight) {
++		air_info->weight_reciprocal =
++			IEEE80211_RECIPROCAL_DIVISOR_32 / weight;
++	} else {
++		air_info->weight_reciprocal = 0;
++	}
++}
++
++static inline void airtime_weight_sum_set(struct airtime_sched_info *air_sched,
++					  int weight_sum)
++{
++	if (air_sched->weight_sum == weight_sum)
++		return;
++
++	air_sched->weight_sum = weight_sum;
++	if (air_sched->weight_sum) {
++		air_sched->weight_sum_reciprocal = IEEE80211_RECIPROCAL_DIVISOR_64;
++		do_div(air_sched->weight_sum_reciprocal, air_sched->weight_sum);
++	} else {
++		air_sched->weight_sum_reciprocal = 0;
++	}
++}
++
++/* A problem when trying to enforce airtime fairness is that we want to divide
++ * the airtime between the currently *active* stations. However, basing this on
++ * the instantaneous queue state of stations doesn't work, as queues tend to
++ * oscillate very quickly between empty and occupied, leading to the scheduler
++ * thinking only a single station is active when deciding whether to allow
++ * transmission (and thus not throttling correctly).
++ *
++ * To fix this we use a timer-based notion of activity: a station is considered
++ * active if it has been scheduled within the last 100 ms; we keep a separate
++ * list of all the stations considered active in this manner, and lazily update
++ * the total weight of active stations from this list (filtering the stations in
++ * the list by their 'last active' time).
++ *
++ * We add one additional safeguard to guard against stations that manage to get
++ * scheduled every 100 ms but don't transmit a lot of data, and thus don't use
++ * up any airtime. Such stations would be able to get priority for an extended
++ * period of time if they do start transmitting at full capacity again, and so
++ * we add an explicit maximum for how far behind a station is allowed to fall in
++ * the virtual airtime domain. This limit is set to a relatively high value of
++ * 20 ms because the main mechanism for catching up idle stations is the active
++ * state as described above; i.e., the hard limit should only be hit in
++ * pathological cases.
++ */
++#define AIRTIME_ACTIVE_DURATION (100 * NSEC_PER_MSEC)
++#define AIRTIME_MAX_BEHIND 20000 /* 20 ms */
++
++static inline bool airtime_is_active(struct airtime_info *air_info, u64 now)
++{
++	return air_info->last_scheduled >= now - AIRTIME_ACTIVE_DURATION;
++}
++
++static inline void airtime_set_active(struct airtime_sched_info *air_sched,
++				      struct airtime_info *air_info, u64 now)
++{
++	air_info->last_scheduled = now;
++	air_sched->last_schedule_activity = now;
++	list_move_tail(&air_info->list, &air_sched->active_list);
++}
++
++static inline bool airtime_catchup_v_t(struct airtime_sched_info *air_sched,
++				       u64 v_t, u64 now)
++{
++	air_sched->v_t = v_t;
++	return true;
++}
++
++static inline void init_airtime_info(struct airtime_info *air_info,
++				     struct airtime_sched_info *air_sched)
++{
++	atomic_set(&air_info->aql_tx_pending, 0);
++	air_info->aql_limit_low = air_sched->aql_txq_limit_low;
++	air_info->aql_limit_high = air_sched->aql_txq_limit_high;
++	airtime_weight_set(air_info, IEEE80211_DEFAULT_AIRTIME_WEIGHT);
++	INIT_LIST_HEAD(&air_info->list);
++}
++
+ static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr)
+ {
+ 	return ether_addr_equal(raddr, addr) ||
+@@ -1821,6 +1971,14 @@ int ieee80211_tx_control_port(struct wip
+ 			      u64 *cookie);
+ int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
+ 			      const u8 *buf, size_t len);
++void ieee80211_resort_txq(struct ieee80211_hw *hw,
++			  struct ieee80211_txq *txq);
++void ieee80211_unschedule_txq(struct ieee80211_hw *hw,
++			      struct ieee80211_txq *txq,
++			      bool purge);
++void ieee80211_update_airtime_weight(struct ieee80211_local *local,
++				     struct airtime_sched_info *air_sched,
++				     u64 now, bool force);
+ 
+ /* HT */
+ void ieee80211_apply_htcap_overrides(struct ieee80211_sub_if_data *sdata,
+--- a/net/mac80211/iface.c
++++ b/net/mac80211/iface.c
+@@ -2067,6 +2067,9 @@ int ieee80211_if_add(struct ieee80211_lo
+ 		}
+ 	}
+ 
++	for (i = 0; i < IEEE80211_NUM_ACS; i++)
++		init_airtime_info(&sdata->airtime[i], &local->airtime[i]);
++
+ 	ieee80211_set_default_queues(sdata);
+ 
+ 	sdata->ap_power_level = IEEE80211_UNSET_POWER_LEVEL;
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -693,10 +693,13 @@ struct ieee80211_hw *ieee80211_alloc_hw_
+ 	spin_lock_init(&local->queue_stop_reason_lock);
+ 
+ 	for (i = 0; i < IEEE80211_NUM_ACS; i++) {
+-		INIT_LIST_HEAD(&local->active_txqs[i]);
+-		spin_lock_init(&local->active_txq_lock[i]);
+-		local->aql_txq_limit_low[i] = IEEE80211_DEFAULT_AQL_TXQ_LIMIT_L;
+-		local->aql_txq_limit_high[i] =
++		struct airtime_sched_info *air_sched = &local->airtime[i];
++
++		air_sched->active_txqs = RB_ROOT_CACHED;
++		INIT_LIST_HEAD(&air_sched->active_list);
++		spin_lock_init(&air_sched->lock);
++		air_sched->aql_txq_limit_low = IEEE80211_DEFAULT_AQL_TXQ_LIMIT_L;
++		air_sched->aql_txq_limit_high =
+ 			IEEE80211_DEFAULT_AQL_TXQ_LIMIT_H;
+ 	}
+ 
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -1573,12 +1573,8 @@ static void sta_ps_start(struct sta_info
+ 
+ 	for (tid = 0; tid < IEEE80211_NUM_TIDS; tid++) {
+ 		struct ieee80211_txq *txq = sta->sta.txq[tid];
+-		struct txq_info *txqi = to_txq_info(txq);
+ 
+-		spin_lock(&local->active_txq_lock[txq->ac]);
+-		if (!list_empty(&txqi->schedule_order))
+-			list_del_init(&txqi->schedule_order);
+-		spin_unlock(&local->active_txq_lock[txq->ac]);
++		ieee80211_unschedule_txq(&local->hw, txq, false);
+ 
+ 		if (txq_has_queue(txq))
+ 			set_bit(tid, &sta->txq_buffered_tids);
+--- a/net/mac80211/sta_info.c
++++ b/net/mac80211/sta_info.c
+@@ -426,15 +426,11 @@ struct sta_info *sta_info_alloc(struct i
+ 	if (sta_prepare_rate_control(local, sta, gfp))
+ 		goto free_txq;
+ 
+-	sta->airtime_weight = IEEE80211_DEFAULT_AIRTIME_WEIGHT;
+ 
+ 	for (i = 0; i < IEEE80211_NUM_ACS; i++) {
+ 		skb_queue_head_init(&sta->ps_tx_buf[i]);
+ 		skb_queue_head_init(&sta->tx_filtered[i]);
+-		sta->airtime[i].deficit = sta->airtime_weight;
+-		atomic_set(&sta->airtime[i].aql_tx_pending, 0);
+-		sta->airtime[i].aql_limit_low = local->aql_txq_limit_low[i];
+-		sta->airtime[i].aql_limit_high = local->aql_txq_limit_high[i];
++		init_airtime_info(&sta->airtime[i], &local->airtime[i]);
+ 	}
+ 
+ 	for (i = 0; i < IEEE80211_NUM_TIDS; i++)
+@@ -1898,24 +1894,59 @@ void ieee80211_sta_set_buffered(struct i
+ }
+ EXPORT_SYMBOL(ieee80211_sta_set_buffered);
+ 
+-void ieee80211_sta_register_airtime(struct ieee80211_sta *pubsta, u8 tid,
+-				    u32 tx_airtime, u32 rx_airtime)
++void ieee80211_register_airtime(struct ieee80211_txq *txq,
++				u32 tx_airtime, u32 rx_airtime)
+ {
+-	struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
+-	struct ieee80211_local *local = sta->sdata->local;
+-	u8 ac = ieee80211_ac_from_tid(tid);
++	struct ieee80211_sub_if_data *sdata = vif_to_sdata(txq->vif);
++	struct ieee80211_local *local = sdata->local;
++	u64 weight_sum, weight_sum_reciprocal;
++	struct airtime_sched_info *air_sched;
++	struct airtime_info *air_info;
+ 	u32 airtime = 0;
+ 
+-	if (sta->local->airtime_flags & AIRTIME_USE_TX)
++	air_sched = &local->airtime[txq->ac];
++	air_info = to_airtime_info(txq);
++
++	if (local->airtime_flags & AIRTIME_USE_TX)
+ 		airtime += tx_airtime;
+-	if (sta->local->airtime_flags & AIRTIME_USE_RX)
++	if (local->airtime_flags & AIRTIME_USE_RX)
+ 		airtime += rx_airtime;
+ 
+-	spin_lock_bh(&local->active_txq_lock[ac]);
+-	sta->airtime[ac].tx_airtime += tx_airtime;
+-	sta->airtime[ac].rx_airtime += rx_airtime;
+-	sta->airtime[ac].deficit -= airtime;
+-	spin_unlock_bh(&local->active_txq_lock[ac]);
++	/* Weights scale so the unit weight is 256 */
++	airtime <<= 8;
++
++	spin_lock_bh(&air_sched->lock);
++
++	air_info->tx_airtime += tx_airtime;
++	air_info->rx_airtime += rx_airtime;
++
++	if (air_sched->weight_sum) {
++		weight_sum = air_sched->weight_sum;
++		weight_sum_reciprocal = air_sched->weight_sum_reciprocal;
++	} else {
++		weight_sum = air_info->weight;
++		weight_sum_reciprocal = air_info->weight_reciprocal;
++	}
++
++	/* Round the calculation of global vt */
++	air_sched->v_t += (u64)((airtime + (weight_sum >> 1)) *
++				weight_sum_reciprocal) >> IEEE80211_RECIPROCAL_SHIFT_64;
++	air_info->v_t += (u32)((airtime + (air_info->weight >> 1)) *
++			       air_info->weight_reciprocal) >> IEEE80211_RECIPROCAL_SHIFT_32;
++	ieee80211_resort_txq(&local->hw, txq);
++
++	spin_unlock_bh(&air_sched->lock);
++}
++
++void ieee80211_sta_register_airtime(struct ieee80211_sta *pubsta, u8 tid,
++				    u32 tx_airtime, u32 rx_airtime)
++{
++	struct ieee80211_txq *txq = pubsta->txq[tid];
++
++	if (!txq)
++		return;
++
++	ieee80211_register_airtime(txq, tx_airtime, rx_airtime);
+ }
+ EXPORT_SYMBOL(ieee80211_sta_register_airtime);
+ 
+@@ -2364,7 +2395,7 @@ void sta_set_sinfo(struct sta_info *sta,
+ 	}
+ 
+ 	if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_AIRTIME_WEIGHT))) {
+-		sinfo->airtime_weight = sta->airtime_weight;
++		sinfo->airtime_weight = sta->airtime[0].weight;
+ 		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_AIRTIME_WEIGHT);
+ 	}
+ 
+--- a/net/mac80211/sta_info.h
++++ b/net/mac80211/sta_info.h
+@@ -135,18 +135,25 @@ enum ieee80211_agg_stop_reason {
+ #define AIRTIME_USE_TX		BIT(0)
+ #define AIRTIME_USE_RX		BIT(1)
+ 
++
+ struct airtime_info {
+ 	u64 rx_airtime;
+ 	u64 tx_airtime;
+-	s64 deficit;
++	u64 v_t;
++	u64 last_scheduled;
++	struct list_head list;
+ 	atomic_t aql_tx_pending; /* Estimated airtime for frames pending */
+ 	u32 aql_limit_low;
+ 	u32 aql_limit_high;
++	u32 weight_reciprocal;
++	u16 weight;
+ };
+ 
+ void ieee80211_sta_update_pending_airtime(struct ieee80211_local *local,
+ 					  struct sta_info *sta, u8 ac,
+ 					  u16 tx_airtime, bool tx_completed);
++void ieee80211_register_airtime(struct ieee80211_txq *txq,
++				u32 tx_airtime, u32 rx_airtime);
+ 
+ struct sta_info;
+ 
+@@ -515,7 +522,6 @@ struct ieee80211_fragment_cache {
+  * @tid_seq: per-TID sequence numbers for sending to this STA
+  * @airtime: per-AC struct airtime_info describing airtime statistics for this
+  *	station
+- * @airtime_weight: station weight for airtime fairness calculation purposes
+  * @ampdu_mlme: A-MPDU state machine state
+  * @mesh: mesh STA information
+  * @debugfs_dir: debug filesystem directory dentry
+@@ -646,7 +652,6 @@ struct sta_info {
+ 	u16 tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1];
+ 
+ 	struct airtime_info airtime[IEEE80211_NUM_ACS];
+-	u16 airtime_weight;
+ 
+ 	/*
+ 	 * Aggregation information, locked with lock.
+--- a/net/mac80211/status.c
++++ b/net/mac80211/status.c
+@@ -972,6 +972,25 @@ static void __ieee80211_tx_status(struct
+ 		if (!(info->flags & IEEE80211_TX_CTL_INJECTED) && acked)
+ 			ieee80211_frame_acked(sta, skb);
+ 
++	} else if (wiphy_ext_feature_isset(local->hw.wiphy,
++					   NL80211_EXT_FEATURE_AIRTIME_FAIRNESS)) {
++		struct ieee80211_sub_if_data *sdata;
++		struct ieee80211_txq *txq;
++		u32 airtime;
++
++		/* Account airtime to multicast queue */
++		sdata = ieee80211_sdata_from_skb(local, skb);
++
++		if (sdata && (txq = sdata->vif.txq)) {
++			airtime = info->status.tx_time ?:
++				ieee80211_calc_expected_tx_airtime(hw,
++								   &sdata->vif,
++								   NULL,
++								   skb->len,
++								   false);
++
++			ieee80211_register_airtime(txq, airtime, 0);
++		}
+ 	}
+ 
+ 	/* SNMP counters
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -18,6 +18,7 @@
+ #include <linux/bitmap.h>
+ #include <linux/rcupdate.h>
+ #include <linux/export.h>
++#include <linux/timekeeping.h>
+ #include <net/net_namespace.h>
+ #include <net/ieee80211_radiotap.h>
+ #include <net/cfg80211.h>
+@@ -1489,7 +1490,7 @@ void ieee80211_txq_init(struct ieee80211
+ 	codel_vars_init(&txqi->def_cvars);
+ 	codel_stats_init(&txqi->cstats);
+ 	__skb_queue_head_init(&txqi->frags);
+-	INIT_LIST_HEAD(&txqi->schedule_order);
++	RB_CLEAR_NODE(&txqi->schedule_order);
+ 
+ 	txqi->txq.vif = &sdata->vif;
+ 
+@@ -1533,9 +1534,7 @@ void ieee80211_txq_purge(struct ieee8021
+ 	ieee80211_purge_tx_queue(&local->hw, &txqi->frags);
+ 	spin_unlock_bh(&fq->lock);
+ 
+-	spin_lock_bh(&local->active_txq_lock[txqi->txq.ac]);
+-	list_del_init(&txqi->schedule_order);
+-	spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]);
++	ieee80211_unschedule_txq(&local->hw, &txqi->txq, true);
+ }
+ 
+ void ieee80211_txq_set_params(struct ieee80211_local *local)
+@@ -3797,102 +3796,259 @@ 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);
++	struct airtime_sched_info *air_sched;
++	u64 now = ktime_get_boottime_ns();
+ 	struct ieee80211_txq *ret = NULL;
+-	struct txq_info *txqi = NULL, *head = NULL;
+-	bool found_eligible_txq = false;
++	struct airtime_info *air_info;
++	struct txq_info *txqi = NULL;
++	struct rb_node *node;
++	bool first = false;
+ 
+-	spin_lock_bh(&local->active_txq_lock[ac]);
++	air_sched = &local->airtime[ac];
++	spin_lock_bh(&air_sched->lock);
+ 
+- begin:
+-	txqi = list_first_entry_or_null(&local->active_txqs[ac],
+-					struct txq_info,
+-					schedule_order);
+-	if (!txqi)
++	node = air_sched->schedule_pos;
++
++begin:
++	if (!node) {
++		node = rb_first_cached(&air_sched->active_txqs);
++		first = true;
++	} else {
++		node = rb_next(node);
++	}
++
++	if (!node)
+ 		goto out;
+ 
+-	if (txqi == head) {
+-		if (!found_eligible_txq)
+-			goto out;
+-		else
+-			found_eligible_txq = false;
++	txqi = container_of(node, struct txq_info, schedule_order);
++	air_info = to_airtime_info(&txqi->txq);
++
++	if (air_info->v_t > air_sched->v_t &&
++	    (!first || !airtime_catchup_v_t(air_sched, air_info->v_t, now)))
++		goto out;
++
++	if (!ieee80211_txq_airtime_check(hw, &txqi->txq)) {
++		first = false;
++		goto begin;
+ 	}
+ 
+-	if (!head)
+-		head = txqi;
++	air_sched->schedule_pos = node;
++	air_sched->last_schedule_activity = now;
++	ret = &txqi->txq;
++out:
++	spin_unlock_bh(&air_sched->lock);
++	return ret;
++}
++EXPORT_SYMBOL(ieee80211_next_txq);
+ 
+-	if (txqi->txq.sta) {
+-		struct sta_info *sta = container_of(txqi->txq.sta,
+-						    struct sta_info, sta);
+-		bool aql_check = ieee80211_txq_airtime_check(hw, &txqi->txq);
+-		s64 deficit = sta->airtime[txqi->txq.ac].deficit;
++static void __ieee80211_insert_txq(struct rb_root_cached *root,
++				   struct txq_info *txqi)
++{
++	struct rb_node **new = &root->rb_root.rb_node;
++	struct airtime_info *old_air, *new_air;
++	struct rb_node *parent = NULL;
++	struct txq_info *__txqi;
++	bool leftmost = true;
++
++	while (*new) {
++		parent = *new;
++		__txqi = rb_entry(parent, struct txq_info, schedule_order);
++		old_air = to_airtime_info(&__txqi->txq);
++		new_air = to_airtime_info(&txqi->txq);
+ 
+-		if (aql_check)
+-			found_eligible_txq = true;
++		if (new_air->v_t <= old_air->v_t) {
++			new = &parent->rb_left;
++		} else {
++			new = &parent->rb_right;
++			leftmost = false;
++		}
++	}
+ 
+-		if (deficit < 0)
+-			sta->airtime[txqi->txq.ac].deficit +=
+-				sta->airtime_weight;
+-
+-		if (deficit < 0 || !aql_check) {
+-			list_move_tail(&txqi->schedule_order,
+-				       &local->active_txqs[txqi->txq.ac]);
+-			goto begin;
++	rb_link_node(&txqi->schedule_order, parent, new);
++	rb_insert_color_cached(&txqi->schedule_order, root, leftmost);
++}
++
++void ieee80211_resort_txq(struct ieee80211_hw *hw,
++			  struct ieee80211_txq *txq)
++{
++	struct airtime_info *air_info = to_airtime_info(txq);
++	struct ieee80211_local *local = hw_to_local(hw);
++	struct txq_info *txqi = to_txq_info(txq);
++	struct airtime_sched_info *air_sched;
++
++	air_sched = &local->airtime[txq->ac];
++
++	lockdep_assert_held(&air_sched->lock);
++
++	if (!RB_EMPTY_NODE(&txqi->schedule_order)) {
++		struct airtime_info *a_prev = NULL, *a_next = NULL;
++		struct txq_info *t_prev, *t_next;
++		struct rb_node *n_prev, *n_next;
++
++		/* Erasing a node can cause an expensive rebalancing operation,
++		 * so we check the previous and next nodes first and only remove
++		 * and re-insert if the current node is not already in the
++		 * correct position.
++		 */
++		if ((n_prev = rb_prev(&txqi->schedule_order)) != NULL) {
++			t_prev = container_of(n_prev, struct txq_info,
++					      schedule_order);
++			a_prev = to_airtime_info(&t_prev->txq);
++		}
++
++		if ((n_next = rb_next(&txqi->schedule_order)) != NULL) {
++			t_next = container_of(n_next, struct txq_info,
++					      schedule_order);
++			a_next = to_airtime_info(&t_next->txq);
+ 		}
++
++		if ((!a_prev || a_prev->v_t <= air_info->v_t) &&
++		    (!a_next || a_next->v_t > air_info->v_t))
++			return;
++
++		if (air_sched->schedule_pos == &txqi->schedule_order)
++			air_sched->schedule_pos = n_prev;
++
++		rb_erase_cached(&txqi->schedule_order,
++				&air_sched->active_txqs);
++		RB_CLEAR_NODE(&txqi->schedule_order);
++		__ieee80211_insert_txq(&air_sched->active_txqs, txqi);
+ 	}
++}
++
++void ieee80211_update_airtime_weight(struct ieee80211_local *local,
++				     struct airtime_sched_info *air_sched,
++				     u64 now, bool force)
++{
++	struct airtime_info *air_info, *tmp;
++	u64 weight_sum = 0;
++
++	if (unlikely(!now))
++		now = ktime_get_boottime_ns();
++
++	lockdep_assert_held(&air_sched->lock);
++
++	if (!force && (air_sched->last_weight_update <
++		       now - AIRTIME_ACTIVE_DURATION))
++		return;
++
++	list_for_each_entry_safe(air_info, tmp,
++				 &air_sched->active_list, list) {
++		if (airtime_is_active(air_info, now))
++			weight_sum += air_info->weight;
++		else
++			list_del_init(&air_info->list);
++	}
++	airtime_weight_sum_set(air_sched, weight_sum);
++	air_sched->last_weight_update = now;
++}
+ 
++void ieee80211_schedule_txq(struct ieee80211_hw *hw,
++			    struct ieee80211_txq *txq)
++	__acquires(txq_lock) __releases(txq_lock)
++{
++	struct ieee80211_local *local = hw_to_local(hw);
++	struct txq_info *txqi = to_txq_info(txq);
++	struct airtime_sched_info *air_sched;
++	u64 now = ktime_get_boottime_ns();
++	struct airtime_info *air_info;
++	u8 ac = txq->ac;
++	bool was_active;
+ 
+-	if (txqi->schedule_round == local->schedule_round[ac])
++	air_sched = &local->airtime[ac];
++	air_info = to_airtime_info(txq);
++
++	spin_lock_bh(&air_sched->lock);
++	was_active = airtime_is_active(air_info, now);
++	airtime_set_active(air_sched, air_info, now);
++
++	if (!RB_EMPTY_NODE(&txqi->schedule_order))
+ 		goto out;
+ 
+-	list_del_init(&txqi->schedule_order);
+-	txqi->schedule_round = local->schedule_round[ac];
+-	ret = &txqi->txq;
++	/* If the station has been inactive for a while, catch up its v_t so it
++	 * doesn't get indefinite priority; see comment above the definition of
++	 * AIRTIME_MAX_BEHIND.
++	 */
++	if ((!was_active && air_info->v_t < air_sched->v_t) ||
++	    air_info->v_t < air_sched->v_t - AIRTIME_MAX_BEHIND)
++		air_info->v_t = air_sched->v_t;
++
++	ieee80211_update_airtime_weight(local, air_sched, now, !was_active);
++	__ieee80211_insert_txq(&air_sched->active_txqs, txqi);
+ 
+ out:
+-	spin_unlock_bh(&local->active_txq_lock[ac]);
+-	return ret;
++	spin_unlock_bh(&air_sched->lock);
+ }
+-EXPORT_SYMBOL(ieee80211_next_txq);
++EXPORT_SYMBOL(ieee80211_schedule_txq);
+ 
+-void __ieee80211_schedule_txq(struct ieee80211_hw *hw,
+-			      struct ieee80211_txq *txq,
+-			      bool force)
++static void __ieee80211_unschedule_txq(struct ieee80211_hw *hw,
++				       struct ieee80211_txq *txq,
++				       bool purge)
+ {
+ 	struct ieee80211_local *local = hw_to_local(hw);
+ 	struct txq_info *txqi = to_txq_info(txq);
++	struct airtime_sched_info *air_sched;
++	struct airtime_info *air_info;
+ 
+-	spin_lock_bh(&local->active_txq_lock[txq->ac]);
++	air_sched = &local->airtime[txq->ac];
++	air_info = to_airtime_info(&txqi->txq);
+ 
+-	if (list_empty(&txqi->schedule_order) &&
+-	    (force || !skb_queue_empty(&txqi->frags) ||
+-	     txqi->tin.backlog_packets)) {
+-		/* 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
+-		 * deficit. A station that already has a negative deficit will
+-		 * get immediately moved to the back of the list on the next
+-		 * call to ieee80211_next_txq().
+-		 */
+-		if (txqi->txq.sta && local->airtime_flags &&
+-		    wiphy_ext_feature_isset(local->hw.wiphy,
+-					    NL80211_EXT_FEATURE_AIRTIME_FAIRNESS))
+-			list_add(&txqi->schedule_order,
+-				 &local->active_txqs[txq->ac]);
+-		else
+-			list_add_tail(&txqi->schedule_order,
+-				      &local->active_txqs[txq->ac]);
++	lockdep_assert_held(&air_sched->lock);
++
++	if (purge) {
++		list_del_init(&air_info->list);
++		ieee80211_update_airtime_weight(local, air_sched, 0, true);
+ 	}
+ 
+-	spin_unlock_bh(&local->active_txq_lock[txq->ac]);
++	if (RB_EMPTY_NODE(&txqi->schedule_order))
++		return;
++
++	if (air_sched->schedule_pos == &txqi->schedule_order)
++		air_sched->schedule_pos = rb_prev(&txqi->schedule_order);
++
++	if (!purge)
++		airtime_set_active(air_sched, air_info,
++				   ktime_get_boottime_ns());
++
++	rb_erase_cached(&txqi->schedule_order,
++			&air_sched->active_txqs);
++	RB_CLEAR_NODE(&txqi->schedule_order);
++}
++
++void ieee80211_unschedule_txq(struct ieee80211_hw *hw,
++			      struct ieee80211_txq *txq,
++			      bool purge)
++	__acquires(txq_lock) __releases(txq_lock)
++{
++	struct ieee80211_local *local = hw_to_local(hw);
++
++	spin_lock_bh(&local->airtime[txq->ac].lock);
++	__ieee80211_unschedule_txq(hw, txq, purge);
++	spin_unlock_bh(&local->airtime[txq->ac].lock);
++}
++
++void ieee80211_return_txq(struct ieee80211_hw *hw,
++			  struct ieee80211_txq *txq, bool force)
++{
++	struct ieee80211_local *local = hw_to_local(hw);
++	struct txq_info *txqi = to_txq_info(txq);
++
++	spin_lock_bh(&local->airtime[txq->ac].lock);
++
++	if (!RB_EMPTY_NODE(&txqi->schedule_order) && !force &&
++	    !txq_has_queue(txq))
++		__ieee80211_unschedule_txq(hw, txq, false);
++
++	spin_unlock_bh(&local->airtime[txq->ac].lock);
+ }
+-EXPORT_SYMBOL(__ieee80211_schedule_txq);
++EXPORT_SYMBOL(ieee80211_return_txq);
+ 
+ DEFINE_STATIC_KEY_FALSE(aql_disable);
+ 
+ bool ieee80211_txq_airtime_check(struct ieee80211_hw *hw,
+ 				 struct ieee80211_txq *txq)
+ {
+-	struct sta_info *sta;
++	struct airtime_info *air_info = to_airtime_info(txq);
+ 	struct ieee80211_local *local = hw_to_local(hw);
+ 
+ 	if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL))
+@@ -3907,15 +4063,12 @@ bool ieee80211_txq_airtime_check(struct
+ 	if (unlikely(txq->tid == IEEE80211_NUM_TIDS))
+ 		return true;
+ 
+-	sta = container_of(txq->sta, struct sta_info, sta);
+-	if (atomic_read(&sta->airtime[txq->ac].aql_tx_pending) <
+-	    sta->airtime[txq->ac].aql_limit_low)
++	if (atomic_read(&air_info->aql_tx_pending) < air_info->aql_limit_low)
+ 		return true;
+ 
+ 	if (atomic_read(&local->aql_total_pending_airtime) <
+ 	    local->aql_threshold &&
+-	    atomic_read(&sta->airtime[txq->ac].aql_tx_pending) <
+-	    sta->airtime[txq->ac].aql_limit_high)
++	    atomic_read(&air_info->aql_tx_pending) < air_info->aql_limit_high)
+ 		return true;
+ 
+ 	return false;
+@@ -3925,60 +4078,59 @@ EXPORT_SYMBOL(ieee80211_txq_airtime_chec
+ bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw,
+ 				struct ieee80211_txq *txq)
+ {
++	struct txq_info *first_txqi = NULL, *txqi = to_txq_info(txq);
+ 	struct ieee80211_local *local = hw_to_local(hw);
+-	struct txq_info *iter, *tmp, *txqi = to_txq_info(txq);
+-	struct sta_info *sta;
+-	u8 ac = txq->ac;
++	struct airtime_sched_info *air_sched;
++	struct airtime_info *air_info;
++	struct rb_node *node = NULL;
++	bool ret = false;
++	u64 now;
+ 
+-	spin_lock_bh(&local->active_txq_lock[ac]);
+ 
+-	if (!txqi->txq.sta)
+-		goto out;
++	if (!ieee80211_txq_airtime_check(hw, txq))
++		return false;
++
++	air_sched = &local->airtime[txq->ac];
++	spin_lock_bh(&air_sched->lock);
+ 
+-	if (list_empty(&txqi->schedule_order))
++	if (RB_EMPTY_NODE(&txqi->schedule_order))
+ 		goto out;
+ 
+-	list_for_each_entry_safe(iter, tmp, &local->active_txqs[ac],
+-				 schedule_order) {
+-		if (iter == txqi)
+-			break;
++	now = ktime_get_boottime_ns();
+ 
+-		if (!iter->txq.sta) {
+-			list_move_tail(&iter->schedule_order,
+-				       &local->active_txqs[ac]);
+-			continue;
+-		}
+-		sta = container_of(iter->txq.sta, struct sta_info, sta);
+-		if (sta->airtime[ac].deficit < 0)
+-			sta->airtime[ac].deficit += sta->airtime_weight;
+-		list_move_tail(&iter->schedule_order, &local->active_txqs[ac]);
++	/* Like in ieee80211_next_txq(), make sure the first station in the
++	 * scheduling order is eligible for transmission to avoid starvation.
++	 */
++	node = rb_first_cached(&air_sched->active_txqs);
++	if (node) {
++		first_txqi = container_of(node, struct txq_info,
++					  schedule_order);
++		air_info = to_airtime_info(&first_txqi->txq);
++
++		if (air_sched->v_t < air_info->v_t)
++			airtime_catchup_v_t(air_sched, air_info->v_t, now);
+ 	}
+ 
+-	sta = container_of(txqi->txq.sta, struct sta_info, sta);
+-	if (sta->airtime[ac].deficit >= 0)
+-		goto out;
+-
+-	sta->airtime[ac].deficit += sta->airtime_weight;
+-	list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]);
+-	spin_unlock_bh(&local->active_txq_lock[ac]);
++	air_info = to_airtime_info(&txqi->txq);
++	if (air_info->v_t <= air_sched->v_t) {
++		air_sched->last_schedule_activity = now;
++		ret = true;
++	}
+ 
+-	return false;
+ out:
+-	if (!list_empty(&txqi->schedule_order))
+-		list_del_init(&txqi->schedule_order);
+-	spin_unlock_bh(&local->active_txq_lock[ac]);
+-
+-	return true;
++	spin_unlock_bh(&air_sched->lock);
++	return ret;
+ }
+ EXPORT_SYMBOL(ieee80211_txq_may_transmit);
+ 
+ void ieee80211_txq_schedule_start(struct ieee80211_hw *hw, u8 ac)
+ {
+ 	struct ieee80211_local *local = hw_to_local(hw);
++	struct airtime_sched_info *air_sched = &local->airtime[ac];
+ 
+-	spin_lock_bh(&local->active_txq_lock[ac]);
+-	local->schedule_round[ac]++;
+-	spin_unlock_bh(&local->active_txq_lock[ac]);
++	spin_lock_bh(&air_sched->lock);
++	air_sched->schedule_pos = NULL;
++	spin_unlock_bh(&air_sched->lock);
+ }
+ EXPORT_SYMBOL(ieee80211_txq_schedule_start);
+ 
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 febe42eb9d..990ef04eca 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
@@ -57,7 +57,7 @@
  	__NL80211_ATTR_AFTER_LAST,
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -2709,6 +2709,19 @@ static int ieee80211_get_tx_power(struct
+@@ -2742,6 +2742,19 @@ static int ieee80211_get_tx_power(struct
  	return 0;
  }
  
@@ -77,7 +77,7 @@
  static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
  				  const u8 *addr)
  {
-@@ -4139,6 +4152,7 @@ const struct cfg80211_ops mac80211_confi
+@@ -4172,6 +4185,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,
@@ -87,7 +87,7 @@
  	CFG80211_TESTMODE_CMD(ieee80211_testmode_cmd)
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -1390,6 +1390,7 @@ struct ieee80211_local {
+@@ -1426,6 +1426,7 @@ struct ieee80211_local {
  	int dynamic_ps_forced_timeout;
  
  	int user_power_level; /* in dBm, for all interfaces */


From lede-commits at lists.infradead.org  Wed Jul 14 09:10:08 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 14 Jul 2021 12:10:08 -0400
Subject: [openwrt/openwrt]  mac80211: merge a 4-addr client mode fix
In-Reply-To: <162627900885.29680.14071543393312925895@git-01.infra.openwrt.org>
References: <162627900885.29680.14071543393312925895@git-01.infra.openwrt.org>
Message-ID: <mailman.7456.1626279013.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/19228c456208776b2d9862fc1974c3e91c01a816

commit 19228c456208776b2d9862fc1974c3e91c01a816
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 14 16:24:32 2021 +0200

    mac80211: merge a 4-addr client mode fix
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...x-enabling-4-address-mode-on-a-sta-vif-af.patch | 72 ++++++++++++++++++++++
 1 file changed, 72 insertions(+)

diff --git a/package/kernel/mac80211/patches/subsys/383-mac80211-fix-enabling-4-address-mode-on-a-sta-vif-af.patch b/package/kernel/mac80211/patches/subsys/383-mac80211-fix-enabling-4-address-mode-on-a-sta-vif-af.patch
new file mode 100644
index 0000000000..5a82f00c9e
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/383-mac80211-fix-enabling-4-address-mode-on-a-sta-vif-af.patch
@@ -0,0 +1,72 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Fri, 2 Jul 2021 06:57:53 +0200
+Subject: [PATCH] mac80211: fix enabling 4-address mode on a sta vif after
+ assoc
+
+Notify the driver about the 4-address mode change and also send a nulldata
+packet to the AP to notify it about the change
+
+Fixes: 1ff4e8f2dec8 ("mac80211: notify the driver when a sta uses 4-address mode")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -152,6 +152,8 @@ static int ieee80211_change_iface(struct
+ 				  struct vif_params *params)
+ {
+ 	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
++	struct ieee80211_local *local = sdata->local;
++	struct sta_info *sta;
+ 	int ret;
+ 
+ 	ret = ieee80211_if_change_type(sdata, type);
+@@ -162,7 +164,24 @@ static int ieee80211_change_iface(struct
+ 		RCU_INIT_POINTER(sdata->u.vlan.sta, NULL);
+ 		ieee80211_check_fast_rx_iface(sdata);
+ 	} else if (type == NL80211_IFTYPE_STATION && params->use_4addr >= 0) {
++		struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
++
++		if (params->use_4addr == ifmgd->use_4addr)
++			return 0;
++
+ 		sdata->u.mgd.use_4addr = params->use_4addr;
++		if (!ifmgd->associated)
++			return 0;
++
++		mutex_lock(&local->sta_mtx);
++		sta = sta_info_get(sdata, ifmgd->bssid);
++		if (sta)
++			drv_sta_set_4addr(local, sdata, &sta->sta,
++					  params->use_4addr);
++		mutex_unlock(&local->sta_mtx);
++
++		if (params->use_4addr)
++			ieee80211_send_4addr_nullfunc(local, sdata);
+ 	}
+ 
+ 	if (sdata->vif.type == NL80211_IFTYPE_MONITOR) {
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -2224,6 +2224,8 @@ void ieee80211_dynamic_ps_timer(struct t
+ void ieee80211_send_nullfunc(struct ieee80211_local *local,
+ 			     struct ieee80211_sub_if_data *sdata,
+ 			     bool powersave);
++void ieee80211_send_4addr_nullfunc(struct ieee80211_local *local,
++				   struct ieee80211_sub_if_data *sdata);
+ void ieee80211_sta_tx_notify(struct ieee80211_sub_if_data *sdata,
+ 			     struct ieee80211_hdr *hdr, bool ack, u16 tx_time);
+ 
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -1115,8 +1115,8 @@ void ieee80211_send_nullfunc(struct ieee
+ 	ieee80211_tx_skb(sdata, skb);
+ }
+ 
+-static void ieee80211_send_4addr_nullfunc(struct ieee80211_local *local,
+-					  struct ieee80211_sub_if_data *sdata)
++void ieee80211_send_4addr_nullfunc(struct ieee80211_local *local,
++				   struct ieee80211_sub_if_data *sdata)
+ {
+ 	struct sk_buff *skb;
+ 	struct ieee80211_hdr *nullfunc;


From lede-commits at lists.infradead.org  Wed Jul 14 09:10:10 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 14 Jul 2021 12:10:10 -0400
Subject: [openwrt/openwrt]  mt76: update to the latest version
In-Reply-To: <162627900885.29680.14071543393312925895@git-01.infra.openwrt.org>
References: <162627900885.29680.14071543393312925895@git-01.infra.openwrt.org>
Message-ID: <mailman.7457.1626279013.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/99a22d48f2003910f0968369b61b9131a8f53d80

commit 99a22d48f2003910f0968369b61b9131a8f53d80
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 14 18:08:21 2021 +0200

    mt76: update to the latest version
    
    624c681ef0c6 mt76: mt7921: enable VHT BFee capability
    a27dfcb63ccf mt76: connac: fix UC entry is being overwritten
    6b691e62470e mt76: connac: add mt76_connac_power_save_sched in mt76_connac_pm_unref
    b14365bea586 mt76: mt7921: wake the device before dumping power table
    82af16bddfc0 mt76: mt7921: make mt7921_set_channel static
    b24598b1c1a9 mt76: connac: add mt76_connac_mcu_get_nic_capability utility routine
    5954e3381ff9 mt76: testmode: move chip-specific stats dump before common stats
    fd5b612f9aa4 mt76: mt7915: fix rx fcs error count in testmode
    d9d26a294f7b mt76: connac: fix the maximum interval schedule scan can support
    ed39c882f388 mt76: reduce rx buffer size to 2048
    60f3d3adbba6 mt76: move mt76_get_next_pkt_id in mt76.h
    67ed4d902c84 mt76: connac: check band caps in mt76_connac_mcu_set_rate_txpower
    23c6ec49c000 mt76: make mt76_update_survey() per phy
    5ca602fb9455 mt76: mt7915: introduce mt7915_mcu_set_txbf()
    c13df42282e9 mt76: mt7915: improve MU stability
    dee7dcddcaa0 mt76: use SPDX header file comment style
    6fbd47153b3d mt76: mt7915: fix IEEE80211_HE_PHY_CAP7_MAX_NC for station mode
    1b97dd1762ca mt76: mt7921: fix sta_state incorrect implementation
    1b89053b5a6f mt76: mt7921: improve code readability for mt7921_update_txs
    126649816785 mt76: mt7921: limit txpower according to userlevel power
    a5163ac09be2 mt76: mt7921: introduce dedicated control for deep_sleep
    e47c04db4d7e mt76: mt7921: fix kernel warning when reset on vif is not sta
    063d3611662c mt76: mt7921: fix the coredump is being truncated
    12bf28feba7c mt76: fix iv and CCMP header insertion
    949327e76ee4 mt76: disable TWT capabilities for the moment
    3530254c1bc9 mt76: mt7921: enable HE BFee capability
    599e35f5d9b8 mt76: sdio: do not run mt76_txq_schedule directly
    3b6d30c28946 mt76: mt7663s: rely on pm reference counting
    529d55a79088 mt76: mt7663s: rely on mt76_connac_pm_ref/mt76_connac_pm_unref in tx path
    ef44ff116ee2 mt76: mt7663s: enable runtime-pm
    3a71e71a555e mt76: mt7615: set macwork timeout according to runtime-pm
    925d96e443a4 mt76: mt7921: allow chip reset during device restart
    63b114d84361 mt76: mt76x0e: fix device hang during suspend/resume
    7f5ea5e2fd10 mt7915: check return code of sysfs_create_link
    ca64a36908b7 mt76: fix mt76_rates for the multiple devices
    f517116bf14c mt76: add mt76_default_basic_rate more devices can rely on
    6c70b0100513 mt76: mt7921: fix mgmt frame using unexpected bitrate
    c00a9a6b52af mt76: mt7915: fix mgmt frame using unexpected bitrate
    0e4089949565 mt76: mt7921: fix endianness in mt7921_mcu_tx_done_event
    55f314120ef2 mt76: mt7921: avoid unnecessary spin_lock/spin_unlock in mt7921_mcu_tx_done_event
    541cd3276488 mt76: mt7915: fix endianness warning in mt7915_mac_add_txs_skb
    817761e87c4f mt76: mt7921: fix endianness warning in mt7921_update_txs
    b8eca74bbd7b mt76: mt7615: fix endianness warning in mt7615_mac_write_txwi
    5e5e07f0def3 mt76: mt7915: fix potential overflow of eeprom page index
    abda4cded420 mt76: mt7915: fix info leak in mt7915_mcu_set_pre_cal()
    535899f81a46 mt76: mt7915: fix calling mt76_wcid_alloc with incorrect parameter
    adfa1b9a3ca0 mt76: connac: fix mt76_connac_gtk_rekey_tlv usage
    2a65b105ea4a mt76: mt7921: enable aspm by default
    c57158c82804 mt76: fix build error implicit enumeration conversion
    41f607cab83c mt76: mt7921: fix survey-dump reporting
    25b4f885a937 mt76: mt76x02: fix endianness warnings in mt76x02_mac.c
    e63fadb87fe1 mt76: mt7915: report HE MU radiotap
    135ef3e9827a mt76: mt7915: adapt new firmware to update BA winsize for Rx session
    7118eacb7ce4 mt76: mt7921: add .set_sar_specs support
    f1f6569da408 mt76: mt7915: fix an off-by-one bound check
    f7da39467965 mt76 mt7915: take RCU read lock when calling ieee80211_bss_get_elem()
    87af8e5c72b1 mt76: mt7915: cleanup -Wunused-but-set-variable
    8e2d383fbd92 mt76: mt7915: report tx rate directly from tx status
    ddce30977591 mt76: mt7915: remove mt7915_sta_stats
    4ccd42029519 mt76: mt7921: introduce testmode support
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/kernel/mt76/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 74d5950545..3969c13810 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2021-06-06
-PKG_SOURCE_VERSION:=22b690334c0f49b11534cc2e331c9d5e17c4a0bc
-PKG_MIRROR_HASH:=ff5e563935919d2e40c1e7254ef3bc06f7ecc5e69f8ddd12903e8f5de942d630
+PKG_SOURCE_DATE:=2021-07-14
+PKG_SOURCE_VERSION:=4ccd42029519d2b3d3b4e0abcd59928841845caf
+PKG_MIRROR_HASH:=26f721abd55587b331bae371dd41820796fcc27554c1be50e03572dccc82413e
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0


From lede-commits at lists.infradead.org  Wed Jul 14 09:10:09 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 14 Jul 2021 12:10:09 -0400
Subject: [openwrt/openwrt]  mac80211: backport SAR power limit support
In-Reply-To: <162627900885.29680.14071543393312925895@git-01.infra.openwrt.org>
References: <162627900885.29680.14071543393312925895@git-01.infra.openwrt.org>
Message-ID: <mailman.7458.1626279016.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/890bf06cef20015e2cec0274c87a9a2232691b6b

commit 890bf06cef20015e2cec0274c87a9a2232691b6b
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 14 17:14:35 2021 +0200

    mac80211: backport SAR power limit support
    
    Needed for an upcoming mt76 update
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...-common-API-to-configure-SAR-power-limita.patch | 398 +++++++++++++++++++++
 .../385-mac80211-add-ieee80211_set_sar_specs.patch |  51 +++
 .../500-mac80211_configure_antenna_gain.patch      |  14 +-
 3 files changed, 456 insertions(+), 7 deletions(-)

diff --git a/package/kernel/mac80211/patches/subsys/384-nl80211-add-common-API-to-configure-SAR-power-limita.patch b/package/kernel/mac80211/patches/subsys/384-nl80211-add-common-API-to-configure-SAR-power-limita.patch
new file mode 100644
index 0000000000..0c9ae3595d
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/384-nl80211-add-common-API-to-configure-SAR-power-limita.patch
@@ -0,0 +1,398 @@
+From: Carl Huang <cjhuang at codeaurora.org>
+Date: Thu, 3 Dec 2020 05:37:26 -0500
+Subject: [PATCH] nl80211: add common API to configure SAR power limitations
+
+NL80211_CMD_SET_SAR_SPECS is added to configure SAR from
+user space. NL80211_ATTR_SAR_SPEC is used to pass the SAR
+power specification when used with NL80211_CMD_SET_SAR_SPECS.
+
+Wireless driver needs to register SAR type, supported frequency
+ranges to wiphy, so user space can query it. The index in
+frequency range is used to specify which sub band the power
+limitation applies to. The SAR type is for compatibility, so later
+other SAR mechanism can be implemented without breaking the user
+space SAR applications.
+
+Normal process is user space queries the SAR capability, and
+gets the index of supported frequency ranges and associates the
+power limitation with this index and sends to kernel.
+
+Here is an example of message send to kernel:
+8c 00 00 00 08 00 01 00 00 00 00 00 38 00 2b 81
+08 00 01 00 00 00 00 00 2c 00 02 80 14 00 00 80
+08 00 02 00 00 00 00 00 08 00 01 00 38 00 00 00
+14 00 01 80 08 00 02 00 01 00 00 00 08 00 01 00
+48 00 00 00
+
+NL80211_CMD_SET_SAR_SPECS:  0x8c
+NL80211_ATTR_WIPHY:     0x01(phy idx is 0)
+NL80211_ATTR_SAR_SPEC:  0x812b (NLA_NESTED)
+NL80211_SAR_ATTR_TYPE:  0x00 (NL80211_SAR_TYPE_POWER)
+NL80211_SAR_ATTR_SPECS: 0x8002 (NLA_NESTED)
+freq range 0 power: 0x38 in 0.25dbm unit (14dbm)
+freq range 1 power: 0x48 in 0.25dbm unit (18dbm)
+
+Signed-off-by: Carl Huang <cjhuang at codeaurora.org>
+Reviewed-by: Brian Norris <briannorris at chromium.org>
+Reviewed-by: Abhishek Kumar <kuabhs at chromium.org>
+Link: https://lore.kernel.org/r/20201203103728.3034-2-cjhuang at codeaurora.org
+[minor edits, NLA parse cleanups]
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/include/net/cfg80211.h
++++ b/include/net/cfg80211.h
+@@ -1737,6 +1737,54 @@ struct station_info {
+ 	u8 connected_to_as;
+ };
+ 
++/**
++ * struct cfg80211_sar_sub_specs - sub specs limit
++ * @power: power limitation in 0.25dbm
++ * @freq_range_index: index the power limitation applies to
++ */
++struct cfg80211_sar_sub_specs {
++	s32 power;
++	u32 freq_range_index;
++};
++
++/**
++ * struct cfg80211_sar_specs - sar limit specs
++ * @type: it's set with power in 0.25dbm or other types
++ * @num_sub_specs: number of sar sub specs
++ * @sub_specs: memory to hold the sar sub specs
++ */
++struct cfg80211_sar_specs {
++	enum nl80211_sar_type type;
++	u32 num_sub_specs;
++	struct cfg80211_sar_sub_specs sub_specs[];
++};
++
++
++/**
++ * @struct cfg80211_sar_chan_ranges - sar frequency ranges
++ * @start_freq:  start range edge frequency
++ * @end_freq:    end range edge frequency
++ */
++struct cfg80211_sar_freq_ranges {
++	u32 start_freq;
++	u32 end_freq;
++};
++
++/**
++ * struct cfg80211_sar_capa - sar limit capability
++ * @type: it's set via power in 0.25dbm or other types
++ * @num_freq_ranges: number of frequency ranges
++ * @freq_ranges: memory to hold the freq ranges.
++ *
++ * Note: WLAN driver may append new ranges or split an existing
++ * range to small ones and then append them.
++ */
++struct cfg80211_sar_capa {
++	enum nl80211_sar_type type;
++	u32 num_freq_ranges;
++	const struct cfg80211_sar_freq_ranges *freq_ranges;
++};
++
+ #if IS_ENABLED(CPTCFG_CFG80211)
+ /**
+  * cfg80211_get_station - retrieve information about a given station
+@@ -4259,6 +4307,8 @@ struct cfg80211_ops {
+ 				  struct cfg80211_tid_config *tid_conf);
+ 	int	(*reset_tid_config)(struct wiphy *wiphy, struct net_device *dev,
+ 				    const u8 *peer, u8 tids);
++	int	(*set_sar_specs)(struct wiphy *wiphy,
++				 struct cfg80211_sar_specs *sar);
+ };
+ 
+ /*
+@@ -5030,6 +5080,8 @@ struct wiphy {
+ 
+ 	u8 max_data_retry_count;
+ 
++	const struct cfg80211_sar_capa *sar_capa;
++
+ 	char priv[] __aligned(NETDEV_ALIGN);
+ };
+ 
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -405,6 +405,18 @@ nl80211_unsol_bcast_probe_resp_policy[NL
+ 						       .len = IEEE80211_MAX_DATA_LEN }
+ };
+ 
++static const struct nla_policy
++sar_specs_policy[NL80211_SAR_ATTR_SPECS_MAX + 1] = {
++	[NL80211_SAR_ATTR_SPECS_POWER] = { .type = NLA_S32 },
++	[NL80211_SAR_ATTR_SPECS_RANGE_INDEX] = {.type = NLA_U32 },
++};
++
++static const struct nla_policy
++sar_policy[NL80211_SAR_ATTR_MAX + 1] = {
++	[NL80211_SAR_ATTR_TYPE] = NLA_POLICY_MAX(NLA_U32, NUM_NL80211_SAR_TYPE),
++	[NL80211_SAR_ATTR_SPECS] = NLA_POLICY_NESTED_ARRAY(sar_specs_policy),
++};
++
+ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
+ 	[0] = { .strict_start_type = NL80211_ATTR_HE_OBSS_PD },
+ 	[NL80211_ATTR_WIPHY] = { .type = NLA_U32 },
+@@ -739,6 +751,7 @@ static const struct nla_policy nl80211_p
+ 	[NL80211_ATTR_SAE_PWE] =
+ 		NLA_POLICY_RANGE(NLA_U8, NL80211_SAE_PWE_HUNT_AND_PECK,
+ 				 NL80211_SAE_PWE_BOTH),
++	[NL80211_ATTR_SAR_SPEC] = NLA_POLICY_NESTED(sar_policy),
+ 	[NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT },
+ };
+ 
+@@ -2117,6 +2130,56 @@ fail:
+ 	return -ENOBUFS;
+ }
+ 
++static int
++nl80211_put_sar_specs(struct cfg80211_registered_device *rdev,
++		      struct sk_buff *msg)
++{
++	struct nlattr *sar_capa, *specs, *sub_freq_range;
++	u8 num_freq_ranges;
++	int i;
++
++	if (!rdev->wiphy.sar_capa)
++		return 0;
++
++	num_freq_ranges = rdev->wiphy.sar_capa->num_freq_ranges;
++
++	sar_capa = nla_nest_start(msg, NL80211_ATTR_SAR_SPEC);
++	if (!sar_capa)
++		return -ENOSPC;
++
++	if (nla_put_u32(msg, NL80211_SAR_ATTR_TYPE, rdev->wiphy.sar_capa->type))
++		goto fail;
++
++	specs = nla_nest_start(msg, NL80211_SAR_ATTR_SPECS);
++	if (!specs)
++		goto fail;
++
++	/* report supported freq_ranges */
++	for (i = 0; i < num_freq_ranges; i++) {
++		sub_freq_range = nla_nest_start(msg, i + 1);
++		if (!sub_freq_range)
++			goto fail;
++
++		if (nla_put_u32(msg, NL80211_SAR_ATTR_SPECS_START_FREQ,
++				rdev->wiphy.sar_capa->freq_ranges[i].start_freq))
++			goto fail;
++
++		if (nla_put_u32(msg, NL80211_SAR_ATTR_SPECS_END_FREQ,
++				rdev->wiphy.sar_capa->freq_ranges[i].end_freq))
++			goto fail;
++
++		nla_nest_end(msg, sub_freq_range);
++	}
++
++	nla_nest_end(msg, specs);
++	nla_nest_end(msg, sar_capa);
++
++	return 0;
++fail:
++	nla_nest_cancel(msg, sar_capa);
++	return -ENOBUFS;
++}
++
+ struct nl80211_dump_wiphy_state {
+ 	s64 filter_wiphy;
+ 	long start;
+@@ -2366,6 +2429,8 @@ static int nl80211_send_wiphy(struct cfg
+ 			CMD(set_multicast_to_unicast, SET_MULTICAST_TO_UNICAST);
+ 			CMD(update_connect_params, UPDATE_CONNECT_PARAMS);
+ 			CMD(update_ft_ies, UPDATE_FT_IES);
++			if (rdev->wiphy.sar_capa)
++				CMD(set_sar_specs, SET_SAR_SPECS);
+ 		}
+ #undef CMD
+ 
+@@ -2691,6 +2756,11 @@ static int nl80211_send_wiphy(struct cfg
+ 
+ 		if (nl80211_put_tid_config_support(rdev, msg))
+ 			goto nla_put_failure;
++		state->split_start++;
++		break;
++	case 16:
++		if (nl80211_put_sar_specs(rdev, msg))
++			goto nla_put_failure;
+ 
+ 		/* done */
+ 		state->split_start = 0;
+@@ -14713,6 +14783,111 @@ static void nl80211_post_doit(__genl_con
+ 	}
+ }
+ 
++static int nl80211_set_sar_sub_specs(struct cfg80211_registered_device *rdev,
++				     struct cfg80211_sar_specs *sar_specs,
++				     struct nlattr *spec[], int index)
++{
++	u32 range_index, i;
++
++	if (!sar_specs || !spec)
++		return -EINVAL;
++
++	if (!spec[NL80211_SAR_ATTR_SPECS_POWER] ||
++	    !spec[NL80211_SAR_ATTR_SPECS_RANGE_INDEX])
++		return -EINVAL;
++
++	range_index = nla_get_u32(spec[NL80211_SAR_ATTR_SPECS_RANGE_INDEX]);
++
++	/* check if range_index exceeds num_freq_ranges */
++	if (range_index >= rdev->wiphy.sar_capa->num_freq_ranges)
++		return -EINVAL;
++
++	/* check if range_index duplicates */
++	for (i = 0; i < index; i++) {
++		if (sar_specs->sub_specs[i].freq_range_index == range_index)
++			return -EINVAL;
++	}
++
++	sar_specs->sub_specs[index].power =
++		nla_get_s32(spec[NL80211_SAR_ATTR_SPECS_POWER]);
++
++	sar_specs->sub_specs[index].freq_range_index = range_index;
++
++	return 0;
++}
++
++static int nl80211_set_sar_specs(struct sk_buff *skb, struct genl_info *info)
++{
++	struct cfg80211_registered_device *rdev = info->user_ptr[0];
++	struct nlattr *spec[NL80211_SAR_ATTR_SPECS_MAX + 1];
++	struct nlattr *tb[NL80211_SAR_ATTR_MAX + 1];
++	struct cfg80211_sar_specs *sar_spec;
++	enum nl80211_sar_type type;
++	struct nlattr *spec_list;
++	u32 specs;
++	int rem, err;
++
++	if (!rdev->wiphy.sar_capa || !rdev->ops->set_sar_specs)
++		return -EOPNOTSUPP;
++
++	if (!info->attrs[NL80211_ATTR_SAR_SPEC])
++		return -EINVAL;
++
++	nla_parse_nested(tb, NL80211_SAR_ATTR_MAX,
++			 info->attrs[NL80211_ATTR_SAR_SPEC],
++			 NULL, NULL);
++
++	if (!tb[NL80211_SAR_ATTR_TYPE] || !tb[NL80211_SAR_ATTR_SPECS])
++		return -EINVAL;
++
++	type = nla_get_u32(tb[NL80211_SAR_ATTR_TYPE]);
++	if (type != rdev->wiphy.sar_capa->type)
++		return -EINVAL;
++
++	specs = 0;
++	nla_for_each_nested(spec_list, tb[NL80211_SAR_ATTR_SPECS], rem)
++		specs++;
++
++	if (specs > rdev->wiphy.sar_capa->num_freq_ranges)
++		return -EINVAL;
++
++	sar_spec = kzalloc(sizeof(*sar_spec) +
++			   specs * sizeof(struct cfg80211_sar_sub_specs),
++			   GFP_KERNEL);
++	if (!sar_spec)
++		return -ENOMEM;
++
++	sar_spec->type = type;
++	specs = 0;
++	nla_for_each_nested(spec_list, tb[NL80211_SAR_ATTR_SPECS], rem) {
++		nla_parse_nested(spec, NL80211_SAR_ATTR_SPECS_MAX,
++				 spec_list, NULL, NULL);
++
++		switch (type) {
++		case NL80211_SAR_TYPE_POWER:
++			if (nl80211_set_sar_sub_specs(rdev, sar_spec,
++						      spec, specs)) {
++				err = -EINVAL;
++				goto error;
++			}
++			break;
++		default:
++			err = -EINVAL;
++			goto error;
++		}
++		specs++;
++	}
++
++	sar_spec->num_sub_specs = specs;
++
++	rdev->cur_cmd_info = info;
++	err = rdev_set_sar_specs(rdev, sar_spec);
++	rdev->cur_cmd_info = NULL;
++error:
++	kfree(sar_spec);
++	return err;
++}
++
+ static __genl_const struct genl_ops nl80211_ops[] = {
+ 	{
+ 		.cmd = NL80211_CMD_GET_WIPHY,
+@@ -15576,6 +15751,14 @@ static const struct genl_small_ops nl802
+ 		.internal_flags = NL80211_FLAG_NEED_NETDEV |
+ 				  NL80211_FLAG_NEED_RTNL,
+ 	},
++	{
++		.cmd = NL80211_CMD_SET_SAR_SPECS,
++		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
++		.doit = nl80211_set_sar_specs,
++		.flags = GENL_UNS_ADMIN_PERM,
++		.internal_flags = NL80211_FLAG_NEED_WIPHY |
++				  NL80211_FLAG_NEED_RTNL,
++	},
+ };
+ 
+ static struct genl_family nl80211_fam __genl_ro_after_init = {
+--- a/net/wireless/rdev-ops.h
++++ b/net/wireless/rdev-ops.h
+@@ -1356,4 +1356,16 @@ static inline int rdev_reset_tid_config(
+ 	return ret;
+ }
+ 
++static inline int rdev_set_sar_specs(struct cfg80211_registered_device *rdev,
++				     struct cfg80211_sar_specs *sar)
++{
++	int ret;
++
++	trace_rdev_set_sar_specs(&rdev->wiphy, sar);
++	ret = rdev->ops->set_sar_specs(&rdev->wiphy, sar);
++	trace_rdev_return_int(&rdev->wiphy, ret);
++
++	return ret;
++}
++
+ #endif /* __CFG80211_RDEV_OPS */
+--- a/net/wireless/trace.h
++++ b/net/wireless/trace.h
+@@ -3551,6 +3551,25 @@ TRACE_EVENT(rdev_reset_tid_config,
+ 	TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", tids: 0x%x",
+ 		  WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->tids)
+ );
++
++TRACE_EVENT(rdev_set_sar_specs,
++	TP_PROTO(struct wiphy *wiphy, struct cfg80211_sar_specs *sar),
++	TP_ARGS(wiphy, sar),
++	TP_STRUCT__entry(
++		WIPHY_ENTRY
++		__field(u16, type)
++		__field(u16, num)
++	),
++	TP_fast_assign(
++		WIPHY_ASSIGN;
++		__entry->type = sar->type;
++		__entry->num = sar->num_sub_specs;
++
++	),
++	TP_printk(WIPHY_PR_FMT ", Set type:%d, num_specs:%d",
++		  WIPHY_PR_ARG, __entry->type, __entry->num)
++);
++
+ #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */
+ 
+ #undef TRACE_INCLUDE_PATH
diff --git a/package/kernel/mac80211/patches/subsys/385-mac80211-add-ieee80211_set_sar_specs.patch b/package/kernel/mac80211/patches/subsys/385-mac80211-add-ieee80211_set_sar_specs.patch
new file mode 100644
index 0000000000..c351bc812a
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/385-mac80211-add-ieee80211_set_sar_specs.patch
@@ -0,0 +1,51 @@
+From: Carl Huang <cjhuang at codeaurora.org>
+Date: Thu, 3 Dec 2020 05:37:27 -0500
+Subject: [PATCH] mac80211: add ieee80211_set_sar_specs
+
+This change registers ieee80211_set_sar_specs to
+mac80211_config_ops, so cfg80211 can call it.
+
+Signed-off-by: Carl Huang <cjhuang at codeaurora.org>
+Reviewed-by: Brian Norris <briannorris at chromium.org>
+Reviewed-by: Abhishek Kumar <kuabhs at chromium.org>
+Link: https://lore.kernel.org/r/20201203103728.3034-3-cjhuang at codeaurora.org
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -4207,6 +4207,8 @@ struct ieee80211_ops {
+ 				   struct ieee80211_vif *vif);
+ 	void (*sta_set_4addr)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ 			      struct ieee80211_sta *sta, bool enabled);
++	int (*set_sar_specs)(struct ieee80211_hw *hw,
++			     const struct cfg80211_sar_specs *sar);
+ 	void (*sta_set_decap_offload)(struct ieee80211_hw *hw,
+ 				      struct ieee80211_vif *vif,
+ 				      struct ieee80211_sta *sta, bool enabled);
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -4136,6 +4136,17 @@ static int ieee80211_reset_tid_config(st
+ 	return ret;
+ }
+ 
++static int ieee80211_set_sar_specs(struct wiphy *wiphy,
++				   struct cfg80211_sar_specs *sar)
++{
++	struct ieee80211_local *local = wiphy_priv(wiphy);
++
++	if (!local->ops->set_sar_specs)
++		return -EOPNOTSUPP;
++
++	return local->ops->set_sar_specs(&local->hw, sar);
++}
++
+ const struct cfg80211_ops mac80211_config_ops = {
+ 	.add_virtual_intf = ieee80211_add_iface,
+ 	.del_virtual_intf = ieee80211_del_iface,
+@@ -4239,4 +4250,5 @@ const struct cfg80211_ops mac80211_confi
+ 	.probe_mesh_link = ieee80211_probe_mesh_link,
+ 	.set_tid_config = ieee80211_set_tid_config,
+ 	.reset_tid_config = ieee80211_reset_tid_config,
++	.set_sar_specs = ieee80211_set_sar_specs,
+ };
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 990ef04eca..b2ee61a6dc 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
-@@ -3745,6 +3745,7 @@ struct mgmt_frame_regs {
+@@ -3793,6 +3793,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 @@
   *
   * @set_wds_peer: set the WDS peer for a WDS interface
   *
-@@ -4067,6 +4068,7 @@ struct cfg80211_ops {
+@@ -4115,6 +4116,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);
@@ -57,7 +57,7 @@
  	__NL80211_ATTR_AFTER_LAST,
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -2742,6 +2742,19 @@ static int ieee80211_get_tx_power(struct
+@@ -2761,6 +2761,19 @@ static int ieee80211_get_tx_power(struct
  	return 0;
  }
  
@@ -77,7 +77,7 @@
  static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev,
  				  const u8 *addr)
  {
-@@ -4172,6 +4185,7 @@ const struct cfg80211_ops mac80211_confi
+@@ -4202,6 +4215,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 +129,15 @@
  	local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -740,6 +740,7 @@ static const struct nla_policy nl80211_p
- 		NLA_POLICY_RANGE(NLA_U8, NL80211_SAE_PWE_HUNT_AND_PECK,
+@@ -753,6 +753,7 @@ static const struct nla_policy nl80211_p
  				 NL80211_SAE_PWE_BOTH),
+ 	[NL80211_ATTR_SAR_SPEC] = NLA_POLICY_NESTED(sar_policy),
  	[NL80211_ATTR_RECONNECT_REQUESTED] = { .type = NLA_REJECT },
 +	[NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 },
  };
  
  /* policy for the key attributes */
-@@ -3248,6 +3249,20 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -3318,6 +3319,20 @@ static int nl80211_set_wiphy(struct sk_b
  		if (result)
  			return result;
  	}


From lede-commits at lists.infradead.org  Thu Jul 15 01:46:29 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 15 Jul 2021 04:46:29 -0400
Subject: [openwrt/openwrt] hostapd: add "force" parameter for channel switch
In-Reply-To: <162633878932.2541.9569427728682011119@git-01.infra.openwrt.org>
References: <162633878932.2541.9569427728682011119@git-01.infra.openwrt.org>
Message-ID: <mailman.7735.1626338795.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9ec5f5f230851ef9c980e99a43c3ddffca50a7fc

commit 9ec5f5f230851ef9c980e99a43c3ddffca50a7fc
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Jul 15 10:45:26 2021 +0200

    hostapd: add "force" parameter for channel switch
    
    This will restart the interface in case the CSA fails and can be used to
    force the device on a DFS channel (including full CAC)
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/hostapd/src/src/ap/ubus.c | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 9918f17d67..07c366508c 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -744,6 +744,7 @@ enum {
 	CSA_VHT,
 	CSA_HE,
 	CSA_BLOCK_TX,
+	CSA_FORCE,
 	__CSA_MAX
 };
 
@@ -758,8 +759,18 @@ static const struct blobmsg_policy csa_policy[__CSA_MAX] = {
 	[CSA_VHT] = { "vht", BLOBMSG_TYPE_BOOL },
 	[CSA_HE] = { "he", BLOBMSG_TYPE_BOOL },
 	[CSA_BLOCK_TX] = { "block_tx", BLOBMSG_TYPE_BOOL },
+	[CSA_FORCE] = { "force", BLOBMSG_TYPE_BOOL },
 };
 
+
+static void switch_chan_fallback_cb(void *eloop_data, void *user_ctx)
+{
+	struct hostapd_iface *iface = eloop_data;
+	struct hostapd_freq_params *freq_params = user_ctx;
+
+	hostapd_switch_channel_fallback(iface, freq_params);
+}
+
 #ifdef NEED_AP_MLME
 static int
 hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj,
@@ -769,6 +780,7 @@ hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj,
 	struct blob_attr *tb[__CSA_MAX];
 	struct hostapd_data *hapd = get_hapd_from_object(obj);
 	struct hostapd_config *iconf = hapd->iface->conf;
+	struct hostapd_freq_params *freq_params;
 	struct csa_settings css = {
 		.freq_params = {
 			.ht_enabled = iconf->ieee80211n,
@@ -825,7 +837,15 @@ hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj,
 			ret = UBUS_STATUS_NOT_SUPPORTED;
 	}
 
-	return ret;
+	if (!ret || !tb[CSA_FORCE] || !blobmsg_get_bool(tb[CSA_FORCE]))
+		return ret;
+
+	freq_params = malloc(sizeof(*freq_params));
+	memcpy(freq_params, &css.freq_params, sizeof(*freq_params));
+	eloop_register_timeout(0, 1, switch_chan_fallback_cb,
+			       hapd->iface, freq_params);
+
+	return 0;
 #undef SET_CSA_SETTING
 }
 #endif


From lede-commits at lists.infradead.org  Thu Jul 15 10:23:33 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 15 Jul 2021 13:23:33 -0400
Subject: [openwrt/openwrt]  procd: update to git HEAD
In-Reply-To: <162636981200.23283.6594797163615627817@git-01.infra.openwrt.org>
References: <162636981200.23283.6594797163615627817@git-01.infra.openwrt.org>
Message-ID: <mailman.7874.1626369820.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/b1b16bddb0b45c65c25957da55463ba8c000a588

commit b1b16bddb0b45c65c25957da55463ba8c000a588
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu Jul 15 18:17:15 2021 +0100

    procd: update to git HEAD
    
     0ee73b2 uxc: implement support for rootfs overlay in containers
     b0a8ea1 jail: do not hack /etc/resolv.conf on container rootfs
     92aba53 jail: increase max additional env records to 64
     15997e6 jail: allow rootfs to be a symbolic link
     0114c6f jail: open() extroot folder before mounting
     ed96eda uxc: check for required blockd mounts
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/system/procd/Makefile       | 8 ++++----
 package/system/procd/files/uxc.init | 4 ++++
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 36e7f11c29..b4ed79f08b 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2021-07-10
-PKG_SOURCE_VERSION:=2dcefbd6094681dcbd2d7ff608590e74425a9220
-PKG_MIRROR_HASH:=6f2615230a1db09740e8125517488a53b62baef0731b9adbd377765cad130289
+PKG_SOURCE_DATE:=2021-07-15
+PKG_SOURCE_VERSION:=ed96eda0a2a15c8ee801c4c26e8fe5bd241f83e9
+PKG_MIRROR_HASH:=34c5feda54cfa67d96a2d42a502817f7a4b0b9ad66f19333df9e212bdf842bda
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0
@@ -90,7 +90,7 @@ endef
 define Package/uxc
   SECTION:=base
   CATEGORY:=Base system
-  DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json
+  DEPENDS:=+procd-ujail +libubus +libubox +libblobmsg-json +blockd
   TITLE:=OpenWrt container management
   MAINTAINER:=Daniel Golle <daniel at makrotopia.org>
 endef
diff --git a/package/system/procd/files/uxc.init b/package/system/procd/files/uxc.init
index 035c8b0b9e..1e75b796f8 100644
--- a/package/system/procd/files/uxc.init
+++ b/package/system/procd/files/uxc.init
@@ -16,3 +16,7 @@ boot() {
 	__BOOT_UXC=1
 	start
 }
+
+service_triggers() {
+	procd_add_raw_trigger "mount.add" 3000 /etc/init.d/uxc boot
+}


From lede-commits at lists.infradead.org  Thu Jul 15 10:23:32 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 15 Jul 2021 13:23:32 -0400
Subject: [openwrt/openwrt]  fstools: update to git HEAD
In-Reply-To: <162636981200.23283.6594797163615627817@git-01.infra.openwrt.org>
References: <162636981200.23283.6594797163615627817@git-01.infra.openwrt.org>
Message-ID: <mailman.7875.1626369820.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/6bcc8e9d970a4627fa1b96d704126bd2f7305cb3

commit 6bcc8e9d970a4627fa1b96d704126bd2f7305cb3
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu Jul 15 02:22:47 2021 +0100

    fstools: update to git HEAD
    
     3386b6b blockd: fix trigger name
     cdc9939 blockd: move to its own POSIX process group
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/system/fstools/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 59765511c6..5300d35dc4 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
-PKG_MIRROR_HASH:=950197ab38df584b8239bfac060e70ea97e9188de2cd646d10f5b024c76ed751
-PKG_SOURCE_DATE:=2021-07-14
-PKG_SOURCE_VERSION:=39558a1f3ebbf0a56188ead4f703456feab2102f
+PKG_MIRROR_HASH:=c57f21db30349f30d70b6169ad9d9c905733069fe14ea6b4ffdfbd82a355dd61
+PKG_SOURCE_DATE:=2021-07-15
+PKG_SOURCE_VERSION:=cdc9939b071427cf2b35134481df27b4bd76dbfc
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Thu Jul 15 12:39:36 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 15 Jul 2021 15:39:36 -0400
Subject: [openwrt/openwrt]  mt76: update to the latest version
In-Reply-To: <162637797652.24617.17883102813259712803@git-01.infra.openwrt.org>
References: <162637797652.24617.17883102813259712803@git-01.infra.openwrt.org>
Message-ID: <mailman.7915.1626377981.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/479a2a90f782209b29dd9746d241fc1e67836309

commit 479a2a90f782209b29dd9746d241fc1e67836309
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Jul 15 21:35:33 2021 +0200

    mt76: update to the latest version
    
    bbebea7d6dc6 Revert "mt76: fix mt76_rates for the multiple devices"
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/kernel/mt76/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 3969c13810..431c57a240 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2021-07-14
-PKG_SOURCE_VERSION:=4ccd42029519d2b3d3b4e0abcd59928841845caf
-PKG_MIRROR_HASH:=26f721abd55587b331bae371dd41820796fcc27554c1be50e03572dccc82413e
+PKG_SOURCE_DATE:=2021-07-15
+PKG_SOURCE_VERSION:=bbebea7d6dc64313132226adc3f7369d36e9359d
+PKG_MIRROR_HASH:=17cd74e72c1f6c8742b698bf6772afacc6fba71b233af8c4d59530600cf44d5b
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0


From lede-commits at lists.infradead.org  Sat Jul 17 10:13:05 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 13:13:05 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.4 to 5.4.131
In-Reply-To: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
References: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
Message-ID: <mailman.8284.1626541994.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/269e49577b8d8c49a2694cb8e9939822cd7c9eb3

commit 269e49577b8d8c49a2694cb8e9939822cd7c9eb3
Author: John Audia <graysky at archlinux.us>
AuthorDate: Sun Jul 11 12:53:05 2021 -0400

    kernel: bump 5.4 to 5.4.131
    
    All patches automatically rebased.
    
    Build system: x86_64
    Build-tested: ipq806x/R7800
    Run-tested: ipq806x/R7800
    
    No dmesg regressions, everything functional
    
    Signed-off-by: John Audia <graysky at archlinux.us>
---
 include/kernel-version.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index e9a1046a55..9c1856a9fd 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .130
+LINUX_VERSION-5.4 = .131
 LINUX_VERSION-5.10 = .46
 
-LINUX_KERNEL_HASH-5.4.130 = 662a71fbab4fe671b987262e3c549754c269a8f8cc67cd5f770534079ef19c7b
+LINUX_KERNEL_HASH-5.4.131 = 25e35a6ec1c0c72b971347dd8e403f4953e1a023cbcf96f9707ede5d45b399fe
 LINUX_KERNEL_HASH-5.10.46 = 569122a39c6b325befb9ac1c07da0c53e6363b3baacd82081d131b06c1dc1415
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))


From lede-commits at lists.infradead.org  Sat Jul 17 10:13:07 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 13:13:07 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.10 to 5.10.47
In-Reply-To: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
References: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
Message-ID: <mailman.8285.1626541994.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/b607b06b91ed598d07f549874aa1f4f9a6240242

commit b607b06b91ed598d07f549874aa1f4f9a6240242
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Wed Jun 30 15:24:18 2021 +0100

    kernel: bump 5.10 to 5.10.47
    
    No deleted or manually refreshed patches.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 include/kernel-version.mk                                      | 4 ++--
 target/linux/generic/hack-5.10/204-module_strip.patch          | 4 ++--
 target/linux/generic/pending-5.10/630-packet_socket_type.patch | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 5de651b9c4..bf35f2a182 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
 endif
 
 LINUX_VERSION-5.4 = .132
-LINUX_VERSION-5.10 = .46
+LINUX_VERSION-5.10 = .47
 
 LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
-LINUX_KERNEL_HASH-5.10.46 = 569122a39c6b325befb9ac1c07da0c53e6363b3baacd82081d131b06c1dc1415
+LINUX_KERNEL_HASH-5.10.47 = 30b52a2fe6d1e0c1e1dc651d5df9a37eb54b35ea1f7f51b9f23d8903c29ae1c5
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/generic/hack-5.10/204-module_strip.patch b/target/linux/generic/hack-5.10/204-module_strip.patch
index 3379c5f3d6..0a0606042f 100644
--- a/target/linux/generic/hack-5.10/204-module_strip.patch
+++ b/target/linux/generic/hack-5.10/204-module_strip.patch
@@ -104,7 +104,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  config MODULES_TREE_LOOKUP
 --- a/kernel/module.c
 +++ b/kernel/module.c
-@@ -3243,9 +3243,11 @@ static int setup_load_info(struct load_i
+@@ -3247,9 +3247,11 @@ static int setup_load_info(struct load_i
  
  static int check_modinfo(struct module *mod, struct load_info *info, int flags)
  {
@@ -117,7 +117,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (flags & MODULE_INIT_IGNORE_VERMAGIC)
  		modmagic = NULL;
  
-@@ -3266,6 +3268,7 @@ static int check_modinfo(struct module *
+@@ -3270,6 +3272,7 @@ static int check_modinfo(struct module *
  				mod->name);
  		add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
  	}
diff --git a/target/linux/generic/pending-5.10/630-packet_socket_type.patch b/target/linux/generic/pending-5.10/630-packet_socket_type.patch
index 6a6e2fdc2a..9e415d803d 100644
--- a/target/linux/generic/pending-5.10/630-packet_socket_type.patch
+++ b/target/linux/generic/pending-5.10/630-packet_socket_type.patch
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -3315,6 +3317,7 @@ static int packet_create(struct net *net
+@@ -3318,6 +3320,7 @@ static int packet_create(struct net *net
  	mutex_init(&po->pg_vec_lock);
  	po->rollover = NULL;
  	po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3949,6 +3952,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3954,6 +3957,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -4005,6 +4018,13 @@ static int packet_getsockopt(struct sock
+@@ -4010,6 +4023,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;


From lede-commits at lists.infradead.org  Sat Jul 17 10:13:08 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 13:13:08 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.10 to 5.10.48
In-Reply-To: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
References: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
Message-ID: <mailman.8286.1626541996.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9a0de5e1a1e58b331050f21ef59f9d1cd105aeda

commit 9a0de5e1a1e58b331050f21ef59f9d1cd105aeda
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Wed Jul 7 15:36:06 2021 +0100

    kernel: bump 5.10 to 5.10.48
    
    No deleted or manually refreshed patches.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 include/kernel-version.mk                                | 4 ++--
 target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index bf35f2a182..44f258965f 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
 endif
 
 LINUX_VERSION-5.4 = .132
-LINUX_VERSION-5.10 = .47
+LINUX_VERSION-5.10 = .48
 
 LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
-LINUX_KERNEL_HASH-5.10.47 = 30b52a2fe6d1e0c1e1dc651d5df9a37eb54b35ea1f7f51b9f23d8903c29ae1c5
+LINUX_KERNEL_HASH-5.10.48 = dbd1193480e1b85928d8dcdd7507365381aafe09810ce3d28677d6f4e722c25e
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch b/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch
index 25ea1abe56..01d623ab87 100644
--- a/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch
+++ b/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch
@@ -27,7 +27,7 @@
  obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1518,6 +1518,12 @@ config GPIO_SODAVILLE
+@@ -1520,6 +1520,12 @@ config GPIO_SODAVILLE
  	help
  	  Say Y here to support Intel Sodaville GPIO.
  


From lede-commits at lists.infradead.org  Sat Jul 17 10:13:04 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 13:13:04 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.4 to 5.4.130
In-Reply-To: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
References: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
Message-ID: <mailman.8287.1626541996.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/968aa64e61b268e05a4a63dcec99f2a659597415

commit 968aa64e61b268e05a4a63dcec99f2a659597415
Author: John Audia <graysky at archlinux.us>
AuthorDate: Thu Jul 8 08:33:56 2021 -0400

    kernel: bump 5.4 to 5.4.130
    
    All patches automatically rebased.
    
    Build system: x86_64
    Build-tested: ipq806x/R7800
    Run-tested: ipq806x/R7800
    
    No dmesg regressions, everything functional
    
    Signed-off-by: John Audia <graysky at archlinux.us>
---
 include/kernel-version.mk                               | 4 ++--
 target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index b0611454b1..e9a1046a55 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .129
+LINUX_VERSION-5.4 = .130
 LINUX_VERSION-5.10 = .46
 
-LINUX_KERNEL_HASH-5.4.129 = 4426462413d174909a1d9938ce420b8b3cb219140d164270ccabd282fa2346df
+LINUX_KERNEL_HASH-5.4.130 = 662a71fbab4fe671b987262e3c549754c269a8f8cc67cd5f770534079ef19c7b
 LINUX_KERNEL_HASH-5.10.46 = 569122a39c6b325befb9ac1c07da0c53e6363b3baacd82081d131b06c1dc1415
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
diff --git a/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch b/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch
index 5540b8ae3a..60f8bdff79 100644
--- a/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch
+++ b/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch
@@ -23,7 +23,7 @@
 +obj-$(CONFIG_MFD_RB4XX_CPLD)	+= rb4xx-cpld.o
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1406,6 +1406,12 @@ config GPIO_SODAVILLE
+@@ -1408,6 +1408,12 @@ config GPIO_SODAVILLE
  	help
  	  Say Y here to support Intel Sodaville GPIO.
  


From lede-commits at lists.infradead.org  Sat Jul 17 10:13:10 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 13:13:10 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.10 to 5.10.50
In-Reply-To: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
References: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
Message-ID: <mailman.8288.1626541996.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/b71767d8e047b06668ca8b7b7922f6df238ab659

commit b71767d8e047b06668ca8b7b7922f6df238ab659
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Wed Jul 14 17:42:28 2021 +0100

    kernel: bump 5.10 to 5.10.50
    
    No deleted or manually refreshed patches.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 include/kernel-version.mk                                           | 4 ++--
 .../patches-5.10/0003-leds-add-reset-controller-based-driver.patch  | 2 +-
 .../linux/ath79/patches-5.10/408-mtd-redboot_partition_scan.patch   | 6 +++---
 target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch    | 2 +-
 target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch            | 2 +-
 target/linux/bcm63xx/patches-5.10/400-bcm963xx_flashmap.patch       | 6 +++---
 target/linux/generic/hack-5.10/221-module_exports.patch             | 2 +-
 target/linux/generic/hack-5.10/661-use_fq_codel_by_default.patch    | 2 +-
 target/linux/generic/pending-5.10/205-backtrace_module_info.patch   | 4 ++--
 .../419-mtd-redboot-add-of_match_table-with-DT-binding.patch        | 2 +-
 target/linux/generic/pending-5.10/420-mtd-redboot_space.patch       | 2 +-
 .../pending-5.10/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch     | 4 ++--
 target/linux/mediatek/patches-5.10/410-bt-mtk-serial-fix.patch      | 2 +-
 target/linux/mediatek/patches-5.10/800-ubnt-ledbar-driver.patch     | 2 +-
 14 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 0af8d05fd1..2948f7b5e8 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
 endif
 
 LINUX_VERSION-5.4 = .132
-LINUX_VERSION-5.10 = .49
+LINUX_VERSION-5.10 = .50
 
 LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
-LINUX_KERNEL_HASH-5.10.49 = b0d16de7e79c272b01996ad8ff8bdf3a6a011bc0c94049baccf69f05dde3025e
+LINUX_KERNEL_HASH-5.10.50 = 8bda327a7d95acfff8f87fb6ef4223e3194fa22195f5551249a9aa3393bfb436
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/ath79/patches-5.10/0003-leds-add-reset-controller-based-driver.patch b/target/linux/ath79/patches-5.10/0003-leds-add-reset-controller-based-driver.patch
index a023d4c644..68b8310365 100644
--- a/target/linux/ath79/patches-5.10/0003-leds-add-reset-controller-based-driver.patch
+++ b/target/linux/ath79/patches-5.10/0003-leds-add-reset-controller-based-driver.patch
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/drivers/leds/Kconfig
 +++ b/drivers/leds/Kconfig
-@@ -928,6 +928,17 @@ config LEDS_ACER_A500
+@@ -929,6 +929,17 @@ config LEDS_ACER_A500
  	  This option enables support for the Power Button LED of
  	  Acer Iconia Tab A500.
  
diff --git a/target/linux/ath79/patches-5.10/408-mtd-redboot_partition_scan.patch b/target/linux/ath79/patches-5.10/408-mtd-redboot_partition_scan.patch
index 8f3ee32f57..e5b06e14a5 100644
--- a/target/linux/ath79/patches-5.10/408-mtd-redboot_partition_scan.patch
+++ b/target/linux/ath79/patches-5.10/408-mtd-redboot_partition_scan.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -85,12 +85,18 @@ static int parse_redboot_partitions(stru
+@@ -90,12 +90,18 @@ static int parse_redboot_partitions(stru
  
  	parse_redboot_of(master);
  
@@ -19,7 +19,7 @@
  				return -EIO;
  			}
  			offset -= master->erasesize;
-@@ -103,10 +109,6 @@ static int parse_redboot_partitions(stru
+@@ -108,10 +114,6 @@ static int parse_redboot_partitions(stru
  				goto nogood;
  		}
  	}
@@ -30,7 +30,7 @@
  
  	printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
  	       master->name, offset);
-@@ -179,6 +181,11 @@ static int parse_redboot_partitions(stru
+@@ -184,6 +186,11 @@ static int parse_redboot_partitions(stru
  	}
  	if (i == numslots) {
  		/* Didn't find it */
diff --git a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch
index c1cb0dae66..b9290dee1c 100644
--- a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch
@@ -267,7 +267,7 @@
  		case IPV6_2292HOPOPTS:
 --- a/net/ipv6/exthdrs.c
 +++ b/net/ipv6/exthdrs.c
-@@ -949,7 +949,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
+@@ -948,7 +948,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
  		goto drop;
  	}
  
diff --git a/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch b/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch
index 01d623ab87..7c3c91817f 100644
--- a/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch
+++ b/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mfd/Kconfig
 +++ b/drivers/mfd/Kconfig
-@@ -2141,6 +2141,14 @@ config RAVE_SP_CORE
+@@ -2142,6 +2142,14 @@ config RAVE_SP_CORE
  	  Select this to get support for the Supervisory Processor
  	  device found on several devices in RAVE line of hardware.
  
diff --git a/target/linux/bcm63xx/patches-5.10/400-bcm963xx_flashmap.patch b/target/linux/bcm63xx/patches-5.10/400-bcm963xx_flashmap.patch
index f57950b44a..5a9532c321 100644
--- a/target/linux/bcm63xx/patches-5.10/400-bcm963xx_flashmap.patch
+++ b/target/linux/bcm63xx/patches-5.10/400-bcm963xx_flashmap.patch
@@ -23,7 +23,7 @@ Signed-off-by: Axel Gembe <ago at bastart.eu.org>
  	.width			= 2,
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -79,6 +79,7 @@ static int parse_redboot_partitions(stru
+@@ -84,6 +84,7 @@ static int parse_redboot_partitions(stru
  	int nulllen = 0;
  	int numslots;
  	unsigned long offset;
@@ -31,7 +31,7 @@ Signed-off-by: Axel Gembe <ago at bastart.eu.org>
  #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
  	static char nullstring[] = "unallocated";
  #endif
-@@ -185,6 +186,16 @@ static int parse_redboot_partitions(stru
+@@ -190,6 +191,16 @@ static int parse_redboot_partitions(stru
  		goto out;
  	}
  
@@ -48,7 +48,7 @@ Signed-off-by: Axel Gembe <ago at bastart.eu.org>
  	for (i = 0; i < numslots; i++) {
  		struct fis_list *new_fl, **prev;
  
-@@ -205,10 +216,10 @@ static int parse_redboot_partitions(stru
+@@ -210,10 +221,10 @@ static int parse_redboot_partitions(stru
  			goto out;
  		}
  		new_fl->img = &buf[i];
diff --git a/target/linux/generic/hack-5.10/221-module_exports.patch b/target/linux/generic/hack-5.10/221-module_exports.patch
index e6854138e7..2fcb2d9809 100644
--- a/target/linux/generic/hack-5.10/221-module_exports.patch
+++ b/target/linux/generic/hack-5.10/221-module_exports.patch
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	    "__kstrtabns_" #sym ":					\n"	\
 --- a/scripts/Makefile.build
 +++ b/scripts/Makefile.build
-@@ -366,7 +366,7 @@ targets += $(lib-y) $(always-y) $(MAKECM
+@@ -367,7 +367,7 @@ targets += $(lib-y) $(always-y) $(MAKECM
  # Linker scripts preprocessor (.lds.S -> .lds)
  # ---------------------------------------------------------------------------
  quiet_cmd_cpp_lds_S = LDS     $@
diff --git a/target/linux/generic/hack-5.10/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-5.10/661-use_fq_codel_by_default.patch
index 863738e2ef..33c8c55ab6 100644
--- a/target/linux/generic/hack-5.10/661-use_fq_codel_by_default.patch
+++ b/target/linux/generic/hack-5.10/661-use_fq_codel_by_default.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/net/sch_generic.h
 +++ b/include/net/sch_generic.h
-@@ -611,12 +611,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
+@@ -623,12 +623,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
  extern struct Qdisc_ops pfifo_fast_ops;
  extern struct Qdisc_ops mq_qdisc_ops;
  extern struct Qdisc_ops noqueue_qdisc_ops;
diff --git a/target/linux/generic/pending-5.10/205-backtrace_module_info.patch b/target/linux/generic/pending-5.10/205-backtrace_module_info.patch
index 5953214757..f46877f254 100644
--- a/target/linux/generic/pending-5.10/205-backtrace_module_info.patch
+++ b/target/linux/generic/pending-5.10/205-backtrace_module_info.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/lib/vsprintf.c
 +++ b/lib/vsprintf.c
-@@ -957,8 +957,10 @@ char *symbol_string(char *buf, char *end
+@@ -983,8 +983,10 @@ char *symbol_string(char *buf, char *end
  		    struct printf_spec spec, const char *fmt)
  {
  	unsigned long value;
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #endif
  
  	if (fmt[1] == 'R')
-@@ -975,8 +977,14 @@ char *symbol_string(char *buf, char *end
+@@ -1001,8 +1003,14 @@ char *symbol_string(char *buf, char *end
  
  	return string_nocheck(buf, end, sym, spec);
  #else
diff --git a/target/linux/generic/pending-5.10/419-mtd-redboot-add-of_match_table-with-DT-binding.patch b/target/linux/generic/pending-5.10/419-mtd-redboot-add-of_match_table-with-DT-binding.patch
index 8358a307cd..7692f484ae 100644
--- a/target/linux/generic/pending-5.10/419-mtd-redboot-add-of_match_table-with-DT-binding.patch
+++ b/target/linux/generic/pending-5.10/419-mtd-redboot-add-of_match_table-with-DT-binding.patch
@@ -12,7 +12,7 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
 
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -300,6 +300,7 @@ static int parse_redboot_partitions(stru
+@@ -305,6 +305,7 @@ static int parse_redboot_partitions(stru
  
  static const struct of_device_id mtd_parser_redboot_of_match_table[] = {
  	{ .compatible = "redboot-fis" },
diff --git a/target/linux/generic/pending-5.10/420-mtd-redboot_space.patch b/target/linux/generic/pending-5.10/420-mtd-redboot_space.patch
index a2cf838989..a3cd4ecf1f 100644
--- a/target/linux/generic/pending-5.10/420-mtd-redboot_space.patch
+++ b/target/linux/generic/pending-5.10/420-mtd-redboot_space.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -274,14 +274,21 @@ static int parse_redboot_partitions(stru
+@@ -279,14 +279,21 @@ static int parse_redboot_partitions(stru
  #endif
  		names += strlen(names)+1;
  
diff --git a/target/linux/generic/pending-5.10/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-5.10/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
index ddb94fbe55..89eb7d61b3 100644
--- a/target/linux/generic/pending-5.10/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
+++ b/target/linux/generic/pending-5.10/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
@@ -311,7 +311,7 @@ Signed-off-by: Steven Barth <cyrus at openwrt.org>
  /**
   * ip6_tnl_addr_conflict - compare packet addresses to tunnel's own
   *   @t: the outgoing tunnel device
-@@ -1306,6 +1454,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1304,6 +1452,7 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
  		u8 protocol)
  {
  	struct ip6_tnl *t = netdev_priv(dev);
@@ -319,7 +319,7 @@ Signed-off-by: Steven Barth <cyrus at openwrt.org>
  	struct ipv6hdr *ipv6h;
  	const struct iphdr  *iph;
  	int encap_limit = -1;
-@@ -1405,6 +1554,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
+@@ -1403,6 +1552,18 @@ ipxip6_tnl_xmit(struct sk_buff *skb, str
  	fl6.flowi6_uid = sock_net_uid(dev_net(dev), NULL);
  	dsfield = INET_ECN_encapsulate(dsfield, orig_dsfield);
  
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 8dc680d180..381eaab5e2 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",
-@@ -2699,6 +2699,11 @@ serial8250_do_set_termios(struct uart_po
+@@ -2712,6 +2712,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.10/800-ubnt-ledbar-driver.patch b/target/linux/mediatek/patches-5.10/800-ubnt-ledbar-driver.patch
index 013391e1d9..92264eedf9 100644
--- a/target/linux/mediatek/patches-5.10/800-ubnt-ledbar-driver.patch
+++ b/target/linux/mediatek/patches-5.10/800-ubnt-ledbar-driver.patch
@@ -1,6 +1,6 @@
 --- a/drivers/leds/Kconfig
 +++ b/drivers/leds/Kconfig
-@@ -928,6 +928,16 @@ config LEDS_ACER_A500
+@@ -929,6 +929,16 @@ config LEDS_ACER_A500
  	  This option enables support for the Power Button LED of
  	  Acer Iconia Tab A500.
  


From lede-commits at lists.infradead.org  Sat Jul 17 10:13:11 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 13:13:11 -0400
Subject: [openwrt/openwrt]  toolchain: add gcc 11 version
In-Reply-To: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
References: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
Message-ID: <mailman.8291.1626541998.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/0f499372c05cd42fd6fd85c061a39ad49bccdbda

commit 0f499372c05cd42fd6fd85c061a39ad49bccdbda
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Tue Jul 6 01:21:46 2021 +0200

    toolchain: add gcc 11 version
    
    Add gcc 11 version. Same patches of gcc 10.
    
    Build tested on: ipq806x ipq807x
    Run tested on: ipq806x ipq807x
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
    [refresh patches]
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 toolchain/gcc/Config.in                            |   3 +
 toolchain/gcc/Config.version                       |   5 +
 toolchain/gcc/common.mk                            |   4 +
 .../gcc/patches/11.1.0/002-case_insensitive.patch  |  24 +++
 .../gcc/patches/11.1.0/010-documentation.patch     |  35 +++++
 .../gcc/patches/11.1.0/110-Fix-MIPS-PR-84790.patch |  20 +++
 toolchain/gcc/patches/11.1.0/230-musl_libssp.patch |  13 ++
 .../11.1.0/300-mips_Os_cpu_rtx_cost_model.patch    |  21 +++
 .../patches/11.1.0/810-arm-softfloat-libgcc.patch  |  33 ++++
 toolchain/gcc/patches/11.1.0/820-libgcc_pic.patch  |  44 ++++++
 .../11.1.0/840-armv4_pass_fix-v4bx_to_ld.patch     |  28 ++++
 .../gcc/patches/11.1.0/850-use_shared_libgcc.patch |  54 +++++++
 .../gcc/patches/11.1.0/851-libgcc_no_compat.patch  |  22 +++
 .../gcc/patches/11.1.0/870-ppc_no_crtsavres.patch  |  11 ++
 .../gcc/patches/11.1.0/881-no_tm_section.patch     |  11 ++
 .../gcc/patches/11.1.0/900-bad-mips16-crt.patch    |   9 ++
 toolchain/gcc/patches/11.1.0/910-mbsd_multi.patch  | 146 ++++++++++++++++++
 .../patches/11.1.0/920-specs_nonfatal_getenv.patch |  22 +++
 .../patches/11.1.0/930-fix-mips-noexecstack.patch  | 111 ++++++++++++++
 ...931-libffi-fix-MIPS-softfloat-build-issue.patch | 168 +++++++++++++++++++++
 ...ix-compilation-when-making-cross-compiler.patch |  67 ++++++++
 21 files changed, 851 insertions(+)

diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index f0fc31d567..5ac93217f8 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -18,6 +18,9 @@ choice
 
 	config GCC_USE_VERSION_10
 		bool "gcc 10.x"
+
+	config GCC_USE_VERSION_11
+		bool "gcc 11.x"
 endchoice
 
 config GCC_USE_GRAPHITE
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 4e141477a5..e8cc3215be 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -10,11 +10,16 @@ config GCC_VERSION_10
 	default y if GCC_USE_VERSION_10
 	bool
 
+config GCC_VERSION_11
+	default y if GCC_USE_VERSION_11
+	bool
+
 config GCC_VERSION
 	string
 	default "7.5.0"		if GCC_VERSION_7
 	default "9.3.0"		if GCC_VERSION_9
 	default "10.3.0"	if GCC_VERSION_10
+	default "11.1.0"	if GCC_VERSION_11
 	default "8.4.0"
 
 config GCC_USE_IREMAP
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index ef8fd9de47..36849de007 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -44,6 +44,10 @@ ifeq ($(PKG_VERSION),10.3.0)
   PKG_HASH:=64f404c1a650f27fc33da242e1f2df54952e3963a49e06e73f6940f3223ac344
 endif
 
+ifeq ($(PKG_VERSION),11.1.0)
+  PKG_HASH:=4c4a6fb8a8396059241c2e674b85b351c26a5d678274007f076957afa1cc9ddf
+endif
+
 PATCH_DIR=../patches/$(GCC_VERSION)
 
 BUGURL=http://bugs.openwrt.org/
diff --git a/toolchain/gcc/patches/11.1.0/002-case_insensitive.patch b/toolchain/gcc/patches/11.1.0/002-case_insensitive.patch
new file mode 100644
index 0000000000..409497e5a3
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/002-case_insensitive.patch
@@ -0,0 +1,24 @@
+commit 81cc26c706b2bc8c8c1eb1a322e5c5157900836e
+Author: Felix Fietkau <nbd at openwrt.org>
+Date:   Sun Oct 19 21:45:51 2014 +0000
+
+    gcc: do not assume that the Mac OS X filesystem is case insensitive
+    
+    Signed-off-by: Felix Fietkau <nbd at openwrt.org>
+    
+    SVN-Revision: 42973
+
+--- a/include/filenames.h
++++ b/include/filenames.h
+@@ -44,11 +44,6 @@ extern "C" {
+ #  define IS_DIR_SEPARATOR(c) IS_DOS_DIR_SEPARATOR (c)
+ #  define IS_ABSOLUTE_PATH(f) IS_DOS_ABSOLUTE_PATH (f)
+ #else /* not DOSish */
+-#  if defined(__APPLE__)
+-#    ifndef HAVE_CASE_INSENSITIVE_FILE_SYSTEM
+-#      define HAVE_CASE_INSENSITIVE_FILE_SYSTEM 1
+-#    endif
+-#  endif /* __APPLE__ */
+ #  define HAS_DRIVE_SPEC(f) (0)
+ #  define IS_DIR_SEPARATOR(c) IS_UNIX_DIR_SEPARATOR (c)
+ #  define IS_ABSOLUTE_PATH(f) IS_UNIX_ABSOLUTE_PATH (f)
diff --git a/toolchain/gcc/patches/11.1.0/010-documentation.patch b/toolchain/gcc/patches/11.1.0/010-documentation.patch
new file mode 100644
index 0000000000..885bd0301d
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/010-documentation.patch
@@ -0,0 +1,35 @@
+commit 098bd91f5eae625c7d2ee621e10930fc4434e5e2
+Author: Luka Perkov <luka at openwrt.org>
+Date:   Tue Feb 26 16:16:33 2013 +0000
+
+    gcc: don't build documentation
+    
+    This closes #13039.
+    
+    Signed-off-by: Luka Perkov <luka at openwrt.org>
+    
+    SVN-Revision: 35807
+
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3355,18 +3355,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
+ doc/gccint.info: $(TEXI_GCCINT_FILES)
+ doc/cppinternals.info: $(TEXI_CPPINT_FILES)
+ 
+-doc/%.info: %.texi
+-	if [ x$(BUILD_INFO) = xinfo ]; then \
+-		$(MAKEINFO) $(MAKEINFOFLAGS) -I . -I $(gcc_docdir) \
+-			-I $(gcc_docdir)/include -o $@ $<; \
+-	fi
++doc/%.info:
+ 
+ # Duplicate entry to handle renaming of gccinstall.info
+-doc/gccinstall.info: $(TEXI_GCCINSTALL_FILES)
+-	if [ x$(BUILD_INFO) = xinfo ]; then \
+-		$(MAKEINFO) $(MAKEINFOFLAGS) -I $(gcc_docdir) \
+-			-I $(gcc_docdir)/include -o $@ $<; \
+-	fi
++doc/gccinstall.info:
+ 
+ doc/cpp.dvi: $(TEXI_CPP_FILES)
+ doc/gcc.dvi: $(TEXI_GCC_FILES)
diff --git a/toolchain/gcc/patches/11.1.0/110-Fix-MIPS-PR-84790.patch b/toolchain/gcc/patches/11.1.0/110-Fix-MIPS-PR-84790.patch
new file mode 100644
index 0000000000..82ac013d30
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/110-Fix-MIPS-PR-84790.patch
@@ -0,0 +1,20 @@
+Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84790.
+MIPS16 functions have a static assembler prologue which clobbers
+registers v0 and v1. Add these register clobbers to function call
+instructions.
+
+--- a/gcc/config/mips/mips.c
++++ b/gcc/config/mips/mips.c
+@@ -3132,6 +3132,12 @@ mips_emit_call_insn (rtx pattern, rtx or
+       emit_insn (gen_update_got_version ());
+     }
+ 
++  if (TARGET_MIPS16 && TARGET_USE_GOT)
++    {
++      clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS16_PIC_TEMP);
++      clobber_reg (&CALL_INSN_FUNCTION_USAGE (insn), MIPS_PROLOGUE_TEMP (word_mode));
++    }
++
+   if (TARGET_MIPS16
+       && TARGET_EXPLICIT_RELOCS
+       && TARGET_CALL_CLOBBERED_GP)
diff --git a/toolchain/gcc/patches/11.1.0/230-musl_libssp.patch b/toolchain/gcc/patches/11.1.0/230-musl_libssp.patch
new file mode 100644
index 0000000000..66b88bc9e9
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/230-musl_libssp.patch
@@ -0,0 +1,13 @@
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -978,7 +978,9 @@ proper position among the other output f
+ #endif
+ 
+ #ifndef LINK_SSP_SPEC
+-#ifdef TARGET_LIBC_PROVIDES_SSP
++#if DEFAULT_LIBC == LIBC_MUSL
++#define LINK_SSP_SPEC "-lssp_nonshared"
++#elif defined(TARGET_LIBC_PROVIDES_SSP)
+ #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
+ 		       "|fstack-protector-strong|fstack-protector-explicit:}"
+ #else
diff --git a/toolchain/gcc/patches/11.1.0/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches/11.1.0/300-mips_Os_cpu_rtx_cost_model.patch
new file mode 100644
index 0000000000..8c4a5fce19
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/300-mips_Os_cpu_rtx_cost_model.patch
@@ -0,0 +1,21 @@
+commit ecf7671b769fe96f7b5134be442089f8bdba55d2
+Author: Felix Fietkau <nbd at nbd.name>
+Date:   Thu Aug 4 20:29:45 2016 +0200
+
+gcc: add a patch to generate better code with Os on mips
+
+Also happens to reduce compressed code size a bit
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+
+--- a/gcc/config/mips/mips.c
++++ b/gcc/config/mips/mips.c
+@@ -20041,7 +20041,7 @@ mips_option_override (void)
+     flag_pcc_struct_return = 0;
+ 
+   /* Decide which rtx_costs structure to use.  */
+-  if (optimize_size)
++  if (0 && optimize_size)
+     mips_cost = &mips_rtx_cost_optimize_size;
+   else
+     mips_cost = &mips_rtx_cost_data[mips_tune];
diff --git a/toolchain/gcc/patches/11.1.0/810-arm-softfloat-libgcc.patch b/toolchain/gcc/patches/11.1.0/810-arm-softfloat-libgcc.patch
new file mode 100644
index 0000000000..5c9d86aead
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/810-arm-softfloat-libgcc.patch
@@ -0,0 +1,33 @@
+commit 8570c4be394cff7282f332f97da2ff569a927ddb
+Author: Imre Kaloz <kaloz at openwrt.org>
+Date:   Wed Feb 2 20:06:12 2011 +0000
+
+    fixup arm soft-float symbols
+    
+    SVN-Revision: 25325
+
+--- a/libgcc/config/arm/t-linux
++++ b/libgcc/config/arm/t-linux
+@@ -1,6 +1,10 @@
+ LIB1ASMSRC = arm/lib1funcs.S
+ LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \
+-	_ctzsi2 _arm_addsubdf3 _arm_addsubsf3
++	_ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \
++	_arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \
++	_arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \
++	_arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \
++	_arm_fixsfsi _arm_fixunssfsi
+ 
+ # Just for these, we omit the frame pointer since it makes such a big
+ # difference.
+--- a/gcc/config/arm/linux-elf.h
++++ b/gcc/config/arm/linux-elf.h
+@@ -58,8 +58,6 @@
+    %{shared:-lc} \
+    %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+ 
+-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc"
+-
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2"
+ 
+ #define LINUX_TARGET_LINK_SPEC  "%{h*} \
diff --git a/toolchain/gcc/patches/11.1.0/820-libgcc_pic.patch b/toolchain/gcc/patches/11.1.0/820-libgcc_pic.patch
new file mode 100644
index 0000000000..525a95b565
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/820-libgcc_pic.patch
@@ -0,0 +1,44 @@
+commit c96312958c0621e72c9b32da5bc224ffe2161384
+Author: Felix Fietkau <nbd at openwrt.org>
+Date:   Mon Oct 19 23:26:09 2009 +0000
+
+    gcc: create a proper libgcc_pic.a static library for relinking (4.3.3+ for now, backport will follow)
+    
+    SVN-Revision: 18086
+
+--- a/libgcc/Makefile.in
++++ b/libgcc/Makefile.in
+@@ -930,11 +930,12 @@ $(libgcov-driver-objects): %$(objext): $
+ 
+ # Static libraries.
+ libgcc.a: $(libgcc-objects)
++libgcc_pic.a: $(libgcc-s-objects)
+ libgcov.a: $(libgcov-objects)
+ libunwind.a: $(libunwind-objects)
+ libgcc_eh.a: $(libgcc-eh-objects)
+ 
+-libgcc.a libgcov.a libunwind.a libgcc_eh.a:
++libgcc.a libgcov.a libunwind.a libgcc_eh.a libgcc_pic.a:
+ 	-rm -f $@
+ 
+ 	objects="$(objects)";					\
+@@ -958,7 +959,7 @@ all: libunwind.a
+ endif
+ 
+ ifeq ($(enable_shared),yes)
+-all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
++all: libgcc_eh.a libgcc_pic.a libgcc_s$(SHLIB_EXT)
+ ifneq ($(LIBUNWIND),)
+ all: libunwind$(SHLIB_EXT)
+ libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
+@@ -1164,6 +1165,10 @@ install-shared:
+ 	chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_eh.a
+ 	$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_eh.a
+ 
++	$(INSTALL_DATA) libgcc_pic.a $(mapfile) $(DESTDIR)$(inst_libdir)/
++	chmod 644 $(DESTDIR)$(inst_libdir)/libgcc_pic.a
++	$(RANLIB) $(DESTDIR)$(inst_libdir)/libgcc_pic.a
++
+ 	$(subst @multilib_dir@,$(MULTIDIR),$(subst \
+ 		@shlib_base_name@,libgcc_s,$(subst \
+ 		@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL))))
diff --git a/toolchain/gcc/patches/11.1.0/840-armv4_pass_fix-v4bx_to_ld.patch b/toolchain/gcc/patches/11.1.0/840-armv4_pass_fix-v4bx_to_ld.patch
new file mode 100644
index 0000000000..e3cb616c4e
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/840-armv4_pass_fix-v4bx_to_ld.patch
@@ -0,0 +1,28 @@
+commit 7edc8ca5456d9743dd0075eb3cc5b04f4f24c8cc
+Author: Imre Kaloz <kaloz at openwrt.org>
+Date:   Wed Feb 2 19:34:36 2011 +0000
+
+    add armv4 fixup patches
+    
+    SVN-Revision: 25322
+
+
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -91,10 +91,15 @@
+ #define MUSL_DYNAMIC_LINKER \
+   "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}%{mfdpic:-fdpic}.so.1"
+ 
++/* For armv4 we pass --fix-v4bx to linker to support EABI */
++#undef TARGET_FIX_V4BX_SPEC
++#define TARGET_FIX_V4BX_SPEC " %{mcpu=arm8|mcpu=arm810|mcpu=strongarm*"\
++  "|march=armv4|mcpu=fa526|mcpu=fa626:--fix-v4bx}"
++
+ /* At this point, bpabi.h will have clobbered LINK_SPEC.  We want to
+    use the GNU/Linux version, not the generic BPABI version.  */
+ #undef  LINK_SPEC
+-#define LINK_SPEC EABI_LINK_SPEC					\
++#define LINK_SPEC EABI_LINK_SPEC TARGET_FIX_V4BX_SPEC			\
+   LINUX_OR_ANDROID_LD (LINUX_TARGET_LINK_SPEC,				\
+ 		       LINUX_TARGET_LINK_SPEC " " ANDROID_LINK_SPEC)
+ 
diff --git a/toolchain/gcc/patches/11.1.0/850-use_shared_libgcc.patch b/toolchain/gcc/patches/11.1.0/850-use_shared_libgcc.patch
new file mode 100644
index 0000000000..8b17f1374f
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/850-use_shared_libgcc.patch
@@ -0,0 +1,54 @@
+commit dcfc40358b5a3cae7320c17f8d1cebd5ad5540cd
+Author: Felix Fietkau <nbd at openwrt.org>
+Date:   Sun Feb 12 20:25:47 2012 +0000
+
+    gcc 4.6: port over the missing patch 850-use_shared_libgcc.patch to prevent libgcc crap from leaking into every single binary
+    
+    SVN-Revision: 30486
+--- a/gcc/config/arm/linux-eabi.h
++++ b/gcc/config/arm/linux-eabi.h
+@@ -132,10 +132,6 @@
+   "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} "	\
+   LINUX_OR_ANDROID_LD (GNU_USER_TARGET_ENDFILE_SPEC, ANDROID_ENDFILE_SPEC)
+ 
+-/* Use the default LIBGCC_SPEC, not the version in linux-elf.h, as we
+-   do not use -lfloat.  */
+-#undef LIBGCC_SPEC
+-
+ /* Clear the instruction cache from `beg' to `end'.  This is
+    implemented in lib1funcs.S, so ensure an error if this definition
+    is used.  */
+--- a/gcc/config/linux.h
++++ b/gcc/config/linux.h
+@@ -66,6 +66,10 @@ see the files COPYING3 and COPYING.RUNTI
+ 	  builtin_version ("CRuntime_Musl");			\
+     } while (0)
+ 
++#ifndef LIBGCC_SPEC
++#define LIBGCC_SPEC "%{static|static-libgcc:-lgcc}%{!static:%{!static-libgcc:-lgcc_s}}"
++#endif
++
+ /* Determine which dynamic linker to use depending on whether GLIBC or
+    uClibc or Bionic or musl is the default C library and whether
+    -muclibc or -mglibc or -mbionic or -mmusl has been passed to change
+--- a/libgcc/mkmap-symver.awk
++++ b/libgcc/mkmap-symver.awk
+@@ -136,5 +136,5 @@ function output(lib) {
+   else if (inherit[lib])
+     printf("} %s;\n", inherit[lib]);
+   else
+-    printf ("\n  local:\n\t*;\n};\n");
++    printf ("\n\t*;\n};\n");
+ }
+--- a/gcc/config/rs6000/linux.h
++++ b/gcc/config/rs6000/linux.h
+@@ -62,6 +62,9 @@
+ #undef	CPP_OS_DEFAULT_SPEC
+ #define CPP_OS_DEFAULT_SPEC "%(cpp_os_linux)"
+ 
++#undef LIBGCC_SPEC
++#define LIBGCC_SPEC "%{!static:%{!static-libgcc:-lgcc_s}} -lgcc"
++
+ #undef  LINK_SHLIB_SPEC
+ #define LINK_SHLIB_SPEC "%{shared:-shared} %{!shared: %{static:-static}} \
+   %{static-pie:-static -pie --no-dynamic-linker -z text}"
diff --git a/toolchain/gcc/patches/11.1.0/851-libgcc_no_compat.patch b/toolchain/gcc/patches/11.1.0/851-libgcc_no_compat.patch
new file mode 100644
index 0000000000..d710e40717
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/851-libgcc_no_compat.patch
@@ -0,0 +1,22 @@
+commit 64661de100da1ec1061ef3e5e400285dce115e6b
+Author: Felix Fietkau <nbd at openwrt.org>
+Date:   Sun May 10 13:16:35 2015 +0000
+
+    gcc: add some size optimization patches
+    
+    Signed-off-by: Felix Fietkau <nbd at openwrt.org>
+    
+    SVN-Revision: 45664
+
+--- a/libgcc/config/t-libunwind
++++ b/libgcc/config/t-libunwind
+@@ -2,8 +2,7 @@
+ 
+ HOST_LIBGCC2_CFLAGS += -DUSE_GAS_SYMVER
+ 
+-LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c \
+-  $(srcdir)/unwind-compat.c $(srcdir)/unwind-dw2-fde-compat.c
++LIB2ADDEH = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+ LIB2ADDEHSTATIC = $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c
+ 
+ # Override the default value from t-slibgcc-elf-ver and mention -lunwind
diff --git a/toolchain/gcc/patches/11.1.0/870-ppc_no_crtsavres.patch b/toolchain/gcc/patches/11.1.0/870-ppc_no_crtsavres.patch
new file mode 100644
index 0000000000..bc182f0cec
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/870-ppc_no_crtsavres.patch
@@ -0,0 +1,11 @@
+--- a/gcc/config/rs6000/rs6000-logue.c
++++ b/gcc/config/rs6000/rs6000-logue.c
+@@ -348,7 +348,7 @@ rs6000_savres_strategy (rs6000_stack_t *
+   /* Define cutoff for using out-of-line functions to save registers.  */
+   if (DEFAULT_ABI == ABI_V4 || TARGET_ELF)
+     {
+-      if (!optimize_size)
++      if (1)
+ 	{
+ 	  strategy |= SAVE_INLINE_FPRS | REST_INLINE_FPRS;
+ 	  strategy |= SAVE_INLINE_GPRS | REST_INLINE_GPRS;
diff --git a/toolchain/gcc/patches/11.1.0/881-no_tm_section.patch b/toolchain/gcc/patches/11.1.0/881-no_tm_section.patch
new file mode 100644
index 0000000000..2029910fd0
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/881-no_tm_section.patch
@@ -0,0 +1,11 @@
+--- a/libgcc/crtstuff.c
++++ b/libgcc/crtstuff.c
+@@ -152,7 +152,7 @@ call_ ## FUNC (void)					\
+ #endif
+ 
+ #if !defined(USE_TM_CLONE_REGISTRY) && defined(OBJECT_FORMAT_ELF)
+-# define USE_TM_CLONE_REGISTRY 1
++# define USE_TM_CLONE_REGISTRY 0
+ #elif !defined(USE_TM_CLONE_REGISTRY)
+ # define USE_TM_CLONE_REGISTRY 0
+ #endif
diff --git a/toolchain/gcc/patches/11.1.0/900-bad-mips16-crt.patch b/toolchain/gcc/patches/11.1.0/900-bad-mips16-crt.patch
new file mode 100644
index 0000000000..dd6e9dc889
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/900-bad-mips16-crt.patch
@@ -0,0 +1,9 @@
+--- a/libgcc/config/mips/t-mips16
++++ b/libgcc/config/mips/t-mips16
+@@ -43,3 +43,6 @@ SYNC_CFLAGS = -mno-mips16
+ 
+ # Version these symbols if building libgcc.so.
+ SHLIB_MAPFILES += $(srcdir)/config/mips/libgcc-mips16.ver
++
++CRTSTUFF_T_CFLAGS += -mno-mips16
++CRTSTUFF_T_CFLAGS_S += -mno-mips16
diff --git a/toolchain/gcc/patches/11.1.0/910-mbsd_multi.patch b/toolchain/gcc/patches/11.1.0/910-mbsd_multi.patch
new file mode 100644
index 0000000000..b167436752
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/910-mbsd_multi.patch
@@ -0,0 +1,146 @@
+commit 99368862e44740ff4fd33760893f04e14f9dbdf1
+Author: Felix Fietkau <nbd at openwrt.org>
+Date:   Tue Jul 31 00:52:27 2007 +0000
+
+    Port the mbsd_multi patch from freewrt, which adds -fhonour-copts. This will emit warnings in packages that don't use our target cflags properly
+    
+    SVN-Revision: 8256
+
+	This patch brings over a feature from MirBSD:
+	* -fhonour-copts
+	  If this option is not given, it's warned (depending
+	  on environment variables). This is to catch errors
+	  of misbuilt packages which override CFLAGS themselves.
+
+	This patch was authored by Thorsten Glaser <tg at mirbsd.de>
+	with copyright assignment to the FSF in effect.
+
+--- a/gcc/c-family/c-opts.c
++++ b/gcc/c-family/c-opts.c
+@@ -107,6 +107,9 @@ static dump_flags_t original_dump_flags;
+ /* Whether any standard preincluded header has been preincluded.  */
+ static bool done_preinclude;
+ 
++/* Check if a port honours COPTS.  */
++static int honour_copts = 0;
++
+ static void handle_OPT_d (const char *);
+ static void set_std_cxx98 (int);
+ static void set_std_cxx11 (int);
+@@ -469,6 +472,12 @@ c_common_handle_option (size_t scode, co
+       flag_no_builtin = !value;
+       break;
+ 
++    case OPT_fhonour_copts:
++      if (c_language == clk_c) {
++        honour_copts++;
++      }
++      break;
++
+     case OPT_fconstant_string_class_:
+       constant_string_class_name = arg;
+       break;
+@@ -1196,6 +1205,47 @@ c_common_init (void)
+       return false;
+     }
+ 
++  if (c_language == clk_c) {
++    char *ev = getenv ("GCC_HONOUR_COPTS");
++    int evv;
++    if (ev == NULL)
++      evv = -1;
++    else if ((*ev == '0') || (*ev == '\0'))
++      evv = 0;
++    else if (*ev == '1')
++      evv = 1;
++    else if (*ev == '2')
++      evv = 2;
++    else if (*ev == 's')
++      evv = -1;
++    else {
++      warning (0, "unknown GCC_HONOUR_COPTS value, assuming 1");
++      evv = 1; /* maybe depend this on something like MIRBSD_NATIVE?  */
++    }
++    if (evv == 1) {
++      if (honour_copts == 0) {
++        error ("someone does not honour COPTS at all in lenient mode");
++        return false;
++      } else if (honour_copts != 1) {
++        warning (0, "someone does not honour COPTS correctly, passed %d times",
++         honour_copts);
++      }
++    } else if (evv == 2) {
++      if (honour_copts == 0) {
++        error ("someone does not honour COPTS at all in strict mode");
++        return false;
++      } else if (honour_copts != 1) {
++        error ("someone does not honour COPTS correctly, passed %d times",
++         honour_copts);
++        return false;
++      }
++    } else if (evv == 0) {
++      if (honour_copts != 1)
++        inform (UNKNOWN_LOCATION, "someone does not honour COPTS correctly, passed %d times",
++         honour_copts);
++    }
++  }
++
+   return true;
+ }
+ 
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -1663,6 +1663,9 @@ C++ ObjC++ Optimization Alias(fexception
+ fhonor-std
+ C++ ObjC++ WarnRemoved
+ 
++fhonour-copts
++C ObjC C++ ObjC++ RejectNegative
++
+ fhosted
+ C ObjC
+ Assume normal C execution environment.
+--- a/gcc/common.opt
++++ b/gcc/common.opt
+@@ -1698,6 +1698,9 @@ fguess-branch-probability
+ Common Var(flag_guess_branch_prob) Optimization
+ Enable guessing of branch probabilities.
+ 
++fhonour-copts
++Common RejectNegative
++
+ ; Nonzero means ignore `#ident' directives.  0 means handle them.
+ ; Generate position-independent code for executables if possible
+ ; On SVR4 targets, it also controls whether or not to emit a
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -9054,6 +9054,17 @@ This option is only supported for C and
+ @option{-Wall} and by @option{-Wpedantic}, which can be disabled with
+ @option{-Wno-pointer-sign}.
+ 
++ at item -fhonour-copts
++ at opindex fhonour-copts
++If @env{GCC_HONOUR_COPTS} is set to 1, abort if this option is not
++given at least once, and warn if it is given more than once.
++If @env{GCC_HONOUR_COPTS} is set to 2, abort if this option is not
++given exactly once.
++If @env{GCC_HONOUR_COPTS} is set to 0 or unset, warn if this option
++is not given exactly once.
++The warning is quelled if @env{GCC_HONOUR_COPTS} is set to @samp{s}.
++This flag and environment variable only affect the C language.
++
+ @item -Wstack-protector
+ @opindex Wstack-protector
+ @opindex Wno-stack-protector
+--- a/gcc/opts.c
++++ b/gcc/opts.c
+@@ -2448,6 +2448,9 @@ common_handle_option (struct gcc_options
+       /* Currently handled in a prescan.  */
+       break;
+ 
++    case OPT_fhonour_copts:
++      break;
++
+     case OPT_Werror:
+       dc->warning_as_error_requested = value;
+       break;
diff --git a/toolchain/gcc/patches/11.1.0/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches/11.1.0/920-specs_nonfatal_getenv.patch
new file mode 100644
index 0000000000..edbef09c6c
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/920-specs_nonfatal_getenv.patch
@@ -0,0 +1,22 @@
+Author: Jo-Philipp Wich <jow at openwrt.org>
+Date:   Sat Apr 21 03:02:39 2012 +0000
+
+    gcc: add patch to make the getenv() spec function nonfatal if requested environment variable is unset
+    
+    SVN-Revision: 31390
+
+--- a/gcc/gcc.c
++++ b/gcc/gcc.c
+@@ -10090,8 +10090,10 @@ getenv_spec_function (int argc, const ch
+     }
+ 
+   if (!value)
+-    fatal_error (input_location,
+-		 "environment variable %qs not defined", varname);
++    {
++      warning (input_location, "environment variable %qs not defined", varname);
++      value = "";
++    }
+ 
+   /* We have to escape every character of the environment variable so
+      they are not interpreted as active spec characters.  A
diff --git a/toolchain/gcc/patches/11.1.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/11.1.0/930-fix-mips-noexecstack.patch
new file mode 100644
index 0000000000..591dfe5a50
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/930-fix-mips-noexecstack.patch
@@ -0,0 +1,111 @@
+From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001
+From: Andrew McDonnell <bugs at andrewmcdonnell.net>
+Date: Fri, 3 Oct 2014 19:09:00 +0930
+Subject: Add .note.GNU-stack section
+
+See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html
+Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html
+
+Re: [Patch, MIPS] Add .note.GNU-stack section
+
+    From: Steve Ellcey <sellcey at mips dot com>
+
+On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote:
+>
+>
+> On Wed, Sep 10, 2014 at 9:27 AM, <pinskia at gmail.com> wrote:
+
+>         This works except you did not update the assembly files in
+>         libgcc or glibc. We (Cavium) have the same patch in our tree
+>         for a few released versions.
+
+> Mind just checking yours in then Andrew?
+
+> Thanks!
+> -eric
+
+I talked to Andrew about what files he changed in GCC and created and
+tested this new patch.  Andrew also mentioned changing some assembly
+files in glibc but I don't see any use of '.section .note.GNU-stack' in
+any assembly files in glibc (for any platform) so I wasn't planning on
+creating a glibc to add them to mips glibc assembly language files.
+
+OK to check in this patch?
+
+Steve Ellcey
+sellcey at mips.com
+
+
+
+2014-09-26  Steve Ellcey  <sellcey at mips.com>
+---
+ gcc/config/mips/mips.c          | 3 +++
+ libgcc/config/mips/crti.S       | 4 ++++
+ libgcc/config/mips/crtn.S       | 3 +++
+ libgcc/config/mips/mips16.S     | 4 ++++
+ libgcc/config/mips/vr4120-div.S | 4 ++++
+ 5 files changed, 18 insertions(+)
+
+--- a/gcc/config/mips/mips.c
++++ b/gcc/config/mips/mips.c
+@@ -22890,6 +22890,9 @@ mips_asm_file_end (void)
+ #define TARGET_ASM_FILE_END mips_asm_file_end
+ 
+ 
++#undef TARGET_ASM_FILE_END
++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
++
+ struct gcc_target targetm = TARGET_INITIALIZER;
+ 

+ #include "gt-mips.h"
+--- a/libgcc/config/mips/crti.S
++++ b/libgcc/config/mips/crti.S
+@@ -24,6 +24,10 @@ see the files COPYING3 and COPYING.RUNTI
+ /* An executable stack is *not* required for these functions.  */
+ #include "gnustack.h"
+ 
++
++/* An executable stack is *not* required for these functions.  */
++	.section .note.GNU-stack,"",%progbits
++
+ /* 4 slots for argument spill area.  1 for cpreturn, 1 for stack.
+    Return spill offset of 40 and 20.  Aligned to 16 bytes for n32.  */
+ 
+--- a/libgcc/config/mips/crtn.S
++++ b/libgcc/config/mips/crtn.S
+@@ -24,6 +24,9 @@ see the files COPYING3 and COPYING.RUNTI
+ /* An executable stack is *not* required for these functions.  */
+ #include "gnustack.h"
+ 
++/* An executable stack is *not* required for these functions.  */
++	.section .note.GNU-stack,"",%progbits
++
+ /* 4 slots for argument spill area.  1 for cpreturn, 1 for stack.
+    Return spill offset of 40 and 20.  Aligned to 16 bytes for n32.  */
+ 
+--- a/libgcc/config/mips/mips16.S
++++ b/libgcc/config/mips/mips16.S
+@@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI
+    values using the soft-float calling convention, but do the actual
+    operation using the hard floating point instructions.  */
+ 
++/* An executable stack is *not* required for these functions.  */
++	.section .note.GNU-stack,"",%progbits
++	.previous
++
+ #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64)
+ 
+ /* This file contains 32-bit assembly code.  */
+--- a/libgcc/config/mips/vr4120-div.S
++++ b/libgcc/config/mips/vr4120-div.S
+@@ -29,6 +29,10 @@ see the files COPYING3 and COPYING.RUNTI
+    -mfix-vr4120.  div and ddiv do not give the correct result when one
+    of the operands is negative.  */
+ 
++/* An executable stack is *not* required for these functions.  */
++	.section .note.GNU-stack,"",%progbits
++	.previous
++
+ 	.set	nomips16
+ 
+ #define DIV								\
diff --git a/toolchain/gcc/patches/11.1.0/931-libffi-fix-MIPS-softfloat-build-issue.patch b/toolchain/gcc/patches/11.1.0/931-libffi-fix-MIPS-softfloat-build-issue.patch
new file mode 100644
index 0000000000..fb4cb1533a
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/931-libffi-fix-MIPS-softfloat-build-issue.patch
@@ -0,0 +1,168 @@
+From c0c62fa4256f805389f16ebfc4a60cf789129b50 Mon Sep 17 00:00:00 2001
+From: BangLang Huang <banglang.huang at foxmail.com>
+Date: Wed, 9 Nov 2016 10:36:49 +0800
+Subject: [PATCH] libffi: fix MIPS softfloat build issue
+
+Backported from github.com/libffi/libffi#272
+
+Signed-off-by: BangLang Huang <banglang.huang at foxmail.com>
+Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
+---
+ libffi/src/mips/n32.S | 17 +++++++++++++++++
+ libffi/src/mips/o32.S | 17 +++++++++++++++++
+ 2 files changed, 34 insertions(+)
+
+--- a/libffi/src/mips/n32.S
++++ b/libffi/src/mips/n32.S
+@@ -107,6 +107,16 @@ loadregs:
+ 
+ 	REG_L	t6, 3*FFI_SIZEOF_ARG($fp)  # load the flags word into t6.
+ 
++#ifdef __mips_soft_float
++	REG_L	a0, 0*FFI_SIZEOF_ARG(t9)
++	REG_L	a1, 1*FFI_SIZEOF_ARG(t9)
++	REG_L	a2, 2*FFI_SIZEOF_ARG(t9)
++	REG_L	a3, 3*FFI_SIZEOF_ARG(t9)
++	REG_L	a4, 4*FFI_SIZEOF_ARG(t9)
++	REG_L	a5, 5*FFI_SIZEOF_ARG(t9)
++	REG_L	a6, 6*FFI_SIZEOF_ARG(t9)
++	REG_L	a7, 7*FFI_SIZEOF_ARG(t9)
++#else
+ 	and	t4, t6, ((1<<FFI_FLAG_BITS)-1)
+ 	REG_L	a0, 0*FFI_SIZEOF_ARG(t9)
+ 	beqz	t4, arg1_next
+@@ -193,6 +203,7 @@ arg7_next:
+ arg8_doublep:	
+  	l.d	$f19, 7*FFI_SIZEOF_ARG(t9)	
+ arg8_next:	
++#endif
+ 
+ callit:		
+ 	# Load the function pointer
+@@ -214,6 +225,7 @@ retint:
+ 	b	epilogue
+ 
+ retfloat:
++#ifndef __mips_soft_float
+ 	bne     t6, FFI_TYPE_FLOAT, retdouble
+ 	jal	t9
+ 	REG_L	t4, 4*FFI_SIZEOF_ARG($fp)
+@@ -272,6 +284,7 @@ retstruct_f_d:
+ 	s.s	$f0, 0(t4)
+ 	s.d	$f2, 8(t4)
+ 	b	epilogue
++#endif
+ 
+ retstruct_d_soft:
+ 	bne	t6, FFI_TYPE_STRUCT_D_SOFT, retstruct_f_soft
+@@ -429,6 +442,7 @@ ffi_closure_N32:
+ 	REG_S	a6, A6_OFF2($sp)
+ 	REG_S	a7, A7_OFF2($sp)
+ 
++#ifndef __mips_soft_float
+ 	# Store all possible float/double registers.
+ 	s.d	$f12, F12_OFF2($sp)
+ 	s.d	$f13, F13_OFF2($sp)
+@@ -438,6 +452,7 @@ ffi_closure_N32:
+ 	s.d	$f17, F17_OFF2($sp)
+ 	s.d	$f18, F18_OFF2($sp)
+ 	s.d	$f19, F19_OFF2($sp)
++#endif
+ 
+ 	# Call ffi_closure_mips_inner_N32 to do the real work.
+ 	LA	t9, ffi_closure_mips_inner_N32
+@@ -458,6 +473,7 @@ cls_retint:
+ 	b	cls_epilogue
+ 
+ cls_retfloat:
++#ifndef __mips_soft_float
+ 	bne     v0, FFI_TYPE_FLOAT, cls_retdouble
+ 	l.s	$f0, V0_OFF2($sp)
+ 	b	cls_epilogue
+@@ -500,6 +516,7 @@ cls_retstruct_f_d:
+ 	l.s	$f0, V0_OFF2($sp)
+ 	l.d	$f2, V1_OFF2($sp)
+ 	b	cls_epilogue
++#endif
+ 	
+ cls_retstruct_small2:	
+ 	REG_L	v0, V0_OFF2($sp)
+--- a/libffi/src/mips/o32.S
++++ b/libffi/src/mips/o32.S
+@@ -82,13 +82,16 @@ sixteen:
+ 		
+ 	ADDU	$sp, 4 * FFI_SIZEOF_ARG		# adjust $sp to new args
+ 
++#ifndef __mips_soft_float
+ 	bnez	t0, pass_d			# make it quick for int
++#endif
+ 	REG_L	a0, 0*FFI_SIZEOF_ARG($sp)	# just go ahead and load the
+ 	REG_L	a1, 1*FFI_SIZEOF_ARG($sp)	# four regs.
+ 	REG_L	a2, 2*FFI_SIZEOF_ARG($sp)
+ 	REG_L	a3, 3*FFI_SIZEOF_ARG($sp)
+ 	b	call_it
+ 
++#ifndef __mips_soft_float
+ pass_d:
+ 	bne	t0, FFI_ARGS_D, pass_f
+ 	l.d	$f12, 0*FFI_SIZEOF_ARG($sp)	# load $fp regs from args
+@@ -130,6 +133,7 @@ pass_f_d:
+  #	bne	t0, FFI_ARGS_F_D, call_it
+ 	l.s	$f12, 0*FFI_SIZEOF_ARG($sp)	# load $fp regs from args
+ 	l.d	$f14, 2*FFI_SIZEOF_ARG($sp)	# passing double and float
++#endif
+ 
+ call_it:	
+ 	# Load the function pointer
+@@ -158,14 +162,23 @@ retfloat:
+ 	bne     t2, FFI_TYPE_FLOAT, retdouble
+ 	jalr	t9
+ 	REG_L	t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+ 	s.s	$f0, 0(t0)
++#else
++	REG_S v0, 0(t0)
++#endif
+ 	b	epilogue
+ 
+ retdouble:	
+ 	bne	t2, FFI_TYPE_DOUBLE, noretval
+ 	jalr	t9
+ 	REG_L	t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp)
++#ifndef __mips_soft_float
+ 	s.d	$f0, 0(t0)
++#else
++	REG_S v1, 4(t0)
++	REG_S v0, 0(t0)
++#endif
+ 	b	epilogue
+ 	
+ noretval:	
+@@ -261,9 +274,11 @@ $LCFI7:
+ 	li	$13, 1		# FFI_O32
+ 	bne	$16, $13, 1f	# Skip fp save if FFI_O32_SOFT_FLOAT
+ 	
++#ifndef __mips_soft_float
+ 	# Store all possible float/double registers.
+ 	s.d	$f12, FA_0_0_OFF2($fp)
+ 	s.d	$f14, FA_1_0_OFF2($fp)
++#endif
+ 1:	
+ 	# Call ffi_closure_mips_inner_O32 to do the work.
+ 	la	t9, ffi_closure_mips_inner_O32
+@@ -281,6 +296,7 @@ $LCFI7:
+ 	li	$13, 1		# FFI_O32
+ 	bne	$16, $13, 1f	# Skip fp restore if FFI_O32_SOFT_FLOAT
+ 
++#ifndef __mips_soft_float
+ 	li	$9, FFI_TYPE_FLOAT
+ 	l.s	$f0, V0_OFF2($fp)
+ 	beq	$8, $9, closure_done
+@@ -288,6 +304,7 @@ $LCFI7:
+ 	li	$9, FFI_TYPE_DOUBLE
+ 	l.d	$f0, V0_OFF2($fp)
+ 	beq	$8, $9, closure_done
++#endif
+ 1:	
+ 	REG_L	$3, V1_OFF2($fp)
+ 	REG_L	$2, V0_OFF2($fp)
diff --git a/toolchain/gcc/patches/11.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch b/toolchain/gcc/patches/11.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch
new file mode 100644
index 0000000000..b1d7576328
--- /dev/null
+++ b/toolchain/gcc/patches/11.1.0/960-gotools-fix-compilation-when-making-cross-compiler.patch
@@ -0,0 +1,67 @@
+From dda6b050cd74a352670787a294596a9c56c21327 Mon Sep 17 00:00:00 2001
+From: Yousong Zhou <yszhou4tech at gmail.com>
+Date: Fri, 4 May 2018 18:20:53 +0800
+Subject: [PATCH] gotools: fix compilation when making cross compiler
+
+libgo is "the runtime support library for the Go programming language.
+This library is intended for use with the Go frontend."
+
+gccgo will link target files with libgo.so which depends on libgcc_s.so.1, but
+the linker will complain that it cannot find it.  That's because shared libgcc
+is not present in the install directory yet.  libgo.so was made without problem
+because gcc will emit -lgcc_s when compiled with -shared option.  When gotools
+were being made, it was supplied with -static-libgcc thus no link option was
+provided.  Check LIBGO in gcc/go/gcc-spec.c for how gccgo make a builtin spec
+for linking with libgo.so
+
+- GccgoCrossCompilation, https://github.com/golang/go/wiki/GccgoCrossCompilation
+- Cross-building instructions, http://www.eglibc.org/archives/patches/msg00078.html
+
+When 3-pass GCC compilation is used, shared libgcc runtime libraries will be
+available after gcc pass2 completed and will meet the gotools link requirement
+at gcc pass3
+---
+ gotools/Makefile.am | 4 +++-
+ gotools/Makefile.in | 4 +++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+--- a/gotools/Makefile.am
++++ b/gotools/Makefile.am
+@@ -26,6 +26,7 @@ PWD_COMMAND = $${PWDCMD-pwd}
+ STAMP = echo timestamp >
+ 
+ libgodir = ../$(target_noncanonical)/libgo
++libgccdir = ../$(target_noncanonical)/libgcc
+ LIBGODEP = $(libgodir)/libgo.la
+ 
+ LIBGOTOOL = $(libgodir)/libgotool.a
+@@ -41,7 +42,8 @@ GOCFLAGS = $(CFLAGS_FOR_TARGET)
+ GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
+ 
+ AM_GOCFLAGS = -I $(libgodir)
+-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs
++AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \
++	-L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s
+ GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
+ 
+ libgosrcdir = $(srcdir)/../libgo/go
+--- a/gotools/Makefile.in
++++ b/gotools/Makefile.in
+@@ -337,6 +337,7 @@ mkinstalldirs = $(SHELL) $(toplevel_srcd
+ PWD_COMMAND = $${PWDCMD-pwd}
+ STAMP = echo timestamp >
+ libgodir = ../$(target_noncanonical)/libgo
++libgccdir = ../$(target_noncanonical)/libgcc
+ LIBGODEP = $(libgodir)/libgo.la
+ LIBGOTOOL = $(libgodir)/libgotool.a
+ @NATIVE_FALSE at GOCOMPILER = $(GOC)
+@@ -346,7 +347,8 @@ LIBGOTOOL = $(libgodir)/libgotool.a
+ GOCFLAGS = $(CFLAGS_FOR_TARGET)
+ GOCOMPILE = $(GOCOMPILER) $(GOCFLAGS)
+ AM_GOCFLAGS = -I $(libgodir)
+-AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs
++AM_LDFLAGS = -L $(libgodir) -L $(libgodir)/.libs \
++	-L $(libgccdir) -L $(libgccdir)/.libs -lgcc_s
+ GOLINK = $(GOCOMPILER) $(GOCFLAGS) $(AM_GOCFLAGS) $(LDFLAGS) $(AM_LDFLAGS) -o $@
+ libgosrcdir = $(srcdir)/../libgo/go
+ cmdsrcdir = $(libgosrcdir)/cmd


From lede-commits at lists.infradead.org  Sat Jul 17 10:13:09 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 13:13:09 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.10 to 5.10.49
In-Reply-To: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
References: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
Message-ID: <mailman.8294.1626541999.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2e324c0a2c927461ab74f688fd878dce8fa52af2

commit 2e324c0a2c927461ab74f688fd878dce8fa52af2
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Sun Jul 11 20:03:08 2021 +0100

    kernel: bump 5.10 to 5.10.49
    
    No deleted or manually refreshed patches.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 include/kernel-version.mk                                             | 4 ++--
 .../ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch     | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 44f258965f..0af8d05fd1 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
 endif
 
 LINUX_VERSION-5.4 = .132
-LINUX_VERSION-5.10 = .48
+LINUX_VERSION-5.10 = .49
 
 LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
-LINUX_KERNEL_HASH-5.10.48 = dbd1193480e1b85928d8dcdd7507365381aafe09810ce3d28677d6f4e722c25e
+LINUX_KERNEL_HASH-5.10.49 = b0d16de7e79c272b01996ad8ff8bdf3a6a011bc0c94049baccf69f05dde3025e
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch
index e0703db1bc..204dc41b01 100644
--- a/target/linux/ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch
+++ b/target/linux/ramips/patches-5.10/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
-@@ -2972,6 +2972,18 @@ static const struct usb_device_id uvc_id
+@@ -3004,6 +3004,18 @@ static const struct usb_device_id uvc_id
  	  .bInterfaceSubClass	= 1,
  	  .bInterfaceProtocol	= 0,
  	  .driver_info		= UVC_INFO_META(V4L2_META_FMT_D4XX) },


From lede-commits at lists.infradead.org  Sat Jul 17 10:13:06 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 13:13:06 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.4 to 5.4.132
In-Reply-To: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
References: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
Message-ID: <mailman.8295.1626541999.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2fe1b32156a2f28013c2807d1674dd1ced1a6fa1

commit 2fe1b32156a2f28013c2807d1674dd1ced1a6fa1
Author: John Audia <graysky at archlinux.us>
AuthorDate: Wed Jul 14 18:20:29 2021 -0400

    kernel: bump 5.4 to 5.4.132
    
    Manually rebased:
      layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch
    
    All other patches automatically rebased.
    
    Build system: x86_64
    Build-tested: ipq806x/R7800
    Run-tested: ipq806x/R7800
    
    No dmesg regressions, everything functional
    
    Signed-off-by: John Audia <graysky at archlinux.us>
---
 include/kernel-version.mk                          |  4 +-
 .../patches-5.4/140-redboot_boardconfig.patch      |  8 +-
 .../patches-5.4/141-redboot_partition_scan.patch   |  6 +-
 .../142-redboot_various_erase_size_fix.patch       | 10 +--
 ...03-leds-add-reset-controller-based-driver.patch |  2 +-
 .../408-mtd-redboot_partition_scan.patch           |  6 +-
 .../patches-5.4/910-unaligned_access_hacks.patch   |  2 +-
 ...950-0043-MMC-added-alternative-MMC-driver.patch |  6 +-
 ...743-fix-connected-active-CSI-2-lane-repor.patch |  2 +-
 ...58743-Add-support-for-972Mbit-s-link-freq.patch |  2 +-
 ...tc358743-Check-I2C-succeeded-during-probe.patch |  4 +-
 ...Use-more-event-ring-segment-table-entries.patch |  4 +-
 ...ing-treat-dev-bus_dma_mask-as-a-DMA-limit.patch |  2 +-
 ...orce-CS_HIGH-if-GPIO-descriptors-are-used.patch |  4 +-
 ...-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch |  2 +-
 ...edia-i2c-tc358743-Fix-fallthrough-warning.patch |  2 +-
 ...ng-fbtft-Add-support-for-display-variants.patch |  6 +-
 .../patches-5.4/400-bcm963xx_flashmap.patch        |  6 +-
 .../generic/hack-5.4/221-module_exports.patch      |  2 +-
 .../hack-5.4/661-use_fq_codel_by_default.patch     |  2 +-
 .../pending-5.4/205-backtrace_module_info.patch    |  4 +-
 ...edboot-add-of_match_table-with-DT-binding.patch |  2 +-
 .../pending-5.4/420-mtd-redboot_space.patch        |  2 +-
 ...ved_mem-Ensure-cma-reserved-region-not-cr.patch |  6 +-
 ...p-prepare-common-code-for-cdns-and-rk-dpi.patch | 88 +++++++++++-----------
 ...3-drm-bridge-add-Cadence-MHDP-HDMI-DP-API.patch | 30 ++++----
 ...-0009-drm-rockchip-Fix-build-failed-issue.patch |  2 +-
 ...p-change-base-address-name-from-regs-to-r.patch |  2 +-
 ...cdns-dp-Remove-link-rate-lanes-set-by-dev.patch |  8 +-
 ...dwc3-Add-cache-type-configuration-support.patch |  2 +-
 ...vert-usb-dwc3-Add-cache-type-configuratio.patch |  2 +-
 ...b-dwc3-Add-cache-type-configuration-suppo.patch |  2 +-
 .../patches-5.4/0900-bt-mtk-serial-fix.patch       |  2 +-
 .../patches-5.4/1021-ubnt-ledbar-driver.patch      |  2 +-
 34 files changed, 118 insertions(+), 118 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 9c1856a9fd..5de651b9c4 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .131
+LINUX_VERSION-5.4 = .132
 LINUX_VERSION-5.10 = .46
 
-LINUX_KERNEL_HASH-5.4.131 = 25e35a6ec1c0c72b971347dd8e403f4953e1a023cbcf96f9707ede5d45b399fe
+LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
 LINUX_KERNEL_HASH-5.10.46 = 569122a39c6b325befb9ac1c07da0c53e6363b3baacd82081d131b06c1dc1415
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
diff --git a/target/linux/ath25/patches-5.4/140-redboot_boardconfig.patch b/target/linux/ath25/patches-5.4/140-redboot_boardconfig.patch
index 0ffa12eec0..81b23e863e 100644
--- a/target/linux/ath25/patches-5.4/140-redboot_boardconfig.patch
+++ b/target/linux/ath25/patches-5.4/140-redboot_boardconfig.patch
@@ -9,7 +9,7 @@
  struct fis_image_desc {
      unsigned char name[16];      // Null terminated name
      uint32_t	  flash_base;    // Address within FLASH of image
-@@ -67,6 +69,7 @@ static int parse_redboot_partitions(stru
+@@ -72,6 +74,7 @@ static int parse_redboot_partitions(stru
  				    const struct mtd_partition **pparts,
  				    struct mtd_part_parser_data *data)
  {
@@ -17,7 +17,7 @@
  	int nrparts = 0;
  	struct fis_image_desc *buf;
  	struct mtd_partition *parts;
-@@ -234,14 +237,15 @@ static int parse_redboot_partitions(stru
+@@ -239,14 +242,15 @@ static int parse_redboot_partitions(stru
  		}
  	}
  #endif
@@ -35,7 +35,7 @@
  #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
  	if (nulllen > 0) {
  		strcpy(nullname, nullstring);
-@@ -260,6 +264,8 @@ static int parse_redboot_partitions(stru
+@@ -265,6 +269,8 @@ static int parse_redboot_partitions(stru
  	}
  #endif
  	for ( ; i<nrparts; i++) {
@@ -44,7 +44,7 @@
  		parts[i].size = fl->img->size;
  		parts[i].offset = fl->img->flash_base;
  		parts[i].name = names;
-@@ -293,6 +299,13 @@ static int parse_redboot_partitions(stru
+@@ -298,6 +304,13 @@ static int parse_redboot_partitions(stru
  		fl = fl->next;
  		kfree(tmp_fl);
  	}
diff --git a/target/linux/ath25/patches-5.4/141-redboot_partition_scan.patch b/target/linux/ath25/patches-5.4/141-redboot_partition_scan.patch
index 3302d6d247..343eedc075 100644
--- a/target/linux/ath25/patches-5.4/141-redboot_partition_scan.patch
+++ b/target/linux/ath25/patches-5.4/141-redboot_partition_scan.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -88,12 +88,18 @@ static int parse_redboot_partitions(stru
+@@ -93,12 +93,18 @@ static int parse_redboot_partitions(stru
  
  	parse_redboot_of(master);
  
@@ -19,7 +19,7 @@
  				return -EIO;
  			}
  			offset -= master->erasesize;
-@@ -106,10 +112,6 @@ static int parse_redboot_partitions(stru
+@@ -111,10 +117,6 @@ static int parse_redboot_partitions(stru
  				goto nogood;
  		}
  	}
@@ -30,7 +30,7 @@
  
  	printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
  	       master->name, offset);
-@@ -182,6 +184,11 @@ static int parse_redboot_partitions(stru
+@@ -187,6 +189,11 @@ static int parse_redboot_partitions(stru
  	}
  	if (i == numslots) {
  		/* Didn't find it */
diff --git a/target/linux/ath25/patches-5.4/142-redboot_various_erase_size_fix.patch b/target/linux/ath25/patches-5.4/142-redboot_various_erase_size_fix.patch
index 2ac0eb92bf..55cf84eeff 100644
--- a/target/linux/ath25/patches-5.4/142-redboot_various_erase_size_fix.patch
+++ b/target/linux/ath25/patches-5.4/142-redboot_various_erase_size_fix.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -65,6 +65,22 @@ static void parse_redboot_of(struct mtd_
+@@ -70,6 +70,22 @@ static void parse_redboot_of(struct mtd_
  	directory = dirblock;
  }
  
@@ -23,7 +23,7 @@
  static int parse_redboot_partitions(struct mtd_info *master,
  				    const struct mtd_partition **pparts,
  				    struct mtd_part_parser_data *data)
-@@ -81,6 +97,7 @@ static int parse_redboot_partitions(stru
+@@ -86,6 +102,7 @@ static int parse_redboot_partitions(stru
  	int namelen = 0;
  	int nulllen = 0;
  	int numslots;
@@ -31,7 +31,7 @@
  	unsigned long offset;
  #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
  	static char nullstring[] = "unallocated";
-@@ -195,7 +212,10 @@ static int parse_redboot_partitions(stru
+@@ -200,7 +217,10 @@ static int parse_redboot_partitions(stru
  		goto out;
  	}
  
@@ -43,7 +43,7 @@
  		struct fis_list *new_fl, **prev;
  
  		if (buf[i].name[0] == 0xff) {
-@@ -271,12 +291,13 @@ static int parse_redboot_partitions(stru
+@@ -276,12 +296,13 @@ static int parse_redboot_partitions(stru
  	}
  #endif
  	for ( ; i<nrparts; i++) {
@@ -59,7 +59,7 @@
  		strcpy(names, fl->img->name);
  #ifdef CONFIG_MTD_REDBOOT_PARTS_READONLY
  		if (!memcmp(names, "RedBoot", 8) ||
-@@ -306,7 +327,9 @@ static int parse_redboot_partitions(stru
+@@ -311,7 +332,9 @@ static int parse_redboot_partitions(stru
  		fl = fl->next;
  		kfree(tmp_fl);
  	}
diff --git a/target/linux/ath79/patches-5.4/0003-leds-add-reset-controller-based-driver.patch b/target/linux/ath79/patches-5.4/0003-leds-add-reset-controller-based-driver.patch
index 3249e1e82b..32a122fabe 100644
--- a/target/linux/ath79/patches-5.4/0003-leds-add-reset-controller-based-driver.patch
+++ b/target/linux/ath79/patches-5.4/0003-leds-add-reset-controller-based-driver.patch
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/drivers/leds/Kconfig
 +++ b/drivers/leds/Kconfig
-@@ -823,6 +823,17 @@ config LEDS_LM36274
+@@ -824,6 +824,17 @@ config LEDS_LM36274
  	  Say Y to enable the LM36274 LED driver for TI LMU devices.
  	  This supports the LED device LM36274.
  
diff --git a/target/linux/ath79/patches-5.4/408-mtd-redboot_partition_scan.patch b/target/linux/ath79/patches-5.4/408-mtd-redboot_partition_scan.patch
index 8f3ee32f57..e5b06e14a5 100644
--- a/target/linux/ath79/patches-5.4/408-mtd-redboot_partition_scan.patch
+++ b/target/linux/ath79/patches-5.4/408-mtd-redboot_partition_scan.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -85,12 +85,18 @@ static int parse_redboot_partitions(stru
+@@ -90,12 +90,18 @@ static int parse_redboot_partitions(stru
  
  	parse_redboot_of(master);
  
@@ -19,7 +19,7 @@
  				return -EIO;
  			}
  			offset -= master->erasesize;
-@@ -103,10 +109,6 @@ static int parse_redboot_partitions(stru
+@@ -108,10 +114,6 @@ static int parse_redboot_partitions(stru
  				goto nogood;
  		}
  	}
@@ -30,7 +30,7 @@
  
  	printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
  	       master->name, offset);
-@@ -179,6 +181,11 @@ static int parse_redboot_partitions(stru
+@@ -184,6 +186,11 @@ static int parse_redboot_partitions(stru
  	}
  	if (i == numslots) {
  		/* Didn't find it */
diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
index 2440fbbb73..99520863d3 100644
--- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
@@ -267,7 +267,7 @@
  		case IPV6_2292HOPOPTS:
 --- a/net/ipv6/exthdrs.c
 +++ b/net/ipv6/exthdrs.c
-@@ -752,7 +752,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
+@@ -751,7 +751,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
  		goto drop;
  	}
  
diff --git a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
index a9f99add60..f70887855b 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
@@ -222,7 +222,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);
  
-@@ -2884,6 +2891,7 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2892,6 +2899,7 @@ static int mmc_blk_probe(struct mmc_card
  {
  	struct mmc_blk_data *md, *part_md;
  	char cap_str[10];
@@ -230,7 +230,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros at gmail.com>
  
  	/*
  	 * Check that the card supports the command class(es) we need.
-@@ -2891,7 +2899,16 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2899,7 +2907,16 @@ static int mmc_blk_probe(struct mmc_card
  	if (!(card->csd.cmdclass & CCC_BLOCK_READ))
  		return -ENODEV;
  
@@ -248,7 +248,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros at gmail.com>
  
  	card->complete_wq = alloc_workqueue("mmc_complete",
  					WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
-@@ -2906,9 +2923,14 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2914,9 +2931,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.4/950-0153-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch b/target/linux/bcm27xx/patches-5.4/950-0153-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch
index 2357c878d7..ef2193f4de 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0153-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0153-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch
@@ -47,7 +47,7 @@ Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
  
  	switch (state->csi_lanes_in_use) {
  	case 1:
-@@ -2054,6 +2063,7 @@ static int tc358743_probe(struct i2c_cli
+@@ -2055,6 +2064,7 @@ static int tc358743_probe(struct i2c_cli
  	if (pdata) {
  		state->pdata = *pdata;
  		state->bus.flags = V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
diff --git a/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch b/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch
index 18ee169b1c..7166232c40 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch
@@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	 */
  	bps_pr_lane = 2 * endpoint.link_frequencies[0];
  	if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) {
-@@ -1990,23 +1991,41 @@ static int tc358743_probe_of(struct tc35
+@@ -1991,23 +1992,41 @@ static int tc358743_probe_of(struct tc35
  			       state->pdata.refclk_hz * state->pdata.pll_prd;
  
  	/*
diff --git a/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Check-I2C-succeeded-during-probe.patch b/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Check-I2C-succeeded-during-probe.patch
index 653602b306..1a26997c36 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Check-I2C-succeeded-during-probe.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Check-I2C-succeeded-during-probe.patch
@@ -78,7 +78,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val)
  {
  	i2c_wrreg(sd, reg, val, 2);
-@@ -2064,6 +2081,7 @@ static int tc358743_probe(struct i2c_cli
+@@ -2065,6 +2082,7 @@ static int tc358743_probe(struct i2c_cli
  	struct tc358743_platform_data *pdata = client->dev.platform_data;
  	struct v4l2_subdev *sd;
  	u16 irq_mask = MASK_HDMI_MSK | MASK_CSI_MSK;
@@ -86,7 +86,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	int err;
  
  	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-@@ -2096,7 +2114,8 @@ static int tc358743_probe(struct i2c_cli
+@@ -2097,7 +2115,8 @@ static int tc358743_probe(struct i2c_cli
  	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
  
  	/* i2c access */
diff --git a/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch
index 20bab47514..25c23a8257 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0293-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
-@@ -2512,9 +2512,11 @@ int xhci_mem_init(struct xhci_hcd *xhci,
+@@ -2513,9 +2513,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)
-@@ -2527,7 +2529,7 @@ int xhci_mem_init(struct xhci_hcd *xhci,
+@@ -2528,7 +2530,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;
diff --git a/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch b/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch
index d968e93153..344e1ee37e 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch
@@ -198,7 +198,7 @@ Signed-off-by: Christoph Hellwig <hch at lst.de>
  		return 0;
 --- a/drivers/iommu/dma-iommu.c
 +++ b/drivers/iommu/dma-iommu.c
-@@ -404,8 +404,7 @@ static dma_addr_t iommu_dma_alloc_iova(s
+@@ -406,8 +406,7 @@ static dma_addr_t iommu_dma_alloc_iova(s
  	if (iova_len < (1 << (IOVA_RANGE_CACHE_MAX_SIZE - 1)))
  		iova_len = roundup_pow_of_two(iova_len);
  
diff --git a/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch b/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch
index 05fa9f8f2e..8e85d6e29f 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch
@@ -23,7 +23,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/spi/spi.c
 +++ b/drivers/spi/spi.c
-@@ -3116,6 +3116,7 @@ static int __spi_validate_bits_per_word(
+@@ -3117,6 +3117,7 @@ static int __spi_validate_bits_per_word(
   */
  int spi_setup(struct spi_device *spi)
  {
@@ -31,7 +31,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	unsigned	bad_bits, ugly_bits;
  	int		status;
  
-@@ -3133,6 +3134,14 @@ int spi_setup(struct spi_device *spi)
+@@ -3134,6 +3135,14 @@ int spi_setup(struct spi_device *spi)
  		(SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL |
  		 SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL)))
  		return -EINVAL;
diff --git a/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch b/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch
index b821afb08b..641d768890 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/spi/spi.c
 +++ b/drivers/spi/spi.c
-@@ -3128,8 +3128,8 @@ int spi_setup(struct spi_device *spi)
+@@ -3129,8 +3129,8 @@ int spi_setup(struct spi_device *spi)
  
  	if (ctlr->use_gpio_descriptors && ctlr->cs_gpiods &&
  	    ctlr->cs_gpiods[spi->chip_select] && !(spi->mode & SPI_CS_HIGH)) {
diff --git a/target/linux/bcm27xx/patches-5.4/950-0698-media-i2c-tc358743-Fix-fallthrough-warning.patch b/target/linux/bcm27xx/patches-5.4/950-0698-media-i2c-tc358743-Fix-fallthrough-warning.patch
index 26c1f95bf2..1a892b7d3c 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0698-media-i2c-tc358743-Fix-fallthrough-warning.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0698-media-i2c-tc358743-Fix-fallthrough-warning.patch
@@ -10,7 +10,7 @@ Signed-off-by: Jacko Dirks <jdirks.linuxdev at gmail.com>
 
 --- a/drivers/media/i2c/tc358743.c
 +++ b/drivers/media/i2c/tc358743.c
-@@ -2004,6 +2004,7 @@ static int tc358743_probe_of(struct tc35
+@@ -2005,6 +2005,7 @@ static int tc358743_probe_of(struct tc35
  	switch (bps_pr_lane) {
  	default:
  		dev_warn(dev, "untested bps per lane: %u bps\n", bps_pr_lane);
diff --git a/target/linux/bcm27xx/patches-5.4/950-0960-staging-fbtft-Add-support-for-display-variants.patch b/target/linux/bcm27xx/patches-5.4/950-0960-staging-fbtft-Add-support-for-display-variants.patch
index 185e8eb493..7206bad51d 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0960-staging-fbtft-Add-support-for-display-variants.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0960-staging-fbtft-Add-support-for-display-variants.patch
@@ -94,7 +94,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  #include <video/mipi_display.h>
  
  #include "fbtft.h"
-@@ -1200,6 +1201,7 @@ static struct fbtft_platform_data *fbtft
+@@ -1199,6 +1200,7 @@ static struct fbtft_platform_data *fbtft
   * @display: Display properties
   * @sdev: SPI device
   * @pdev: Platform device
@@ -102,7 +102,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
   *
   * Allocates, initializes and registers a framebuffer
   *
-@@ -1209,12 +1211,15 @@ static struct fbtft_platform_data *fbtft
+@@ -1208,12 +1210,15 @@ static struct fbtft_platform_data *fbtft
   */
  int fbtft_probe_common(struct fbtft_display *display,
  		       struct spi_device *sdev,
@@ -119,7 +119,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	int ret;
  
  	if (sdev)
-@@ -1230,6 +1235,14 @@ int fbtft_probe_common(struct fbtft_disp
+@@ -1229,6 +1234,14 @@ int fbtft_probe_common(struct fbtft_disp
  		pdata = fbtft_probe_dt(dev);
  		if (IS_ERR(pdata))
  			return PTR_ERR(pdata);
diff --git a/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch b/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch
index f57950b44a..5a9532c321 100644
--- a/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch
+++ b/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch
@@ -23,7 +23,7 @@ Signed-off-by: Axel Gembe <ago at bastart.eu.org>
  	.width			= 2,
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -79,6 +79,7 @@ static int parse_redboot_partitions(stru
+@@ -84,6 +84,7 @@ static int parse_redboot_partitions(stru
  	int nulllen = 0;
  	int numslots;
  	unsigned long offset;
@@ -31,7 +31,7 @@ Signed-off-by: Axel Gembe <ago at bastart.eu.org>
  #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
  	static char nullstring[] = "unallocated";
  #endif
-@@ -185,6 +186,16 @@ static int parse_redboot_partitions(stru
+@@ -190,6 +191,16 @@ static int parse_redboot_partitions(stru
  		goto out;
  	}
  
@@ -48,7 +48,7 @@ Signed-off-by: Axel Gembe <ago at bastart.eu.org>
  	for (i = 0; i < numslots; i++) {
  		struct fis_list *new_fl, **prev;
  
-@@ -205,10 +216,10 @@ static int parse_redboot_partitions(stru
+@@ -210,10 +221,10 @@ static int parse_redboot_partitions(stru
  			goto out;
  		}
  		new_fl->img = &buf[i];
diff --git a/target/linux/generic/hack-5.4/221-module_exports.patch b/target/linux/generic/hack-5.4/221-module_exports.patch
index ef6e980892..0f7840b8d8 100644
--- a/target/linux/generic/hack-5.4/221-module_exports.patch
+++ b/target/linux/generic/hack-5.4/221-module_exports.patch
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/scripts/Makefile.build
 +++ b/scripts/Makefile.build
-@@ -349,7 +349,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
+@@ -350,7 +350,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
  # Linker scripts preprocessor (.lds.S -> .lds)
  # ---------------------------------------------------------------------------
  quiet_cmd_cpp_lds_S = LDS     $@
diff --git a/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch
index 6d0a54c01d..cdeac45f86 100644
--- a/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch
+++ b/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/net/sch_generic.h
 +++ b/include/net/sch_generic.h
-@@ -603,12 +603,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
+@@ -615,12 +615,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
  extern struct Qdisc_ops pfifo_fast_ops;
  extern struct Qdisc_ops mq_qdisc_ops;
  extern struct Qdisc_ops noqueue_qdisc_ops;
diff --git a/target/linux/generic/pending-5.4/205-backtrace_module_info.patch b/target/linux/generic/pending-5.4/205-backtrace_module_info.patch
index 39a4365113..6048c25957 100644
--- a/target/linux/generic/pending-5.4/205-backtrace_module_info.patch
+++ b/target/linux/generic/pending-5.4/205-backtrace_module_info.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/lib/vsprintf.c
 +++ b/lib/vsprintf.c
-@@ -914,8 +914,10 @@ char *symbol_string(char *buf, char *end
+@@ -940,8 +940,10 @@ char *symbol_string(char *buf, char *end
  		    struct printf_spec spec, const char *fmt)
  {
  	unsigned long value;
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #endif
  
  	if (fmt[1] == 'R')
-@@ -932,8 +934,14 @@ char *symbol_string(char *buf, char *end
+@@ -958,8 +960,14 @@ char *symbol_string(char *buf, char *end
  
  	return string_nocheck(buf, end, sym, spec);
  #else
diff --git a/target/linux/generic/pending-5.4/419-mtd-redboot-add-of_match_table-with-DT-binding.patch b/target/linux/generic/pending-5.4/419-mtd-redboot-add-of_match_table-with-DT-binding.patch
index 8358a307cd..7692f484ae 100644
--- a/target/linux/generic/pending-5.4/419-mtd-redboot-add-of_match_table-with-DT-binding.patch
+++ b/target/linux/generic/pending-5.4/419-mtd-redboot-add-of_match_table-with-DT-binding.patch
@@ -12,7 +12,7 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
 
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -300,6 +300,7 @@ static int parse_redboot_partitions(stru
+@@ -305,6 +305,7 @@ static int parse_redboot_partitions(stru
  
  static const struct of_device_id mtd_parser_redboot_of_match_table[] = {
  	{ .compatible = "redboot-fis" },
diff --git a/target/linux/generic/pending-5.4/420-mtd-redboot_space.patch b/target/linux/generic/pending-5.4/420-mtd-redboot_space.patch
index a2cf838989..a3cd4ecf1f 100644
--- a/target/linux/generic/pending-5.4/420-mtd-redboot_space.patch
+++ b/target/linux/generic/pending-5.4/420-mtd-redboot_space.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -274,14 +274,21 @@ static int parse_redboot_partitions(stru
+@@ -279,14 +279,21 @@ static int parse_redboot_partitions(stru
  #endif
  		names += strlen(names)+1;
  
diff --git a/target/linux/layerscape/patches-5.4/303-core-0007-of-of_reserved_mem-Ensure-cma-reserved-region-not-cr.patch b/target/linux/layerscape/patches-5.4/303-core-0007-of-of_reserved_mem-Ensure-cma-reserved-region-not-cr.patch
index 7c385ea525..d95d1f0d53 100644
--- a/target/linux/layerscape/patches-5.4/303-core-0007-of-of_reserved_mem-Ensure-cma-reserved-region-not-cr.patch
+++ b/target/linux/layerscape/patches-5.4/303-core-0007-of-of_reserved_mem-Ensure-cma-reserved-region-not-cr.patch
@@ -70,7 +70,7 @@ Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel at mentor.com>
 +			ret = early_init_dt_alloc_reserved_memory_arch(node,
 +					size, align, start, end, nomap, &base);
  			if (ret == 0) {
- 				pr_debug("allocated memory for '%s' node: base %pa, size %ld MiB\n",
+ 				pr_debug("allocated memory for '%s' node: base %pa, size %lu MiB\n",
  					uname, &base,
 @@ -143,8 +162,8 @@ static int __init __reserved_mem_alloc_s
  		}
@@ -81,5 +81,5 @@ Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel at mentor.com>
 +		ret = early_init_dt_alloc_reserved_memory_arch(node,
 +					size, align, 0, 0, nomap, &base);
  		if (ret == 0)
- 			pr_debug("allocated memory for '%s' node: base %pa, size %ld MiB\n",
- 				uname, &base, (unsigned long)size / SZ_1M);
+ 			pr_debug("allocated memory for '%s' node: base %pa, size %lu MiB\n",
+ 				uname, &base, (unsigned long)(size / SZ_1M));
diff --git a/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch b/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch
index aff53595b0..8ce4380664 100644
--- a/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch
+++ b/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch
@@ -56,10 +56,10 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (ret) {
 -		DRM_DEV_ERROR(dp->dev, "Could not write to GRF: %d\n", ret);
 +		DRM_DEV_ERROR(dev, "Could not write to GRF: %d\n", ret);
+ 		clk_disable_unprepare(dp->grf_clk);
  		return ret;
  	}
- 
-@@ -82,24 +82,25 @@ static int cdn_dp_grf_write(struct cdn_d
+@@ -83,24 +83,25 @@ static int cdn_dp_grf_write(struct cdn_d
  
  static int cdn_dp_clk_enable(struct cdn_dp_device *dp)
  {
@@ -89,7 +89,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		goto err_pm_runtime_get;
  	}
  
-@@ -112,18 +113,18 @@ static int cdn_dp_clk_enable(struct cdn_
+@@ -113,18 +114,18 @@ static int cdn_dp_clk_enable(struct cdn_
  
  	rate = clk_get_rate(dp->core_clk);
  	if (!rate) {
@@ -112,7 +112,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  err_pm_runtime_get:
  	clk_disable_unprepare(dp->core_clk);
  err_core_clk:
-@@ -134,7 +135,7 @@ err_pclk:
+@@ -135,7 +136,7 @@ err_pclk:
  
  static void cdn_dp_clk_disable(struct cdn_dp_device *dp)
  {
@@ -121,7 +121,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	clk_disable_unprepare(dp->pclk);
  	clk_disable_unprepare(dp->core_clk);
  }
-@@ -167,7 +168,7 @@ static int cdn_dp_get_sink_count(struct
+@@ -168,7 +169,7 @@ static int cdn_dp_get_sink_count(struct
  	u8 value;
  
  	*sink_count = 0;
@@ -130,7 +130,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (ret)
  		return ret;
  
-@@ -191,12 +192,13 @@ static struct cdn_dp_port *cdn_dp_connec
+@@ -192,12 +193,13 @@ static struct cdn_dp_port *cdn_dp_connec
  
  static bool cdn_dp_check_sink_connection(struct cdn_dp_device *dp)
  {
@@ -145,7 +145,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		return false;
  	}
  
-@@ -218,7 +220,7 @@ static bool cdn_dp_check_sink_connection
+@@ -219,7 +221,7 @@ static bool cdn_dp_check_sink_connection
  		usleep_range(5000, 10000);
  	}
  
@@ -154,7 +154,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	return false;
  }
  
-@@ -260,7 +262,8 @@ static int cdn_dp_connector_get_modes(st
+@@ -261,7 +263,8 @@ static int cdn_dp_connector_get_modes(st
  	mutex_lock(&dp->lock);
  	edid = dp->edid;
  	if (edid) {
@@ -164,7 +164,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				  edid->width_cm, edid->height_cm);
  
  		dp->sink_has_audio = drm_detect_monitor_audio(edid);
-@@ -278,7 +281,8 @@ static int cdn_dp_connector_mode_valid(s
+@@ -279,7 +282,8 @@ static int cdn_dp_connector_mode_valid(s
  				       struct drm_display_mode *mode)
  {
  	struct cdn_dp_device *dp = connector_to_dp(connector);
@@ -174,7 +174,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	u32 requested, actual, rate, sink_max, source_max = 0;
  	u8 lanes, bpc;
  
-@@ -304,7 +308,7 @@ static int cdn_dp_connector_mode_valid(s
+@@ -305,7 +309,7 @@ static int cdn_dp_connector_mode_valid(s
  	sink_max = drm_dp_max_lane_count(dp->dpcd);
  	lanes = min(source_max, sink_max);
  
@@ -183,7 +183,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	sink_max = drm_dp_max_link_rate(dp->dpcd);
  	rate = min(source_max, sink_max);
  
-@@ -314,7 +318,7 @@ static int cdn_dp_connector_mode_valid(s
+@@ -315,7 +319,7 @@ static int cdn_dp_connector_mode_valid(s
  	actual = actual * 8 / 10;
  
  	if (requested > actual) {
@@ -192,7 +192,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				  "requested=%d, actual=%d, clock=%d\n",
  				  requested, actual, mode->clock);
  		return MODE_CLOCK_HIGH;
-@@ -334,28 +338,29 @@ static int cdn_dp_firmware_init(struct c
+@@ -335,28 +339,29 @@ static int cdn_dp_firmware_init(struct c
  	const u32 *iram_data, *dram_data;
  	const struct firmware *fw = dp->fw;
  	const struct cdn_firmware_header *hdr;
@@ -228,7 +228,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  }
  
  static int cdn_dp_get_sink_capability(struct cdn_dp_device *dp)
-@@ -365,28 +370,29 @@ static int cdn_dp_get_sink_capability(st
+@@ -366,28 +371,29 @@ static int cdn_dp_get_sink_capability(st
  	if (!cdn_dp_check_sink_connection(dp))
  		return -ENODEV;
  
@@ -264,7 +264,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				      ret);
  			goto err_phy;
  		}
-@@ -396,28 +402,28 @@ static int cdn_dp_enable_phy(struct cdn_
+@@ -397,28 +403,28 @@ static int cdn_dp_enable_phy(struct cdn_
  	ret = cdn_dp_grf_write(dp, GRF_SOC_CON26,
  			       DPTX_HPD_SEL_MASK | DPTX_HPD_SEL);
  	if (ret) {
@@ -299,7 +299,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  			      ret);
  		goto err_power_on;
  	}
-@@ -427,7 +433,7 @@ static int cdn_dp_enable_phy(struct cdn_
+@@ -428,7 +434,7 @@ static int cdn_dp_enable_phy(struct cdn_
  
  err_power_on:
  	if (phy_power_off(port->phy))
@@ -308,7 +308,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	else
  		port->phy_enabled = false;
  
-@@ -445,7 +451,8 @@ static int cdn_dp_disable_phy(struct cdn
+@@ -446,7 +452,8 @@ static int cdn_dp_disable_phy(struct cdn
  	if (port->phy_enabled) {
  		ret = phy_power_off(port->phy);
  		if (ret) {
@@ -318,7 +318,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  			return ret;
  		}
  	}
-@@ -469,16 +476,16 @@ static int cdn_dp_disable(struct cdn_dp_
+@@ -470,16 +477,16 @@ static int cdn_dp_disable(struct cdn_dp_
  	ret = cdn_dp_grf_write(dp, GRF_SOC_CON26,
  			       DPTX_HPD_SEL_MASK | DPTX_HPD_DEL);
  	if (ret) {
@@ -339,7 +339,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (!dp->connected) {
  		kfree(dp->edid);
  		dp->edid = NULL;
-@@ -491,11 +498,11 @@ static int cdn_dp_enable(struct cdn_dp_d
+@@ -492,11 +499,11 @@ static int cdn_dp_enable(struct cdn_dp_d
  {
  	int ret, i, lanes;
  	struct cdn_dp_port *port;
@@ -353,7 +353,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		return -ENODEV;
  	}
  
-@@ -508,7 +515,7 @@ static int cdn_dp_enable(struct cdn_dp_d
+@@ -509,7 +516,7 @@ static int cdn_dp_enable(struct cdn_dp_d
  
  	ret = cdn_dp_firmware_init(dp);
  	if (ret) {
@@ -362,7 +362,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		goto err_clk_disable;
  	}
  
-@@ -542,8 +549,9 @@ static void cdn_dp_encoder_mode_set(stru
+@@ -543,8 +550,9 @@ static void cdn_dp_encoder_mode_set(stru
  				    struct drm_display_mode *adjusted)
  {
  	struct cdn_dp_device *dp = encoder_to_dp(encoder);
@@ -374,7 +374,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	switch (display_info->bpc) {
  	case 10:
-@@ -561,7 +569,7 @@ static void cdn_dp_encoder_mode_set(stru
+@@ -562,7 +570,7 @@ static void cdn_dp_encoder_mode_set(stru
  	video->v_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NVSYNC);
  	video->h_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NHSYNC);
  
@@ -383,7 +383,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  }
  
  static bool cdn_dp_check_link_status(struct cdn_dp_device *dp)
-@@ -570,11 +578,11 @@ static bool cdn_dp_check_link_status(str
+@@ -571,11 +579,11 @@ static bool cdn_dp_check_link_status(str
  	struct cdn_dp_port *port = cdn_dp_connected_port(dp);
  	u8 sink_lanes = drm_dp_max_lane_count(dp->dpcd);
  
@@ -398,7 +398,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		DRM_ERROR("Failed to get link status\n");
  		return false;
  	}
-@@ -586,15 +594,16 @@ static bool cdn_dp_check_link_status(str
+@@ -587,15 +595,16 @@ static bool cdn_dp_check_link_status(str
  static void cdn_dp_encoder_enable(struct drm_encoder *encoder)
  {
  	struct cdn_dp_device *dp = encoder_to_dp(encoder);
@@ -418,7 +418,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  			  (ret) ? "LIT" : "BIG");
  	if (ret)
  		val = DP_SEL_VOP_LIT | (DP_SEL_VOP_LIT << 16);
-@@ -609,33 +618,33 @@ static void cdn_dp_encoder_enable(struct
+@@ -610,33 +619,33 @@ static void cdn_dp_encoder_enable(struct
  
  	ret = cdn_dp_enable(dp);
  	if (ret) {
@@ -461,7 +461,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		goto out;
  	}
  out:
-@@ -651,7 +660,8 @@ static void cdn_dp_encoder_disable(struc
+@@ -652,7 +661,8 @@ static void cdn_dp_encoder_disable(struc
  	if (dp->active) {
  		ret = cdn_dp_disable(dp);
  		if (ret) {
@@ -471,7 +471,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				      ret);
  		}
  	}
-@@ -695,7 +705,7 @@ static const struct drm_encoder_funcs cd
+@@ -696,7 +706,7 @@ static const struct drm_encoder_funcs cd
  
  static int cdn_dp_parse_dt(struct cdn_dp_device *dp)
  {
@@ -480,7 +480,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	struct device_node *np = dev->of_node;
  	struct platform_device *pdev = to_platform_device(dev);
  	struct resource *res;
-@@ -707,10 +717,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
+@@ -708,10 +718,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
  	}
  
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -494,7 +494,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	}
  
  	dp->core_clk = devm_clk_get(dev, "core-clk");
-@@ -725,10 +735,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
+@@ -726,10 +736,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
  		return PTR_ERR(dp->pclk);
  	}
  
@@ -508,7 +508,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	}
  
  	dp->grf_clk = devm_clk_get(dev, "grf");
-@@ -737,10 +747,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
+@@ -738,10 +748,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
  		return PTR_ERR(dp->grf_clk);
  	}
  
@@ -522,7 +522,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	}
  
  	dp->dptx_rst = devm_reset_control_get(dev, "dptx");
-@@ -795,7 +805,7 @@ static int cdn_dp_audio_hw_params(struct
+@@ -796,7 +806,7 @@ static int cdn_dp_audio_hw_params(struct
  		goto out;
  	}
  
@@ -531,7 +531,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (!ret)
  		dp->audio_info = audio;
  
-@@ -813,7 +823,7 @@ static void cdn_dp_audio_shutdown(struct
+@@ -814,7 +824,7 @@ static void cdn_dp_audio_shutdown(struct
  	if (!dp->active)
  		goto out;
  
@@ -540,7 +540,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (!ret)
  		dp->audio_info.format = AFMT_UNUSED;
  out:
-@@ -832,7 +842,7 @@ static int cdn_dp_audio_digital_mute(str
+@@ -833,7 +843,7 @@ static int cdn_dp_audio_digital_mute(str
  		goto out;
  	}
  
@@ -549,7 +549,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  out:
  	mutex_unlock(&dp->lock);
-@@ -844,7 +854,8 @@ static int cdn_dp_audio_get_eld(struct d
+@@ -845,7 +855,8 @@ static int cdn_dp_audio_get_eld(struct d
  {
  	struct cdn_dp_device *dp = dev_get_drvdata(dev);
  
@@ -559,7 +559,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	return 0;
  }
-@@ -878,6 +889,7 @@ static int cdn_dp_request_firmware(struc
+@@ -879,6 +890,7 @@ static int cdn_dp_request_firmware(struc
  	int ret;
  	unsigned long timeout = jiffies + msecs_to_jiffies(CDN_FW_TIMEOUT_MS);
  	unsigned long sleep = 1000;
@@ -567,7 +567,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	WARN_ON(!mutex_is_locked(&dp->lock));
  
-@@ -888,13 +900,13 @@ static int cdn_dp_request_firmware(struc
+@@ -889,13 +901,13 @@ static int cdn_dp_request_firmware(struc
  	mutex_unlock(&dp->lock);
  
  	while (time_before(jiffies, timeout)) {
@@ -583,7 +583,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				      "failed to request firmware: %d\n", ret);
  			goto out;
  		}
-@@ -904,7 +916,7 @@ static int cdn_dp_request_firmware(struc
+@@ -905,7 +917,7 @@ static int cdn_dp_request_firmware(struc
  		goto out;
  	}
  
@@ -592,7 +592,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	ret = -ETIMEDOUT;
  out:
  	mutex_lock(&dp->lock);
-@@ -915,8 +927,9 @@ static void cdn_dp_pd_event_work(struct
+@@ -916,8 +928,9 @@ static void cdn_dp_pd_event_work(struct
  {
  	struct cdn_dp_device *dp = container_of(work, struct cdn_dp_device,
  						event_work);
@@ -603,7 +603,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	int ret;
  
-@@ -933,44 +946,45 @@ static void cdn_dp_pd_event_work(struct
+@@ -934,44 +947,45 @@ static void cdn_dp_pd_event_work(struct
  
  	/* Not connected, notify userspace to disable the block */
  	if (!cdn_dp_connected_port(dp)) {
@@ -662,7 +662,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  					      "Failed to config video %d\n",
  					      ret);
  			}
-@@ -1039,7 +1053,7 @@ static int cdn_dp_bind(struct device *de
+@@ -1040,7 +1054,7 @@ static int cdn_dp_bind(struct device *de
  
  	drm_encoder_helper_add(encoder, &cdn_dp_encoder_helper_funcs);
  
@@ -671,7 +671,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	connector->polled = DRM_CONNECTOR_POLL_HPD;
  	connector->dpms = DRM_MODE_DPMS_OFF;
  
-@@ -1063,7 +1077,7 @@ static int cdn_dp_bind(struct device *de
+@@ -1064,7 +1078,7 @@ static int cdn_dp_bind(struct device *de
  		port = dp->port[i];
  
  		port->event_nb.notifier_call = cdn_dp_pd_event;
@@ -680,7 +680,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  						    EXTCON_DISP_DP,
  						    &port->event_nb);
  		if (ret) {
-@@ -1090,7 +1104,7 @@ static void cdn_dp_unbind(struct device
+@@ -1091,7 +1105,7 @@ static void cdn_dp_unbind(struct device
  {
  	struct cdn_dp_device *dp = dev_get_drvdata(dev);
  	struct drm_encoder *encoder = &dp->encoder;
@@ -689,7 +689,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	cancel_work_sync(&dp->event_work);
  	cdn_dp_encoder_disable(encoder);
-@@ -1150,7 +1164,7 @@ static int cdn_dp_probe(struct platform_
+@@ -1151,7 +1165,7 @@ static int cdn_dp_probe(struct platform_
  	dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
  	if (!dp)
  		return -ENOMEM;
@@ -698,7 +698,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	match = of_match_node(cdn_dp_dt_ids, pdev->dev.of_node);
  	dp_data = (struct cdn_dp_data *)match->data;
-@@ -1195,7 +1209,7 @@ static int cdn_dp_remove(struct platform
+@@ -1196,7 +1210,7 @@ static int cdn_dp_remove(struct platform
  	struct cdn_dp_device *dp = platform_get_drvdata(pdev);
  
  	platform_device_unregister(dp->audio_pdev);
@@ -707,7 +707,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	component_del(&pdev->dev, &cdn_dp_component_ops);
  
  	return 0;
-@@ -1205,7 +1219,7 @@ static void cdn_dp_shutdown(struct platf
+@@ -1206,7 +1220,7 @@ static void cdn_dp_shutdown(struct platf
  {
  	struct cdn_dp_device *dp = platform_get_drvdata(pdev);
  
diff --git a/target/linux/layerscape/patches-5.4/805-display-0003-drm-bridge-add-Cadence-MHDP-HDMI-DP-API.patch b/target/linux/layerscape/patches-5.4/805-display-0003-drm-bridge-add-Cadence-MHDP-HDMI-DP-API.patch
index 19e762618a..14089a7b36 100644
--- a/target/linux/layerscape/patches-5.4/805-display-0003-drm-bridge-add-Cadence-MHDP-HDMI-DP-API.patch
+++ b/target/linux/layerscape/patches-5.4/805-display-0003-drm-bridge-add-Cadence-MHDP-HDMI-DP-API.patch
@@ -1794,7 +1794,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  #define encoder_to_dp(c) \
  		container_of(c, struct cdn_dp_device, encoder)
-@@ -282,7 +282,7 @@ static int cdn_dp_connector_mode_valid(s
+@@ -283,7 +283,7 @@ static int cdn_dp_connector_mode_valid(s
  {
  	struct cdn_dp_device *dp = connector_to_dp(connector);
  	struct drm_display_info *display_info =
@@ -1803,7 +1803,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	u32 requested, actual, rate, sink_max, source_max = 0;
  	u8 lanes, bpc;
  
-@@ -378,7 +378,7 @@ static int cdn_dp_get_sink_capability(st
+@@ -379,7 +379,7 @@ static int cdn_dp_get_sink_capability(st
  	}
  
  	kfree(dp->edid);
@@ -1812,7 +1812,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				   cdns_mhdp_get_edid_block, &dp->mhdp);
  	return 0;
  }
-@@ -484,8 +484,8 @@ static int cdn_dp_disable(struct cdn_dp_
+@@ -485,8 +485,8 @@ static int cdn_dp_disable(struct cdn_dp_
  	cdns_mhdp_set_firmware_active(&dp->mhdp, false);
  	cdn_dp_clk_disable(dp);
  	dp->active = false;
@@ -1823,7 +1823,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (!dp->connected) {
  		kfree(dp->edid);
  		dp->edid = NULL;
-@@ -550,7 +550,7 @@ static void cdn_dp_encoder_mode_set(stru
+@@ -551,7 +551,7 @@ static void cdn_dp_encoder_mode_set(stru
  {
  	struct cdn_dp_device *dp = encoder_to_dp(encoder);
  	struct drm_display_info *display_info =
@@ -1832,7 +1832,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	struct video_info *video = &dp->mhdp.video_info;
  
  	switch (display_info->bpc) {
-@@ -578,7 +578,7 @@ static bool cdn_dp_check_link_status(str
+@@ -579,7 +579,7 @@ static bool cdn_dp_check_link_status(str
  	struct cdn_dp_port *port = cdn_dp_connected_port(dp);
  	u8 sink_lanes = drm_dp_max_lane_count(dp->dpcd);
  
@@ -1841,7 +1841,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		return false;
  
  	if (cdns_mhdp_dpcd_read(&dp->mhdp, DP_LANE0_1_STATUS, link_status,
-@@ -807,7 +807,7 @@ static int cdn_dp_audio_hw_params(struct
+@@ -808,7 +808,7 @@ static int cdn_dp_audio_hw_params(struct
  
  	ret = cdns_mhdp_audio_config(&dp->mhdp, &audio);
  	if (!ret)
@@ -1850,7 +1850,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  out:
  	mutex_unlock(&dp->lock);
-@@ -823,9 +823,9 @@ static void cdn_dp_audio_shutdown(struct
+@@ -824,9 +824,9 @@ static void cdn_dp_audio_shutdown(struct
  	if (!dp->active)
  		goto out;
  
@@ -1862,7 +1862,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  out:
  	mutex_unlock(&dp->lock);
  }
-@@ -854,8 +854,8 @@ static int cdn_dp_audio_get_eld(struct d
+@@ -855,8 +855,8 @@ static int cdn_dp_audio_get_eld(struct d
  {
  	struct cdn_dp_device *dp = dev_get_drvdata(dev);
  
@@ -1873,7 +1873,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	return 0;
  }
-@@ -877,11 +877,11 @@ static int cdn_dp_audio_codec_init(struc
+@@ -878,11 +878,11 @@ static int cdn_dp_audio_codec_init(struc
  		.max_i2s_channels = 8,
  	};
  
@@ -1889,7 +1889,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  }
  
  static int cdn_dp_request_firmware(struct cdn_dp_device *dp)
-@@ -927,7 +927,7 @@ static void cdn_dp_pd_event_work(struct
+@@ -928,7 +928,7 @@ static void cdn_dp_pd_event_work(struct
  {
  	struct cdn_dp_device *dp = container_of(work, struct cdn_dp_device,
  						event_work);
@@ -1898,7 +1898,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	enum drm_connector_status old_status;
  	struct device *dev = dp->mhdp.dev;
  
-@@ -965,8 +965,8 @@ static void cdn_dp_pd_event_work(struct
+@@ -966,8 +966,8 @@ static void cdn_dp_pd_event_work(struct
  
  	/* Enabled and connected with a sink, re-train if requested */
  	} else if (!cdn_dp_check_link_status(dp)) {
@@ -1909,7 +1909,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		struct drm_display_mode *mode = &dp->mhdp.mode;
  
  		DRM_DEV_INFO(dev, "Connected with sink. Re-train link\n");
-@@ -979,8 +979,8 @@ static void cdn_dp_pd_event_work(struct
+@@ -980,8 +980,8 @@ static void cdn_dp_pd_event_work(struct
  
  		/* If training result is changed, update the video config */
  		if (mode->clock &&
@@ -1920,7 +1920,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  			ret = cdns_mhdp_config_video(&dp->mhdp);
  			if (ret) {
  				dp->connected = false;
-@@ -1053,7 +1053,7 @@ static int cdn_dp_bind(struct device *de
+@@ -1054,7 +1054,7 @@ static int cdn_dp_bind(struct device *de
  
  	drm_encoder_helper_add(encoder, &cdn_dp_encoder_helper_funcs);
  
@@ -1929,7 +1929,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	connector->polled = DRM_CONNECTOR_POLL_HPD;
  	connector->dpms = DRM_MODE_DPMS_OFF;
  
-@@ -1104,7 +1104,7 @@ static void cdn_dp_unbind(struct device
+@@ -1105,7 +1105,7 @@ static void cdn_dp_unbind(struct device
  {
  	struct cdn_dp_device *dp = dev_get_drvdata(dev);
  	struct drm_encoder *encoder = &dp->encoder;
@@ -1938,7 +1938,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	cancel_work_sync(&dp->event_work);
  	cdn_dp_encoder_disable(encoder);
-@@ -1208,7 +1208,7 @@ static int cdn_dp_remove(struct platform
+@@ -1209,7 +1209,7 @@ static int cdn_dp_remove(struct platform
  {
  	struct cdn_dp_device *dp = platform_get_drvdata(pdev);
  
diff --git a/target/linux/layerscape/patches-5.4/805-display-0009-drm-rockchip-Fix-build-failed-issue.patch b/target/linux/layerscape/patches-5.4/805-display-0009-drm-rockchip-Fix-build-failed-issue.patch
index 106c1f7285..6f44ce2219 100644
--- a/target/linux/layerscape/patches-5.4/805-display-0009-drm-rockchip-Fix-build-failed-issue.patch
+++ b/target/linux/layerscape/patches-5.4/805-display-0009-drm-rockchip-Fix-build-failed-issue.patch
@@ -13,7 +13,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
 
 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
 +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
-@@ -797,7 +797,7 @@ static int cdn_dp_audio_hw_params(struct
+@@ -798,7 +798,7 @@ static int cdn_dp_audio_hw_params(struct
  		audio.format = AFMT_I2S;
  		break;
  	case HDMI_SPDIF:
diff --git a/target/linux/layerscape/patches-5.4/805-display-0012-drm-rockchip-change-base-address-name-from-regs-to-r.patch b/target/linux/layerscape/patches-5.4/805-display-0012-drm-rockchip-change-base-address-name-from-regs-to-r.patch
index 2ba999050d..bb87fbcfbd 100644
--- a/target/linux/layerscape/patches-5.4/805-display-0012-drm-rockchip-change-base-address-name-from-regs-to-r.patch
+++ b/target/linux/layerscape/patches-5.4/805-display-0012-drm-rockchip-change-base-address-name-from-regs-to-r.patch
@@ -13,7 +13,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
 
 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
 +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
-@@ -717,10 +717,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
+@@ -718,10 +718,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
  	}
  
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
diff --git a/target/linux/layerscape/patches-5.4/805-display-0018-drm-bridge-cdns-dp-Remove-link-rate-lanes-set-by-dev.patch b/target/linux/layerscape/patches-5.4/805-display-0018-drm-bridge-cdns-dp-Remove-link-rate-lanes-set-by-dev.patch
index 58df9b98aa..fba2ac4f02 100644
--- a/target/linux/layerscape/patches-5.4/805-display-0018-drm-bridge-cdns-dp-Remove-link-rate-lanes-set-by-dev.patch
+++ b/target/linux/layerscape/patches-5.4/805-display-0018-drm-bridge-cdns-dp-Remove-link-rate-lanes-set-by-dev.patch
@@ -142,7 +142,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	msg[4] = PTS1 | PTS2 | PTS3 | PTS4;
 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
 +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
-@@ -305,12 +305,10 @@ static int cdn_dp_connector_mode_valid(s
+@@ -306,12 +306,10 @@ static int cdn_dp_connector_mode_valid(s
  	requested = mode->clock * bpc * 3 / 1000;
  
  	source_max = dp->lanes;
@@ -157,7 +157,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	actual = rate * lanes / 100;
  
-@@ -365,21 +363,25 @@ static int cdn_dp_firmware_init(struct c
+@@ -366,21 +364,25 @@ static int cdn_dp_firmware_init(struct c
  
  static int cdn_dp_get_sink_capability(struct cdn_dp_device *dp)
  {
@@ -188,7 +188,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	return 0;
  }
  
-@@ -421,7 +423,8 @@ static int cdn_dp_enable_phy(struct cdn_
+@@ -422,7 +424,8 @@ static int cdn_dp_enable_phy(struct cdn_
  	}
  
  	port->lanes = cdn_dp_get_port_lanes(port);
@@ -198,7 +198,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (ret) {
  		DRM_DEV_ERROR(dev, "set host capabilities failed: %d\n",
  			      ret);
-@@ -576,9 +579,9 @@ static bool cdn_dp_check_link_status(str
+@@ -577,9 +580,9 @@ static bool cdn_dp_check_link_status(str
  {
  	u8 link_status[DP_LINK_STATUS_SIZE];
  	struct cdn_dp_port *port = cdn_dp_connected_port(dp);
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch b/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch
index 3357acc76d..7c9a153aec 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch
@@ -109,7 +109,7 @@ Reviewed-by: Jun Li <jun.li at nxp.com>
  	usb_phy_set_suspend(dwc->usb2_phy, 0);
  	usb_phy_set_suspend(dwc->usb3_phy, 0);
  	ret = phy_power_on(dwc->usb2_generic_phy);
-@@ -1931,12 +1983,9 @@ static const struct dev_pm_ops dwc3_dev_
+@@ -1932,12 +1984,9 @@ static const struct dev_pm_ops dwc3_dev_
  
  #ifdef CONFIG_OF
  static const struct of_device_id of_dwc3_match[] = {
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch b/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch
index 4bc9f4d465..9a3d3f4a17 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch
@@ -81,7 +81,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  	usb_phy_set_suspend(dwc->usb2_phy, 0);
  	usb_phy_set_suspend(dwc->usb3_phy, 0);
  	ret = phy_power_on(dwc->usb2_generic_phy);
-@@ -1983,9 +1931,12 @@ static const struct dev_pm_ops dwc3_dev_
+@@ -1984,9 +1932,12 @@ static const struct dev_pm_ops dwc3_dev_
  
  #ifdef CONFIG_OF
  static const struct of_device_id of_dwc3_match[] = {
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch b/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch
index 9c5818c268..f9de7035aa 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch
@@ -108,7 +108,7 @@ Reviewed-by: Jun Li <jun.li at nxp.com>
  	usb_phy_set_suspend(dwc->usb2_phy, 0);
  	usb_phy_set_suspend(dwc->usb3_phy, 0);
  	ret = phy_power_on(dwc->usb2_generic_phy);
-@@ -1931,12 +1982,16 @@ static const struct dev_pm_ops dwc3_dev_
+@@ -1932,12 +1983,16 @@ static const struct dev_pm_ops dwc3_dev_
  
  #ifdef CONFIG_OF
  static const struct of_device_id of_dwc3_match[] = {
diff --git a/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch
index 92383f51b4..12844c860f 100644
--- a/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch
+++ b/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch
@@ -19,7 +19,7 @@
  	},
  	[PORT_NPCM] = {
  		.name		= "Nuvoton 16550",
-@@ -2578,6 +2578,11 @@ serial8250_do_set_termios(struct uart_po
+@@ -2591,6 +2591,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.4/1021-ubnt-ledbar-driver.patch b/target/linux/mediatek/patches-5.4/1021-ubnt-ledbar-driver.patch
index c971b9b4ca..41ab094e9f 100644
--- a/target/linux/mediatek/patches-5.4/1021-ubnt-ledbar-driver.patch
+++ b/target/linux/mediatek/patches-5.4/1021-ubnt-ledbar-driver.patch
@@ -1,6 +1,6 @@
 --- a/drivers/leds/Kconfig
 +++ b/drivers/leds/Kconfig
-@@ -823,6 +823,16 @@ config LEDS_LM36274
+@@ -824,6 +824,16 @@ config LEDS_LM36274
  	  Say Y to enable the LM36274 LED driver for TI LMU devices.
  	  This supports the LED device LM36274.
  


From lede-commits at lists.infradead.org  Sat Jul 17 10:13:03 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 13:13:03 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.4 to 5.4.129
In-Reply-To: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
References: <162654198334.349.8848507641242098852@git-01.infra.openwrt.org>
Message-ID: <mailman.8298.1626541999.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f529c8463f82266538b19e9ad888ee9d6de412c1

commit f529c8463f82266538b19e9ad888ee9d6de412c1
Author: John Audia <graysky at archlinux.us>
AuthorDate: Wed Jun 30 16:57:44 2021 -0400

    kernel: bump 5.4 to 5.4.129
    
    All patches automatically rebased.
    
    Build system: x86_64
    Build-tested: ipq806x/R7800
    Run-tested: ipq806x/R7800
    
    No dmesg regressions, everything functional
    
    Signed-off-by: John Audia <graysky at archlinux.us>
---
 include/kernel-version.mk                                           | 4 ++--
 .../patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch | 4 ++--
 target/linux/generic/hack-5.4/204-module_strip.patch                | 6 +++---
 target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch    | 2 +-
 target/linux/generic/pending-5.4/630-packet_socket_type.patch       | 4 ++--
 target/linux/generic/pending-5.4/920-mangle_bootargs.patch          | 2 +-
 ...-0003-MLK-21960-1-spi-fspi-enable-fspi-on-imx8qxp-and-imx8.patch | 2 +-
 ...spi-0004-MLK-21960-2-spi-fspi-dynamically-alloc-AHB-memory.patch | 4 ++--
 8 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index daa1a5efa8..b0611454b1 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .128
+LINUX_VERSION-5.4 = .129
 LINUX_VERSION-5.10 = .46
 
-LINUX_KERNEL_HASH-5.4.128 = 3b54aebb816b9e628cb9ba3055a6aca58ce0ddeec49366c0da86ced9a7be39ab
+LINUX_KERNEL_HASH-5.4.129 = 4426462413d174909a1d9938ce420b8b3cb219140d164270ccabd282fa2346df
 LINUX_KERNEL_HASH-5.10.46 = 569122a39c6b325befb9ac1c07da0c53e6363b3baacd82081d131b06c1dc1415
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
diff --git a/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch b/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch
index 4e9598a54e..e3cf7bb9e1 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch
@@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
 
 --- a/arch/arm/kernel/setup.c
 +++ b/arch/arm/kernel/setup.c
-@@ -1249,6 +1249,8 @@ static int c_show(struct seq_file *m, vo
+@@ -1251,6 +1251,8 @@ static int c_show(struct seq_file *m, vo
  {
  	int i, j;
  	u32 cpuid;
@@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
  
  	for_each_online_cpu(i) {
  		/*
-@@ -1308,6 +1310,14 @@ static int c_show(struct seq_file *m, vo
+@@ -1310,6 +1312,14 @@ static int c_show(struct seq_file *m, vo
  	seq_printf(m, "Revision\t: %04x\n", system_rev);
  	seq_printf(m, "Serial\t\t: %s\n", system_serial);
  
diff --git a/target/linux/generic/hack-5.4/204-module_strip.patch b/target/linux/generic/hack-5.4/204-module_strip.patch
index 22bb1ac33a..c6420739c0 100644
--- a/target/linux/generic/hack-5.4/204-module_strip.patch
+++ b/target/linux/generic/hack-5.4/204-module_strip.patch
@@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -2195,6 +2195,13 @@ config TRIM_UNUSED_KSYMS
+@@ -2198,6 +2198,13 @@ config TRIM_UNUSED_KSYMS
  
  	  If unsure, or if you need to build out-of-tree modules, say N.
  
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  config MODULES_TREE_LOOKUP
 --- a/kernel/module.c
 +++ b/kernel/module.c
-@@ -3252,9 +3252,11 @@ static int setup_load_info(struct load_i
+@@ -3256,9 +3256,11 @@ static int setup_load_info(struct load_i
  
  static int check_modinfo(struct module *mod, struct load_info *info, int flags)
  {
@@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (flags & MODULE_INIT_IGNORE_VERMAGIC)
  		modmagic = NULL;
  
-@@ -3275,6 +3277,7 @@ static int check_modinfo(struct module *
+@@ -3279,6 +3281,7 @@ static int check_modinfo(struct module *
  				mod->name);
  		add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
  	}
diff --git a/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch b/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch
index c4c13b9695..68a2d4d88f 100644
--- a/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch
+++ b/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -1277,6 +1277,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
+@@ -1280,6 +1280,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
  	  the unaligned access emulation.
  	  see arch/parisc/kernel/unaligned.c for reference
  
diff --git a/target/linux/generic/pending-5.4/630-packet_socket_type.patch b/target/linux/generic/pending-5.4/630-packet_socket_type.patch
index a137fb5a6d..d9bfda1303 100644
--- a/target/linux/generic/pending-5.4/630-packet_socket_type.patch
+++ b/target/linux/generic/pending-5.4/630-packet_socket_type.patch
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3922,6 +3925,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3924,6 +3927,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3978,6 +3991,13 @@ static int packet_getsockopt(struct sock
+@@ -3980,6 +3993,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;
diff --git a/target/linux/generic/pending-5.4/920-mangle_bootargs.patch b/target/linux/generic/pending-5.4/920-mangle_bootargs.patch
index 7523b396ba..83db92609b 100644
--- a/target/linux/generic/pending-5.4/920-mangle_bootargs.patch
+++ b/target/linux/generic/pending-5.4/920-mangle_bootargs.patch
@@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz <kaloz at openwrt.org>
 
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -1662,6 +1662,15 @@ config EMBEDDED
+@@ -1665,6 +1665,15 @@ config EMBEDDED
  	  an embedded system so certain expert options are available
  	  for configuration.
  
diff --git a/target/linux/layerscape/patches-5.4/817-spi-0003-MLK-21960-1-spi-fspi-enable-fspi-on-imx8qxp-and-imx8.patch b/target/linux/layerscape/patches-5.4/817-spi-0003-MLK-21960-1-spi-fspi-enable-fspi-on-imx8qxp-and-imx8.patch
index 07fac213ce..02562b7587 100644
--- a/target/linux/layerscape/patches-5.4/817-spi-0003-MLK-21960-1-spi-fspi-enable-fspi-on-imx8qxp-and-imx8.patch
+++ b/target/linux/layerscape/patches-5.4/817-spi-0003-MLK-21960-1-spi-fspi-enable-fspi-on-imx8qxp-and-imx8.patch
@@ -35,7 +35,7 @@ Signed-off-by: Han Xu <han.xu at nxp.com>
  struct nxp_fspi {
  	void __iomem *iobase;
  	void __iomem *ahb_addr;
-@@ -1083,6 +1099,8 @@ static int nxp_fspi_resume(struct device
+@@ -1082,6 +1098,8 @@ static int nxp_fspi_resume(struct device
  
  static const struct of_device_id nxp_fspi_dt_ids[] = {
  	{ .compatible = "nxp,lx2160a-fspi", .data = (void *)&lx2160a_data, },
diff --git a/target/linux/layerscape/patches-5.4/817-spi-0004-MLK-21960-2-spi-fspi-dynamically-alloc-AHB-memory.patch b/target/linux/layerscape/patches-5.4/817-spi-0004-MLK-21960-2-spi-fspi-dynamically-alloc-AHB-memory.patch
index a8db23cebb..534c014a2b 100644
--- a/target/linux/layerscape/patches-5.4/817-spi-0004-MLK-21960-2-spi-fspi-dynamically-alloc-AHB-memory.patch
+++ b/target/linux/layerscape/patches-5.4/817-spi-0004-MLK-21960-2-spi-fspi-dynamically-alloc-AHB-memory.patch
@@ -76,7 +76,7 @@ Signed-off-by: Han Xu <han.xu at nxp.com>
  	} else {
  		if (op->data.nbytes && op->data.dir == SPI_MEM_DATA_OUT)
  			nxp_fspi_fill_txfifo(f, op);
-@@ -999,9 +1025,8 @@ static int nxp_fspi_probe(struct platfor
+@@ -993,9 +1019,8 @@ static int nxp_fspi_probe(struct platfor
  
  	/* find the resources - controller memory mapped space */
  	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fspi_mmap");
@@ -88,7 +88,7 @@ Signed-off-by: Han Xu <han.xu at nxp.com>
  		goto err_put_ctrl;
  	}
  
-@@ -1080,6 +1105,9 @@ static int nxp_fspi_remove(struct platfo
+@@ -1079,6 +1104,9 @@ static int nxp_fspi_remove(struct platfo
  
  	mutex_destroy(&f->lock);
  


From lede-commits at lists.infradead.org  Sat Jul 17 11:06:56 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 14:06:56 -0400
Subject: [openwrt/openwrt]  ipq40xx: fix FRITZRepeater 1200 RGMII delay
In-Reply-To: <162654521675.23297.17575481858341511097@git-01.infra.openwrt.org>
References: <162654521675.23297.17575481858341511097@git-01.infra.openwrt.org>
Message-ID: <mailman.8299.1626545221.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f9d18281051c894eacd40f10c10b430c6c9082ad

commit f9d18281051c894eacd40f10c10b430c6c9082ad
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Sat Jul 17 20:04:29 2021 +0200

    ipq40xx: fix FRITZRepeater 1200 RGMII delay
    
    When the AVM FRITZ!Repeater 1200 was introduced on Kernel 4.19, the
    at803x PHY driver incorrectly set up the delays, not disabling delays
    set by the bootloader.
    
    The PHY was always operating with RX as well as TX delays enabled, but
    with kernel 5.4 and later, the required TX delay is disabled, breaking
    ethernet operation.
    
    Correct the PHY mode, so the driver enables both delays.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts
index fd6c5d9aa0..2d20d5928a 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts
@@ -68,7 +68,7 @@
 
 		edma at c080000 {
 			status = "okay";
-			phy-mode = "rgmii-rxid";
+			phy-mode = "rgmii-id";
 			qcom,num_gmac = <1>;
 			qcom,single-phy;
 		};


From lede-commits at lists.infradead.org  Sat Jul 17 11:07:30 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 14:07:30 -0400
Subject: [openwrt/openwrt]  ipq40xx: fix FRITZRepeater 1200 RGMII delay
In-Reply-To: <162654525045.23694.2626054367968709729@git-01.infra.openwrt.org>
References: <162654525045.23694.2626054367968709729@git-01.infra.openwrt.org>
Message-ID: <mailman.8300.1626545256.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/df4feb165591fca2c8c16601f31896189af9f636

commit df4feb165591fca2c8c16601f31896189af9f636
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Sat Jul 17 20:04:29 2021 +0200

    ipq40xx: fix FRITZRepeater 1200 RGMII delay
    
    When the AVM FRITZ!Repeater 1200 was introduced on Kernel 4.19, the
    at803x PHY driver incorrectly set up the delays, not disabling delays
    set by the bootloader.
    
    The PHY was always operating with RX as well as TX delays enabled, but
    with kernel 5.4 and later, the required TX delay is disabled, breaking
    ethernet operation.
    
    Correct the PHY mode, so the driver enables both delays.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
    (cherry picked from commit f9d18281051c894eacd40f10c10b430c6c9082ad)
---
 .../ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts
index fd6c5d9aa0..2d20d5928a 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts
@@ -68,7 +68,7 @@
 
 		edma at c080000 {
 			status = "okay";
-			phy-mode = "rgmii-rxid";
+			phy-mode = "rgmii-id";
 			qcom,num_gmac = <1>;
 			qcom,single-phy;
 		};


From lede-commits at lists.infradead.org  Sat Jul 17 13:34:14 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 16:34:14 -0400
Subject: [openwrt/openwrt]  generic: add missing symbol
In-Reply-To: <162655405432.6376.13365364567132382558@git-01.infra.openwrt.org>
References: <162655405432.6376.13365364567132382558@git-01.infra.openwrt.org>
Message-ID: <mailman.8303.1626554058.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3446baad078997d1b4f97406a41369f48ecf40e9

commit 3446baad078997d1b4f97406a41369f48ecf40e9
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Sat Jul 17 22:32:26 2021 +0200

    generic: add missing symbol
    
    When compiling with all modules enabled, Kconfig complains about
    CONFIG_I2C_DESIGNWARE_SLAVE being unset. Disable this symbol by default.
    
    Fixes commit e9c9b5ec72e4 ("kernel: package Synopsys Designware PCI to I2C controller")
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/generic/config-5.10 | 1 +
 target/linux/generic/config-5.4  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index a2b5a28d8e..68e90156a0 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -2347,6 +2347,7 @@ CONFIG_HZ_100=y
 # CONFIG_I2C_DEMUX_PINCTRL is not set
 # CONFIG_I2C_DESIGNWARE_PCI is not set
 # CONFIG_I2C_DESIGNWARE_PLATFORM is not set
+# CONFIG_I2C_DESIGNWARE_SLAVE is not set
 # CONFIG_I2C_DIOLAN_U2C is not set
 # CONFIG_I2C_EG20T is not set
 # CONFIG_I2C_ELEKTOR is not set
diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index fe5204abb5..0a8ae1c179 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -2101,6 +2101,7 @@ CONFIG_HZ_100=y
 # CONFIG_I2C_DEMUX_PINCTRL is not set
 # CONFIG_I2C_DESIGNWARE_PCI is not set
 # CONFIG_I2C_DESIGNWARE_PLATFORM is not set
+# CONFIG_I2C_DESIGNWARE_SLAVE is not set
 # CONFIG_I2C_DIOLAN_U2C is not set
 # CONFIG_I2C_EG20T is not set
 # CONFIG_I2C_ELEKTOR is not set


From lede-commits at lists.infradead.org  Sat Jul 17 14:12:12 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 17 Jul 2021 17:12:12 -0400
Subject: [openwrt/openwrt]  procd: update to git HEAD
In-Reply-To: <162655633214.13499.16171638697616545248@git-01.infra.openwrt.org>
References: <162655633214.13499.16171638697616545248@git-01.infra.openwrt.org>
Message-ID: <mailman.8306.1626556336.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/c1a3eff3acd854a0eca1b26a48f253a8996abe16

commit c1a3eff3acd854a0eca1b26a48f253a8996abe16
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat Jul 17 19:43:25 2021 +0100

    procd: update to git HEAD
    
     0545905 jail: make use of realpath() for rootfs and overlaydir
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 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 b4ed79f08b..494062d791 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2021-07-15
-PKG_SOURCE_VERSION:=ed96eda0a2a15c8ee801c4c26e8fe5bd241f83e9
-PKG_MIRROR_HASH:=34c5feda54cfa67d96a2d42a502817f7a4b0b9ad66f19333df9e212bdf842bda
+PKG_SOURCE_DATE:=2021-07-17
+PKG_SOURCE_VERSION:=05459054fb6b5f49c76fd5de2d02ff6c891f1dcd
+PKG_MIRROR_HASH:=4859f62d3db49e49db1e62d0e3bd40bdfdd4a9d51edf35df8fff6781512e9d55
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Sun Jul 18 06:13:47 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 18 Jul 2021 09:13:47 -0400
Subject: [openwrt/openwrt]  x86: kernel: set NR_CPUS to 512
In-Reply-To: <162661402753.16856.18191919588560163175@git-01.infra.openwrt.org>
References: <162661402753.16856.18191919588560163175@git-01.infra.openwrt.org>
Message-ID: <mailman.8344.1626614036.1072.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/df554e6fcab171ec499d8fb2ed10a0da328323f3

commit df554e6fcab171ec499d8fb2ed10a0da328323f3
Author: Edgar Su <sjs333 at outlook.com>
AuthorDate: Mon Jul 12 21:22:48 2021 +0800

    x86: kernel: set NR_CPUS to 512
    
    NR_CPUS limits the number of CPUs supported to 8. This makes total sense
    on hardware-restircted platforms, but not on x86_64, where CPUs with
    more than 8 cores can be easily acquired and with less physical limitaions.
    
    see also: https://forum.openwrt.org/t/x86-64-8-cpu-limitation-on-vanilla-release/100946
    
    Signed-off-by: Edgar Su <sjs333 at outlook.com>
---
 target/linux/x86/64/config-5.10 | 4 ++--
 target/linux/x86/64/config-5.4  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/x86/64/config-5.10 b/target/linux/x86/64/config-5.10
index 2db2f4998b..6804d83519 100644
--- a/target/linux/x86/64/config-5.10
+++ b/target/linux/x86/64/config-5.10
@@ -301,8 +301,8 @@ CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NET_FAILOVER=y
 CONFIG_NET_FLOW_LIMIT=y
 # CONFIG_NITRO_ENCLAVES is not set
-CONFIG_NR_CPUS=8
-CONFIG_NR_CPUS_DEFAULT=64
+CONFIG_NR_CPUS=512
+CONFIG_NR_CPUS_DEFAULT=512
 CONFIG_NR_CPUS_RANGE_BEGIN=2
 CONFIG_NR_CPUS_RANGE_END=512
 CONFIG_NVME_CORE=y
diff --git a/target/linux/x86/64/config-5.4 b/target/linux/x86/64/config-5.4
index b97b9f64c1..50521a5148 100644
--- a/target/linux/x86/64/config-5.4
+++ b/target/linux/x86/64/config-5.4
@@ -312,8 +312,8 @@ CONFIG_ND_CLAIM=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NET_FAILOVER=y
 CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NR_CPUS=8
-CONFIG_NR_CPUS_DEFAULT=64
+CONFIG_NR_CPUS=512
+CONFIG_NR_CPUS_DEFAULT=512
 CONFIG_NR_CPUS_RANGE_BEGIN=2
 CONFIG_NR_CPUS_RANGE_END=512
 # CONFIG_NUMA is not set


From lede-commits at lists.infradead.org  Sun Jul 18 10:34:20 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 18 Jul 2021 13:34:20 -0400
Subject: [openwrt/openwrt] odhcpd: fix invalid DHCPv6 ADVERTSIE with small
 configured leasetime (FS#3935)
In-Reply-To: <162662966026.16268.9819985684146899568@git-01.infra.openwrt.org>
References: <162662966026.16268.9819985684146899568@git-01.infra.openwrt.org>
Message-ID: <mailman.8356.1626629667.1072.lede-commits@lists.infradead.org>

dedeckeh pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/033d5ff25eaf4facbaab09153982e7321fe282e6

commit 033d5ff25eaf4facbaab09153982e7321fe282e6
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Sun Jul 18 19:27:57 2021 +0200

    odhcpd: fix invalid DHCPv6 ADVERTSIE with small configured leasetime (FS#3935)
    
    bc9d317 dhcpv6-ia: fix invalid preferred lifetime
    
    Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
 package/network/services/odhcpd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile
index 05174a5092..d7919d6836 100644
--- a/package/network/services/odhcpd/Makefile
+++ b/package/network/services/odhcpd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
-PKG_SOURCE_DATE:=2021-06-19
-PKG_SOURCE_VERSION:=564d25e53fad925fa3ed56e3004c107d40925fa4
-PKG_MIRROR_HASH:=a0644d31f99f20e5c2cee74153b81a0c2eae9ebeb644662cc76b0984b44dd490
+PKG_SOURCE_DATE:=2021-07-18
+PKG_SOURCE_VERSION:=bc9d317f2921ae6b529f2c9f8de79b75992e206f
+PKG_MIRROR_HASH:=be96c4984821b8af95bfee1a29c082bb9eaa052cd3e03d8632ff02afd2debc81
 
 PKG_MAINTAINER:=Hans Dedecker <dedeckeh at gmail.com>
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Sun Jul 18 11:12:50 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 18 Jul 2021 14:12:50 -0400
Subject: [openwrt/openwrt]  procd: update to git HEAD
In-Reply-To: <162663197045.24243.8494616568552869874@git-01.infra.openwrt.org>
References: <162663197045.24243.8494616568552869874@git-01.infra.openwrt.org>
Message-ID: <mailman.8360.1626631974.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/cda668e0468a6e233f67e5fb895b02bf2d631a0b

commit cda668e0468a6e233f67e5fb895b02bf2d631a0b
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Jul 18 19:09:50 2021 +0100

    procd: update to git HEAD
    
     9bd1b7f jail: refactor directory handling for rootfs and overlaydir
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 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 494062d791..12cbb1e0f8 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2021-07-17
-PKG_SOURCE_VERSION:=05459054fb6b5f49c76fd5de2d02ff6c891f1dcd
-PKG_MIRROR_HASH:=4859f62d3db49e49db1e62d0e3bd40bdfdd4a9d51edf35df8fff6781512e9d55
+PKG_SOURCE_DATE:=2021-07-18
+PKG_SOURCE_VERSION:=9bd1b7f0951ec2bcf56674fa729af3872b276057
+PKG_MIRROR_HASH:=87681b3f320af1392bfdecfe6e3c69a32a95169af0ca243e44bad78f22b34e3d
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Sun Jul 18 11:50:14 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 18 Jul 2021 14:50:14 -0400
Subject: [openwrt/openwrt] scripts/mkits.sh: Fix the hash algorithm paramter
In-Reply-To: <162663421421.27525.14364204750192611407@git-01.infra.openwrt.org>
References: <162663421421.27525.14364204750192611407@git-01.infra.openwrt.org>
Message-ID: <mailman.8362.1626634219.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/7270d768da6a30d6d47b33a6365d6fb5fda8d745

commit 7270d768da6a30d6d47b33a6365d6fb5fda8d745
Author: Yonghyu Ban <yonghyu at empo.im>
AuthorDate: Tue Jul 6 16:13:59 2021 +0900

    scripts/mkits.sh: Fix the hash algorithm paramter
    
    The mkits.sh script help message states hash algorithm can be
    specified using the -H command-line option, but it does not work
    currently due to a bug in the script.
    
    This patch fixes this problem by changing the option from -S to
    -H and specify getopts parameter after it
    
    Signed-off-by: Yonghyu Ban <yonghyu at empo.im>
---
 scripts/mkits.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index 7533baf799..1add8087b0 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -46,7 +46,7 @@ LOADABLES=
 DTOVERLAY=
 DTADDR=
 
-while getopts ":A:a:c:C:D:d:e:f:i:k:n:o:O:v:r:S" OPTION
+while getopts ":A:a:c:C:D:d:e:f:i:k:n:o:O:v:r:H:" OPTION
 do
 	case $OPTION in
 		A ) ARCH=$OPTARG;;
@@ -63,7 +63,7 @@ do
 		o ) OUTPUT=$OPTARG;;
 		O ) DTOVERLAY="$DTOVERLAY ${OPTARG}";;
 		r ) ROOTFS=$OPTARG;;
-		S ) HASH=$OPTARG;;
+		H ) HASH=$OPTARG;;
 		v ) VERSION=$OPTARG;;
 		* ) echo "Invalid option passed to '$0' (options:$*)"
 		usage;;


From lede-commits at lists.infradead.org  Mon Jul 19 04:29:04 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 07:29:04 -0400
Subject: [openwrt/openwrt] odhcpd: fix invalid DHCPv6 ADVERTSIE with small
 configured leasetime (FS#3935)
In-Reply-To: <162669414472.32163.3465713735996050894@git-01.infra.openwrt.org>
References: <162669414472.32163.3465713735996050894@git-01.infra.openwrt.org>
Message-ID: <mailman.8515.1626694150.1072.lede-commits@lists.infradead.org>

dedeckeh pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/4633471d74589c761a3849bd63935b42ac3cea73

commit 4633471d74589c761a3849bd63935b42ac3cea73
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Sun Jul 18 19:27:57 2021 +0200

    odhcpd: fix invalid DHCPv6 ADVERTSIE with small configured leasetime (FS#3935)
    
    bc9d317 dhcpv6-ia: fix invalid preferred lifetime
    
    Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
    (cherry picked from commit 033d5ff25eaf4facbaab09153982e7321fe282e6)
---
 package/network/services/odhcpd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile
index 799a63c23d..b69afb63bb 100644
--- a/package/network/services/odhcpd/Makefile
+++ b/package/network/services/odhcpd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
-PKG_SOURCE_DATE:=2021-01-06
-PKG_SOURCE_VERSION:=8d8a8cd35137ff0fa11b6be455fdd596a8d7d2e9
-PKG_MIRROR_HASH:=7149b4a434a35c1e64b20c708c0abbd381e034a2a1b4fbc1b7da0b039568b5b5
+PKG_SOURCE_DATE:=2021-07-18
+PKG_SOURCE_VERSION:=bc9d317f2921ae6b529f2c9f8de79b75992e206f
+PKG_MIRROR_HASH:=be96c4984821b8af95bfee1a29c082bb9eaa052cd3e03d8632ff02afd2debc81
 
 PKG_MAINTAINER:=Hans Dedecker <dedeckeh at gmail.com>
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Mon Jul 19 05:13:17 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:13:17 -0400
Subject: [openwrt/openwrt]  dnsmasq: add /tmp/hosts/ to jail_mount
In-Reply-To: <162669679762.2858.6022890905017138819@git-01.infra.openwrt.org>
References: <162669679762.2858.6022890905017138819@git-01.infra.openwrt.org>
Message-ID: <mailman.8518.1626696801.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3a94c2ca5cf7c11ca150fa3ae884e7be8d07a281

commit 3a94c2ca5cf7c11ca150fa3ae884e7be8d07a281
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Sun Jul 18 15:32:44 2021 +0200

    dnsmasq: add /tmp/hosts/ to jail_mount
    
    Programs like the olsr-name-plugin write hostname files to "/tmp/hosts/".
    If you don't add this to the jail_mount, dnsmasq can't read it anymore.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 package/network/services/dnsmasq/files/dnsmasq.init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index f86b4b04f3..d5f70a0ee5 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -1119,7 +1119,7 @@ dnsmasq_start()
 	procd_set_param respawn
 
 	procd_add_jail dnsmasq ubus log
-	procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT
+	procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT /tmp/hosts/
 	procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
 
 	procd_close_instance


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:47 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:47 -0400
Subject: [openwrt/openwrt] mvebu: convert mtd-mac-address to nvmem
 implementation
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8528.1626699107.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2ca8e424b93cbf359a8028acbbe9acabdb9365a9

commit 2ca8e424b93cbf359a8028acbbe9acabdb9365a9
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 2 23:45:20 2021 +0200

    mvebu: convert mtd-mac-address to nvmem implementation
    
    Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
    The conversion is done with an automated script.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 .../boot/dts/marvell/armada-3720-gl-mv1000.dts     | 23 +++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts
index 80b078cfaa..cdc91880ee 100644
--- a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts
+++ b/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts
@@ -169,7 +169,8 @@
 				label = "lan0";
 				phy-handle = <&switch0phy1>;
 
-				mtd-mac-address = <&factory 0x6>;
+				nvmem-cells = <&macaddr_factory_6>;
+				nvmem-cell-names = "mac-address";
 			};
 
 			port at 3 {
@@ -177,7 +178,8 @@
 				label = "lan1";
 				phy-handle = <&switch0phy2>;
 
-				mtd-mac-address = <&factory 0x6>;
+				nvmem-cells = <&macaddr_factory_6>;
+				nvmem-cell-names = "mac-address";
 			};
 		};
 
@@ -199,7 +201,8 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&factory 0x0>;
+	nvmem-cells = <&macaddr_factory_0>;
+	nvmem-cell-names = "mac-address";
 	phy-mode = "rgmii-id";
 	status = "okay";
 
@@ -208,3 +211,17 @@
 		full-duplex;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_factory_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:50 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:50 -0400
Subject: [openwrt/openwrt] octeon: convert mtd-mac-address to nvmem
 implementation
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8529.1626699109.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/293d4e61c2f500222d971fbc4b45133604638c66

commit 293d4e61c2f500222d971fbc4b45133604638c66
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 2 23:51:11 2021 +0200

    octeon: convert mtd-mac-address to nvmem implementation
    
    Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
    The conversion is done with an automated script.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 .../dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts | 13 +++++++++++-
 .../cavium-octeon/cn7130_ubnt_edgerouter-6p.dts    | 23 +++++++++++++++++-----
 .../cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi | 19 +++++++++++++++---
 3 files changed, 46 insertions(+), 9 deletions(-)

diff --git a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts
index d8dabfc370..75e2c794b9 100644
--- a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts
+++ b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-4.dts
@@ -14,7 +14,18 @@
 			status = "okay";
 			phy-mode = "sgmii";
 			phy-handle = <&phy4>;
-			mtd-mac-address = <&eeprom 0>;
+			nvmem-cells = <&macaddr_eeprom_0>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
+
+&eeprom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_eeprom_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-6p.dts b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-6p.dts
index 7d31885928..c1a41cbf70 100644
--- a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-6p.dts
+++ b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-6p.dts
@@ -32,7 +32,8 @@
 			status = "okay";
 			phy-mode = "sgmii";
 			phy-handle = <&phy4>;
-			mtd-mac-address = <&eeprom 0>;
+			nvmem-cells = <&macaddr_eeprom_0>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 
@@ -44,8 +45,9 @@
 			status = "okay";
 			phy-mode = "sgmii";
 			phy-handle = <&phy8>;
-			mtd-mac-address = <&eeprom 0>;
-			mtd-mac-address-increment = <(4)>;
+			nvmem-cells = <&macaddr_eeprom_0>;
+			nvmem-cell-names = "mac-address";
+			mac-address-increment = <(4)>;
 		};
 
 		ethernet at 1 {
@@ -53,8 +55,19 @@
 			status = "okay";
 			phy-mode = "sgmii";
 			phy-handle = <&phy9>;
-			mtd-mac-address = <&eeprom 0>;
-			mtd-mac-address-increment = <(5)>;
+			nvmem-cells = <&macaddr_eeprom_0>;
+			nvmem-cell-names = "mac-address";
+			mac-address-increment = <(5)>;
 		};
 	};
 };
+
+&eeprom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_eeprom_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi
index 7a4d2e6683..7eafa32cf6 100644
--- a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi
+++ b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi
@@ -180,7 +180,8 @@
 			status = "okay";
 			phy-mode = "sgmii";
 			phy-handle = <&phy5>;
-			mtd-mac-address = <&eeprom 0>;
+			nvmem-cells = <&macaddr_eeprom_0>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <(1)>;
 		};
 
@@ -189,7 +190,8 @@
 			status = "okay";
 			phy-mode = "sgmii";
 			phy-handle = <&phy6>;
-			mtd-mac-address = <&eeprom 0>;
+			nvmem-cells = <&macaddr_eeprom_0>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <(2)>;
 		};
 
@@ -198,8 +200,19 @@
 			status = "okay";
 			phy-mode = "sgmii";
 			phy-handle = <&phy7>;
-			mtd-mac-address = <&eeprom 0>;
+			nvmem-cells = <&macaddr_eeprom_0>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <(3)>;
 		};
 	};
 };
+
+&eeprom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_eeprom_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:52 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:52 -0400
Subject: [openwrt/openwrt] mediatek: convert mtd-mac-address to nvmem
 implementation
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8530.1626699109.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/1e6f330ccfa91f8a6860cfc768299490e3c08603

commit 1e6f330ccfa91f8a6860cfc768299490e3c08603
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 2 23:53:02 2021 +0200

    mediatek: convert mtd-mac-address to nvmem implementation
    
    Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
    The conversion is done with an automated script.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 .../mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts   | 15 ++++++++++++--
 .../mediatek/dts/mt7622-linksys-e8450-ubi.dts      | 20 +++++++++++++++++--
 target/linux/mediatek/dts/mt7622-linksys-e8450.dts | 20 +++++++++++++++++--
 .../dts/mt7622-ubnt-unifi-6-lr-ubootmod.dts        | 23 +++++++++++++++++++---
 .../linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dts  | 23 +++++++++++++++++++---
 5 files changed, 89 insertions(+), 12 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts b/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts
index 62e2e7f4cb..6d77be532b 100644
--- a/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts
+++ b/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts
@@ -218,8 +218,9 @@
 
 		phy-connection-type = "2500base-x";
 
-		mtd-mac-address = <&factory 0x4>;
-		mtd-mac-address-increment = <(-1)>;
+		nvmem-cells = <&macaddr_factory_4>;
+		nvmem-cell-names = "mac-address";
+		mac-address-increment = <(-1)>;
 
 		fixed-link {
 			speed = <2500>;
@@ -337,3 +338,13 @@
 &rtc {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts b/target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts
index d6cadd320c..9df736eb01 100644
--- a/target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts
+++ b/target/linux/mediatek/dts/mt7622-linksys-e8450-ubi.dts
@@ -53,9 +53,25 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x7fff4>;
+	nvmem-cells = <&macaddr_factory_7fff4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wan {
-	mtd-mac-address = <&factory 0x7fffa>;
+	nvmem-cells = <&macaddr_factory_7fffa>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_7fff4: macaddr at 7fff4 {
+		reg = <0x7fff4 0x6>;
+	};
+
+	macaddr_factory_7fffa: macaddr at 7fffa {
+		reg = <0x7fffa 0x6>;
+	};
 };
diff --git a/target/linux/mediatek/dts/mt7622-linksys-e8450.dts b/target/linux/mediatek/dts/mt7622-linksys-e8450.dts
index b30b5d2455..8552dbf1a9 100644
--- a/target/linux/mediatek/dts/mt7622-linksys-e8450.dts
+++ b/target/linux/mediatek/dts/mt7622-linksys-e8450.dts
@@ -98,9 +98,25 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x7fff4>;
+	nvmem-cells = <&macaddr_factory_7fff4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wan {
-	mtd-mac-address = <&factory 0x7fffa>;
+	nvmem-cells = <&macaddr_factory_7fffa>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_7fff4: macaddr at 7fff4 {
+		reg = <0x7fff4 0x6>;
+	};
+
+	macaddr_factory_7fffa: macaddr at 7fffa {
+		reg = <0x7fffa 0x6>;
+	};
 };
diff --git a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-ubootmod.dts b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-ubootmod.dts
index b2f741ea3b..e573d30912 100644
--- a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-ubootmod.dts
+++ b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr-ubootmod.dts
@@ -49,7 +49,8 @@
 
 &wmac {
 	mediatek,mtd-eeprom = <&factory 0x0>;
-	mtd-mac-address = <&eeprom 0x0>;
+	nvmem-cells = <&macaddr_eeprom_0>;
+	nvmem-cell-names = "mac-address";
 	status = "okay";
 };
 
@@ -57,11 +58,27 @@
 	wifi at 0,0 {
 		reg = <0x0 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x20000>;
-		mtd-mac-address = <&eeprom 0x6>;
+		nvmem-cells = <&macaddr_eeprom_6>;
+		nvmem-cell-names = "mac-address";
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
 
 &gmac0 {
-	mtd-mac-address = <&eeprom 0x0>;
+	nvmem-cells = <&macaddr_eeprom_0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&eeprom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_eeprom_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_eeprom_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
 };
diff --git a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dts b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dts
index 8603de392a..9b676b43c1 100644
--- a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dts
+++ b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dts
@@ -65,7 +65,8 @@
 
 &wmac {
 	mediatek,mtd-eeprom = <&factory 0x0>;
-	mtd-mac-address = <&eeprom 0x0>;
+	nvmem-cells = <&macaddr_eeprom_0>;
+	nvmem-cell-names = "mac-address";
 	status = "okay";
 };
 
@@ -73,11 +74,27 @@
 	wifi at 0,0 {
 		reg = <0x0 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x20000>;
-		mtd-mac-address = <&eeprom 0x6>;
+		nvmem-cells = <&macaddr_eeprom_6>;
+		nvmem-cell-names = "mac-address";
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
 
 &gmac0 {
-	mtd-mac-address = <&eeprom 0x0>;
+	nvmem-cells = <&macaddr_eeprom_0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&eeprom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_eeprom_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_eeprom_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
 };


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:45 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:45 -0400
Subject: [openwrt/openwrt] ipq806x: convert mtd-mac-address to nvmem
 implementation
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8531.1626699110.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/0458a8993ca1c1594bc19d247909324f157abeef

commit 0458a8993ca1c1594bc19d247909324f157abeef
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 2 23:38:11 2021 +0200

    ipq806x: convert mtd-mac-address to nvmem implementation
    
    Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
    The conversion is done with an automated script.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 .../arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts   | 20 +++++++++++++++--
 .../arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi    | 16 +++++++++++--
 .../files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts | 20 +++++++++++++++--
 .../files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts | 20 +++++++++++++++--
 .../arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts     | 22 +++++++++++++++---
 .../arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts | 20 +++++++++++++++--
 .../arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts     | 16 +++++++++++--
 .../arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts    | 20 +++++++++++++++--
 .../arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts | 22 +++++++++++++++---
 .../files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts | 26 ++++++++++++++++++----
 .../arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts     | 20 +++++++++++++++--
 11 files changed, 196 insertions(+), 26 deletions(-)

diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts
index 3e04618d57..c6feb71a8e 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts
@@ -416,7 +416,8 @@
 	phy-mode = "rgmii";
 	qcom,id = <1>;
 	mdiobus = <&mdio0>;
-	mtd-mac-address = <&factory 0x0>;
+	nvmem-cells = <&macaddr_factory_0>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -429,10 +430,25 @@
 	phy-mode = "sgmii";
 	qcom,id = <2>;
 	mdiobus = <&mdio0>;
-	mtd-mac-address = <&factory 0x6>;
+	nvmem-cells = <&macaddr_factory_6>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
 		full-duplex;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_factory_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
index bbecdb7f0c..daa7b148cc 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
@@ -288,7 +288,8 @@
 	pinctrl-0 = <&rgmii2_pins>;
 	pinctrl-names = "default";
 
-	mtd-mac-address = <&defaultmac 0x8>;
+	nvmem-cells = <&macaddr_defaultmac_8>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 
 	fixed-link {
@@ -302,7 +303,8 @@
 	phy-mode = "sgmii";
 	qcom,id = <2>;
 
-	mtd-mac-address = <&defaultmac 0x8>;
+	nvmem-cells = <&macaddr_defaultmac_8>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -313,3 +315,13 @@
 &adm_dma {
 	status = "okay";
 };
+
+&defaultmac {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_defaultmac_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
+};
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
index 82535cc86b..6e022cece0 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
@@ -297,7 +297,8 @@
 	pinctrl-0 = <&rgmii2_pins>;
 	pinctrl-names = "default";
 
-	mtd-mac-address = <&art 6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -310,7 +311,8 @@
 	phy-mode = "sgmii";
 	qcom,id = <2>;
 
-	mtd-mac-address = <&art 0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -321,3 +323,17 @@
 &adm_dma {
 	status = "okay";
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
index 1dd4563153..c7d26a0772 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
@@ -269,7 +269,8 @@
 	pinctrl-0 = <&rgmii2_pins>;
 	pinctrl-names = "default";
 
-	mtd-mac-address = <&art 6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -282,7 +283,8 @@
 	phy-mode = "sgmii";
 	qcom,id = <2>;
 
-	mtd-mac-address = <&art 0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -298,3 +300,17 @@
 &adm_dma {
 	status = "okay";
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
index 71c4c3b1a3..0f22480434 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
@@ -299,7 +299,8 @@
 	pinctrl-0 = <&rgmii2_pins>;
 	pinctrl-names = "default";
 
-	mtd-mac-address = <&art 6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -312,10 +313,25 @@
 	phy-mode = "sgmii";
 	qcom,id = <2>;
 
-	mtd-mac-address = <&art 0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
 		full-duplex;
 	};
-};
\ No newline at end of file
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts
index d6ac1fef1d..a50204fee1 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts
@@ -250,7 +250,8 @@
 	phy-mode = "sgmii";
 	qcom,id = <1>;
 
-	mtd-mac-address = <&eeprom 0x6>;
+	nvmem-cells = <&macaddr_eeprom_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gmac2 {
@@ -261,7 +262,8 @@
 	phy-mode = "sgmii";
 	qcom,id = <2>;
 
-	mtd-mac-address = <&eeprom 0x0>;
+	nvmem-cells = <&macaddr_eeprom_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie0 {
@@ -299,3 +301,17 @@
 &usb3_1 {
 	status = "okay";
 };
+
+&eeprom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_eeprom_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_eeprom_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
index 79b22ff0c3..54ae07590a 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
@@ -323,7 +323,8 @@
 	pinctrl-0 = <&rgmii2_pins>;
 	pinctrl-names = "default";
 
-	mtd-mac-address = <&defaultmac 0>;
+	nvmem-cells = <&macaddr_defaultmac_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 
 	fixed-link {
@@ -337,7 +338,8 @@
 	phy-mode = "sgmii";
 	qcom,id = <2>;
 
-	mtd-mac-address = <&defaultmac 0>;
+	nvmem-cells = <&macaddr_defaultmac_0>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -348,3 +350,13 @@
 &adm_dma {
 	status = "okay";
 };
+
+&defaultmac {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_defaultmac_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
index 635e9fc8f9..7148fdf143 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
@@ -167,7 +167,8 @@
 	pinctrl-0 = <&rgmii2_pins>;
 	pinctrl-names = "default";
 
-	mtd-mac-address = <&PRODUCTDATA 6>;
+	nvmem-cells = <&macaddr_PRODUCTDATA_6>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -181,7 +182,8 @@
 	phy-mode = "sgmii";
 	qcom,id = <2>;
 
-	mtd-mac-address = <&PRODUCTDATA 0>;
+	nvmem-cells = <&macaddr_PRODUCTDATA_0>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -380,3 +382,17 @@
 		};
 	};
 };
+
+&PRODUCTDATA {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_PRODUCTDATA_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_PRODUCTDATA_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts
index 8c4e3b71e3..1cf5e3452f 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts
@@ -229,7 +229,8 @@
 	pinctrl-0 = <&rgmii2_pins>;
 	pinctrl-names = "default";
 
-	mtd-mac-address = <&ART 6>;
+	nvmem-cells = <&macaddr_ART_6>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -243,7 +244,8 @@
 	phy-mode = "sgmii";
 	qcom,id = <2>;
 
-	mtd-mac-address = <&ART 0>;
+	nvmem-cells = <&macaddr_ART_0>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -463,4 +465,18 @@
 			output-high;
 		};
 	};
-};
\ No newline at end of file
+};
+
+&ART {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_ART_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_ART_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
index 9444235173..b12e348145 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
@@ -358,7 +358,8 @@
 	pinctrl-0 = <&rgmii2_pins>;
 	pinctrl-names = "default";
 
-	mtd-mac-address = <&art 6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -378,7 +379,8 @@
 	qcom,irq = <258>;
 	mdiobus = <&mdio0>;
 
-	mtd-mac-address = <&art 0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -425,7 +427,8 @@
 			compatible = "pci168c,0046";
 			reg = <0x00010000 0 0 0 0>;
 
-			mtd-mac-address = <&art 6>;
+			nvmem-cells = <&macaddr_art_6>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <(1)>;
 		};
 	};
@@ -445,8 +448,23 @@
 			compatible = "pci168c,0046";
 			reg = <0x00010000 0 0 0 0>;
 
-			mtd-mac-address = <&art 6>;
+			nvmem-cells = <&macaddr_art_6>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <(2)>;
 		};
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts
index 7342de4bec..54356e2ff1 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts
@@ -251,7 +251,8 @@
 	phy-mode = "rgmii";
 	qcom,id = <0>;
 
-	mtd-mac-address = <&ART 0x0>;
+	nvmem-cells = <&macaddr_ART_0>;
+	nvmem-cell-names = "mac-address";
 
 	pinctrl-0 = <&rgmii2_pins>;
 	pinctrl-names = "default";
@@ -267,7 +268,8 @@
 	phy-mode = "sgmii";
 	qcom,id = <1>;
 
-	mtd-mac-address = <&ART 0x6>;
+	nvmem-cells = <&macaddr_ART_6>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -301,3 +303,17 @@
 	/delete-property/ perst-gpios;
 	force_gen1 = <1>;
 };
+
+&ART {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_ART_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_ART_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:43 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:43 -0400
Subject: [openwrt/openwrt] kernel: add ath10k support for of_get_mac_address
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8534.1626699114.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/985954ccbd11ba716dc0569c5101583a4a74b215

commit 985954ccbd11ba716dc0569c5101583a4a74b215
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Sat Apr 3 00:31:08 2021 +0200

    kernel: add ath10k support for of_get_mac_address
    
    ath10k doesn't currently support the standard function to get mac-address from the dts.
    Add this for both ath10k and ath10k-ct
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 ...03-ath10k-Try-to-get-mac-address-from-dts.patch | 59 ++++++++++++++++++++++
 ...84-ath10k-Try-to-get-mac-address-from-dts.patch | 59 ++++++++++++++++++++++
 2 files changed, 118 insertions(+)

diff --git a/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch b/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch
new file mode 100644
index 0000000000..dbaef20b98
--- /dev/null
+++ b/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch
@@ -0,0 +1,59 @@
+From 22fb5991a44c78ff18ec0082dc90c809356eb893 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Sun, 27 Sep 2020 19:23:35 +0200
+Subject: [PATCH 1/2] ath10k: Try to get mac-address from dts
+
+Most of embedded device that have the ath10k wifi integrated store the
+mac-address in nvmem partitions. Try to fetch the mac-address using the
+standard 'of_get_mac_address' than in all the check also try to fetch the
+address using the nvmem api searching for a defined 'mac-address' cell.
+Mac-address defined in the dts have priority than any other address found.
+
+Tested-on: QCA9984 hw1.0 PCI 10.4
+
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
+---
+ ath10k-5.10/core.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/ath10k-5.10/core.c b/ath10k-5.10/core.c
+index 5f4e12196..9ed7b9883 100644
+--- a/ath10k-5.10/core.c
++++ b/ath10k-5.10/core.c
+@@ -8,6 +8,9 @@
+ #include <linux/module.h>
+ #include <linux/firmware.h>
+ #include <linux/of.h>
++#include <linux/of_net.h>
++#include <linux/of_platform.h>
++#include <linux/property.h>
+ #include <linux/property.h>
+ #include <linux/dmi.h>
+ #include <linux/ctype.h>
+@@ -2961,8 +2963,12 @@ EXPORT_SYMBOL(ath10k_core_stop);
+ static int ath10k_core_probe_fw(struct ath10k *ar)
+ {
+ 	struct bmi_target_info target_info;
++	const char *mac;
+ 	int ret = 0;
+ 
++	/* register the platform to be found by the of api */
++	of_platform_device_create(ar->dev->of_node, NULL, NULL);
++
+ 	ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL);
+ 	if (ret) {
+ 		ath10k_err(ar, "could not power on hif bus (%d)\n", ret);
+@@ -3062,6 +3068,10 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
+ 
+ 	device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr));
+ 
++	mac = of_get_mac_address(ar->dev->of_node);
++	if (!IS_ERR(mac))
++		ether_addr_copy(ar->mac_addr, mac);
++
+ 	ret = ath10k_core_init_firmware_features(ar);
+ 	if (ret) {
+ 		ath10k_err(ar, "fatal problem with firmware features: %d\n",
+-- 
+2.27.0
+
diff --git a/package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch b/package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch
new file mode 100644
index 0000000000..94eac3fa4a
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch
@@ -0,0 +1,59 @@
+From 22fb5991a44c78ff18ec0082dc90c809356eb893 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Sun, 27 Sep 2020 19:23:35 +0200
+Subject: [PATCH 1/2] ath10k: Try to get mac-address from dts
+
+Most of embedded device that have the ath10k wifi integrated store the
+mac-address in nvmem partitions. Try to fetch the mac-address using the
+standard 'of_get_mac_address' than in all the check also try to fetch the
+address using the nvmem api searching for a defined 'mac-address' cell.
+Mac-address defined in the dts have priority than any other address found.
+
+Tested-on: QCA9984 hw1.0 PCI 10.4
+
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
+---
+ drivers/net/wireless/ath/ath10k/core.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
+index 5f4e12196..9ed7b9883 100644
+--- a/drivers/net/wireless/ath/ath10k/core.c
++++ b/drivers/net/wireless/ath/ath10k/core.c
+@@ -8,6 +8,9 @@
+ #include <linux/module.h>
+ #include <linux/firmware.h>
+ #include <linux/of.h>
++#include <linux/of_net.h>
++#include <linux/of_platform.h>
++#include <linux/property.h>
+ #include <linux/property.h>
+ #include <linux/dmi.h>
+ #include <linux/ctype.h>
+@@ -2961,8 +2963,12 @@ EXPORT_SYMBOL(ath10k_core_stop);
+ static int ath10k_core_probe_fw(struct ath10k *ar)
+ {
+ 	struct bmi_target_info target_info;
++	const char *mac;
+ 	int ret = 0;
+ 
++	/* register the platform to be found by the of api */
++	of_platform_device_create(ar->dev->of_node, NULL, NULL);
++
+ 	ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL);
+ 	if (ret) {
+ 		ath10k_err(ar, "could not power on hif bus (%d)\n", ret);
+@@ -3062,6 +3068,10 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
+ 
+ 	device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr));
+ 
++	mac = of_get_mac_address(ar->dev->of_node);
++	if (!IS_ERR(mac))
++		ether_addr_copy(ar->mac_addr, mac);
++
+ 	ret = ath10k_core_init_firmware_features(ar);
+ 	if (ret) {
+ 		ath10k_err(ar, "fatal problem with firmware features: %d\n",
+-- 
+2.27.0
+


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:44 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:44 -0400
Subject: [openwrt/openwrt] treewide: convert mtd-mac-address-increment* to
 generic implementation
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8535.1626699115.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d284e6ef0f06551bad5696f16f26e6ff27b065d4

commit d284e6ef0f06551bad5696f16f26e6ff27b065d4
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Mon Jul 12 21:42:41 2021 +0200

    treewide: convert mtd-mac-address-increment* to generic implementation
    
    Rework patch 681-NET-add-mtd-mac-address-support to implement
    only the function to read the mac-address from mtd.
    Generalize mtd-mac-address-increment function so it can be applied
    to any source of of_get_mac_address.
    Rename any mtd-mac-address-increment to mac-address-increment.
    Rename any mtd-mac-address-increment-byte to mac-address-increment-byte.
    
    This should make simplify the conversion of target to nvmem implementation.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 target/linux/ath79/dts/ar7161_aruba_ap-105.dts     |   4 +-
 .../ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi    |   2 +-
 target/linux/ath79/dts/ar7161_meraki_mr16.dts      |   4 +-
 .../linux/ath79/dts/ar7240_buffalo_whr-g301n.dts   |   2 +-
 .../linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts  |   2 +-
 .../linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi  |   2 +-
 target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi    |   4 +-
 .../linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts  |   2 +-
 target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi |   2 +-
 target/linux/ath79/dts/ar7241_tplink.dtsi          |   4 +-
 .../linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts |   4 +-
 .../linux/ath79/dts/ar7242_engenius_eap350-v1.dts  |   2 +-
 .../linux/ath79/dts/ar7242_engenius_ecb350-v1.dts  |   2 +-
 target/linux/ath79/dts/ar7242_meraki_mr12.dts      |   2 +-
 .../ath79/dts/ar9331_embeddedwireless_dorin.dts    |   4 +-
 target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi |   4 +-
 .../linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi   |   2 +-
 .../ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi     |   4 +-
 target/linux/ath79/dts/ar9341_pcs_cr3000.dts       |   2 +-
 target/linux/ath79/dts/ar9341_tplink.dtsi          |   2 +-
 .../linux/ath79/dts/ar9344_aerohive_hiveap-121.dts |   4 +-
 .../linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi   |   2 +-
 target/linux/ath79/dts/ar9344_engenius_eap600.dts  |   4 +-
 target/linux/ath79/dts/ar9344_engenius_ecb600.dts  |   4 +-
 target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi  |   4 +-
 target/linux/ath79/dts/ar9344_pcs_cap324.dts       |   4 +-
 .../linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts |   2 +-
 .../linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts  |   2 +-
 target/linux/ath79/dts/ar9344_samsung_wam250.dts   |   2 +-
 .../ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts   |   2 +-
 target/linux/ath79/dts/ar9344_teltonika_rut955.dts |   2 +-
 .../linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi   |   2 +-
 .../ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts      |   6 +-
 .../linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi  |   2 +-
 .../linux/ath79/dts/ar9344_winchannel_wb2000.dts   |   4 +-
 .../linux/ath79/dts/qca9531_alfa-network_n2q.dts   |   4 +-
 .../ath79/dts/qca9531_alfa-network_pi-wifi4.dts    |   2 +-
 .../linux/ath79/dts/qca9531_alfa-network_r36a.dts  |   4 +-
 .../linux/ath79/dts/qca9531_comfast_cf-e560ac.dts  |   4 +-
 target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts |   4 +-
 .../ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts    |   2 +-
 .../linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi  |   2 +-
 target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts |   2 +-
 target/linux/ath79/dts/qca9531_glinet_gl-x750.dts  |   2 +-
 target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi   |   2 +-
 .../ath79/dts/qca9531_tplink_archer-d50-v1.dts     |   2 +-
 .../ath79/dts/qca9531_tplink_tl-mr3420-v3.dts      |   2 +-
 .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts      |   4 +-
 .../ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts     |   2 +-
 .../linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi  |   2 +-
 .../linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi |   4 +-
 .../linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi  |   2 +-
 .../linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi   |   2 +-
 .../ath79/dts/qca9533_tplink_tl-wr842n-v3.dts      |   2 +-
 .../linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi  |   2 +-
 .../linux/ath79/dts/qca9557_engenius_eap1200h.dts  |   2 +-
 .../ath79/dts/qca9557_engenius_enstationac-v1.dts  |   2 +-
 .../ath79/dts/qca9558_allnet_all-wap02860ac.dts    |   3 +-
 target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi  |   2 +-
 target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts |   2 +-
 target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts |   2 +-
 target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi |   2 +-
 target/linux/ath79/dts/qca9558_openmesh_mr.dtsi    |   2 +-
 .../linux/ath79/dts/qca9558_openmesh_mr900-v1.dts  |   2 +-
 .../linux/ath79/dts/qca9558_openmesh_mr900-v2.dts  |   2 +-
 target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi    |   2 +-
 .../linux/ath79/dts/qca9558_tplink_archer-c.dtsi   |   2 +-
 .../ath79/dts/qca9558_tplink_archer-d7-v1.dts      |   2 +-
 .../ath79/dts/qca9558_tplink_archer-d7b-v1.dts     |   2 +-
 target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi   |   2 +-
 .../ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts     |   6 +-
 .../ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi      |   2 +-
 .../ath79/dts/qca9561_tplink_archer-c25-v1.dts     |   2 +-
 .../linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi |   2 +-
 .../linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi |   2 +-
 .../ath79/dts/qca9561_xiaomi_mi-router-4q.dts      |   2 +-
 .../ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi      |   2 +-
 .../ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi      |   2 +-
 target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi    |   2 +-
 ...mac-address-support-to-of_get_mac_addres.patch} |  45 ++++---
 ...-of_net-add-mac-address-increment-support.patch | 133 +++++++++++++++++++++
 ...mac-address-support-to-of_get_mac_addres.patch} |  45 ++++---
 ...-of_net-add-mac-address-increment-support.patch | 133 +++++++++++++++++++++
 .../arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi    |   2 +-
 .../arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts     |   2 +-
 .../files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts |   4 +-
 .../mips/boot/dts/lantiq/ar9_avm_fritz7312.dts     |   2 +-
 .../mips/boot/dts/lantiq/ar9_avm_fritz7320.dts     |   2 +-
 .../dts/lantiq/danube_arcadyan_arv7506pw11.dts     |   2 +-
 .../boot/dts/lantiq/danube_arcadyan_arv7518pw.dts  |   2 +-
 .../dts/lantiq/danube_arcadyan_arv8539pw22.dts     |   2 +-
 .../boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi  |   2 +-
 .../mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi |   4 +-
 .../mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi    |   2 +-
 .../mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi   |   2 +-
 .../mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi     |   2 +-
 .../files/arch/powerpc/boot/dts/hiveap-330.dts     |   2 +-
 .../cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi |   6 +-
 target/linux/ramips/dts/mt7620a_cameo_810.dtsi     |   2 +-
 target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts |   2 +-
 .../linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts  |   2 +-
 .../linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts  |   2 +-
 target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts  |   2 +-
 target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts |   2 +-
 .../ramips/dts/mt7620a_tplink_archer-c2-v1.dts     |   2 +-
 .../ramips/dts/mt7620a_tplink_archer-c20-v1.dts    |   4 +-
 .../ramips/dts/mt7620a_tplink_archer-c20i.dts      |   2 +-
 .../ramips/dts/mt7620a_tplink_archer-c50-v1.dts    |   4 +-
 .../linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi  |   2 +-
 target/linux/ramips/dts/mt7621_adslr_g7.dts        |   2 +-
 target/linux/ramips/dts/mt7621_afoundry_ew1200.dts |   2 +-
 .../linux/ramips/dts/mt7621_asiarf_ap7621-001.dts  |   2 +-
 .../linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts  |   2 +-
 .../ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts     |   2 +-
 target/linux/ramips/dts/mt7621_cudy_wr1300.dts     |   4 +-
 .../linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts  |   4 +-
 .../linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts  |   4 +-
 .../linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts  |   4 +-
 .../ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts   |   2 +-
 .../ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts     |   2 +-
 .../ramips/dts/mt7621_elecom_wrc-1167gst2.dts      |   2 +-
 target/linux/ramips/dts/mt7621_firefly_firewrt.dts |   2 +-
 target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts |   2 +-
 .../linux/ramips/dts/mt7621_glinet_gl-mt1300.dts   |   2 +-
 .../linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts |   2 +-
 .../linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts  |   2 +-
 .../ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts  |   2 +-
 target/linux/ramips/dts/mt7621_mqmaker_witi.dts    |   2 +-
 target/linux/ramips/dts/mt7621_mtc_wr1201.dts      |   2 +-
 .../ramips/dts/mt7621_netgear_sercomm_ayx.dtsi     |   2 +-
 .../ramips/dts/mt7621_netgear_sercomm_bzv.dtsi     |   2 +-
 .../ramips/dts/mt7621_netgear_sercomm_chj.dtsi     |   2 +-
 .../ramips/dts/mt7621_storylink_sap-g3200u3.dts    |   2 +-
 .../ramips/dts/mt7621_telco-electronics_x1.dts     |   2 +-
 target/linux/ramips/dts/mt7621_totolink_a7000r.dts |   2 +-
 .../ramips/dts/mt7621_tplink_eap235-wall-v1.dts    |   2 +-
 target/linux/ramips/dts/mt7621_tplink_re350-v1.dts |   4 +-
 .../linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi   |   4 +-
 .../ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts    |   2 +-
 .../linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi |   8 +-
 .../linux/ramips/dts/mt7621_unielec_u7621-01.dtsi  |   2 +-
 .../linux/ramips/dts/mt7621_unielec_u7621-06.dtsi  |   2 +-
 target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts    |   2 +-
 .../ramips/dts/mt7621_xzwifi_creativebox-v1.dts    |   2 +-
 .../linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts |   2 +-
 .../ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi      |   2 +-
 target/linux/ramips/dts/mt7628an_netgear_r6120.dts |   2 +-
 .../ramips/dts/mt7628an_tplink_archer-c20-v4.dts   |   4 +-
 .../ramips/dts/mt7628an_tplink_archer-c20-v5.dts   |   2 +-
 .../ramips/dts/mt7628an_tplink_archer-c50-v3.dts   |   2 +-
 .../ramips/dts/mt7628an_tplink_archer-c50-v4.dts   |   2 +-
 target/linux/ramips/dts/mt7628an_tplink_re200.dtsi |   4 +-
 .../linux/ramips/dts/mt7628an_tplink_re305-v1.dts  |   4 +-
 .../ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts   |   2 +-
 .../dts/mt7628an_xiaomi_mi-router-4a-100m.dts      |   2 +-
 .../linux/ramips/dts/rt3883_sitecom_wlr-6000.dts   |   2 +-
 .../linux/ramips/dts/rt3883_trendnet_tew-691gr.dts |   2 +-
 .../linux/ramips/dts/rt3883_trendnet_tew-692gr.dts |   2 +-
 158 files changed, 507 insertions(+), 242 deletions(-)

diff --git a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts
index e24236324c..083db183d4 100644
--- a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts
+++ b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts
@@ -104,7 +104,7 @@
 	ath9k0: wifi at 0,11 { /* 2.4 GHz */
 		compatible = "pci168c,0029";
 		mtd-mac-address = <&hwinfo 0x1c>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 		reg = <0x8800 0 0 0 0>;
 		#gpio-cells = <2>;
 		gpio-controller;
@@ -113,7 +113,7 @@
 	ath9k1: wifi at 0,12 { /* 5 GHz */
 		compatible = "pci168c,0029";
 		mtd-mac-address = <&hwinfo 0x1c>;
-		mtd-mac-address-increment = <2>;
+		mac-address-increment = <2>;
 		reg = <0x9000 0 0 0 0>;
 		#gpio-cells = <2>;
 		gpio-controller;
diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi
index b8176dc059..15ac148697 100644
--- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi
+++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi
@@ -259,7 +259,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&art 0x520c>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 
 	phy-handle = <&phy4>;
 };
diff --git a/target/linux/ath79/dts/ar7161_meraki_mr16.dts b/target/linux/ath79/dts/ar7161_meraki_mr16.dts
index afbf1e31f2..3d11e641eb 100644
--- a/target/linux/ath79/dts/ar7161_meraki_mr16.dts
+++ b/target/linux/ath79/dts/ar7161_meraki_mr16.dts
@@ -82,7 +82,7 @@
 		reg = <0x8800 0 0 0 0>;
 		qca,no-eeprom;
 		mtd-mac-address = <&config 0x66>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
@@ -92,7 +92,7 @@
 		reg = <0x9000 0 0 0 0>;
 		qca,no-eeprom;
 		mtd-mac-address = <&config 0x66>;
-		mtd-mac-address-increment = <2>;
+		mac-address-increment = <2>;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
diff --git a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts
index e5d7ea57f1..7f736dc005 100644
--- a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts
+++ b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts
@@ -160,7 +160,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&art 0x120c>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &pcie {
diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts
index 7e1c87adde..931032d851 100644
--- a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts
+++ b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts
@@ -190,7 +190,7 @@
 		compatible = "pci168c,002b";
 		reg = <0x0000 0 0 0 0>;
 		mtd-mac-address = <&art 0x0>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
index 7202e1d684..91438ebf8f 100644
--- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
+++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
@@ -123,7 +123,7 @@
 		compatible = "pci168c,002b";
 		reg = <0x0000 0 0 0 0>;
 		mtd-mac-address = <&art 0x0>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi
index bd6caacdf6..adc6cc87b3 100644
--- a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi
+++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi
@@ -31,12 +31,12 @@
 
 &eth0 {
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &eth1 {
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &ath9k {
diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
index de2b536227..380f82a59f 100644
--- a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
+++ b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
@@ -195,7 +195,7 @@
 		compatible = "pci168c,002e";
 		reg = <0x0000 0 0 0 0>;
 		mtd-mac-address = <&art 0x0>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi
index e704ddd9fc..0098b0f03e 100644
--- a/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi
+++ b/target/linux/ath79/dts/ar7241_netgear_wnr2200.dtsi
@@ -171,7 +171,7 @@
 		compatible = "pci168c,002e";
 		reg = <0x0000 0 0 0 0>;
 		mtd-mac-address = <&art 0x0>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi
index 6d7f7515ef..c2c81b3a87 100644
--- a/target/linux/ath79/dts/ar7241_tplink.dtsi
+++ b/target/linux/ath79/dts/ar7241_tplink.dtsi
@@ -97,10 +97,10 @@
 	status = "okay";
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &eth1 {
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
index ca1ad270ce..4cc6d2a8f1 100644
--- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
+++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
@@ -143,10 +143,10 @@
 	status = "okay";
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &eth1 {
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
diff --git a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts
index 436d8c1289..3e2a67697f 100644
--- a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts
+++ b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts
@@ -78,7 +78,7 @@
 		compatible = "pci168c,002a";
 		reg = <0x0 0 0 0 0>;
 		mtd-mac-address = <&art 0x0>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
diff --git a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts
index be9a193170..9026eb997f 100644
--- a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts
+++ b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts
@@ -78,7 +78,7 @@
 		compatible = "pci168c,002a";
 		reg = <0x0 0 0 0 0>;
 		mtd-mac-address = <&art 0x0>;
-		mtd-mac-address-increment = <(-1)>;
+		mac-address-increment = <(-1)>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
diff --git a/target/linux/ath79/dts/ar7242_meraki_mr12.dts b/target/linux/ath79/dts/ar7242_meraki_mr12.dts
index ea64b947ef..8a19bffe6e 100644
--- a/target/linux/ath79/dts/ar7242_meraki_mr12.dts
+++ b/target/linux/ath79/dts/ar7242_meraki_mr12.dts
@@ -82,7 +82,7 @@
 		reg = <0x0000 0 0 0 0>;
 		qca,no-eeprom;
 		mtd-mac-address = <&config 0x66>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 	};
 };
 
diff --git a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
index 48bf4d159f..b14e70c132 100644
--- a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
+++ b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
@@ -94,8 +94,8 @@
 	status = "okay";
 
 	mtd-mac-address = <&art 0x1002>;
-	mtd-mac-address-increment-byte = <3>;
-	mtd-mac-address-increment = <0x40>;
+	mac-address-increment-byte = <3>;
+	mac-address-increment = <0x40>;
 };
 
 &mdio1 {
diff --git a/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi b/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi
index 3f20843b08..261657312b 100644
--- a/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi
+++ b/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi
@@ -25,7 +25,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 
 	gmac-config {
 		device = <&gmac>;
@@ -39,7 +39,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &pinmux {
diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi
index 7d2cbeb95c..9207a0fde0 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr710n.dtsi
@@ -61,7 +61,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &usb {
diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi
index e460e4cd23..248a2b646e 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi
@@ -122,7 +122,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 
 	gmac-config {
 		device = <&gmac>;
@@ -136,7 +136,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &wmac {
diff --git a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts
index 1d742a785d..f822c69aee 100644
--- a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts
+++ b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts
@@ -134,7 +134,7 @@
 
 	phy-handle = <&swphy0>;
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/ar9341_tplink.dtsi b/target/linux/ath79/dts/ar9341_tplink.dtsi
index 26410bcc11..0f6e0bc114 100644
--- a/target/linux/ath79/dts/ar9341_tplink.dtsi
+++ b/target/linux/ath79/dts/ar9341_tplink.dtsi
@@ -82,7 +82,7 @@
 	phy-handle = <&swphy0>;
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts
index fae3eec786..2f87194375 100644
--- a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts
+++ b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts
@@ -107,7 +107,7 @@
 		reg = <0x0000 0 0 0 0>;
 
 		mtd-mac-address = <&hw_info 0x0>;
-		mtd-mac-address-increment = <2>;
+		mac-address-increment = <2>;
 	};
 };
 
@@ -161,7 +161,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&hw_info 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &nand {
diff --git a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi
index 9424e48654..b61ab75ae8 100644
--- a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi
+++ b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi
@@ -131,7 +131,7 @@
 	pll-data = <0x02000000 0x00000101 0x00001616>;
 
 	mtd-mac-address = <&art 0x1002>;
-	mtd-mac-address-increment = <2>;
+	mac-address-increment = <2>;
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
diff --git a/target/linux/ath79/dts/ar9344_engenius_eap600.dts b/target/linux/ath79/dts/ar9344_engenius_eap600.dts
index c6961f636e..b25e3be17f 100644
--- a/target/linux/ath79/dts/ar9344_engenius_eap600.dts
+++ b/target/linux/ath79/dts/ar9344_engenius_eap600.dts
@@ -30,7 +30,7 @@
 
 &eth0 {
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <(-2)>;
+	mac-address-increment = <(-2)>;
 };
 
 &pcie {
@@ -41,5 +41,5 @@
 
 &wmac {
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
diff --git a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts
index 13167adc4d..6c7a99c477 100644
--- a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts
+++ b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts
@@ -30,11 +30,11 @@
 &pcie {
 	wifi at 0,0,0 {
 		mtd-mac-address = <&art 0x0>;
-		mtd-mac-address-increment = <(-2)>;
+		mac-address-increment = <(-2)>;
 	};
 };
 
 &wmac {
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
diff --git a/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi b/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi
index ff532733b6..6a7af59147 100644
--- a/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi
+++ b/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi
@@ -114,7 +114,7 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &pcie {
@@ -125,6 +125,6 @@
 		reg = <0x0000 0 0 0 0>;
 		qca,no-eeprom;
 		mtd-mac-address = <&art 0x0>;
-		mtd-mac-address-increment = <8>;
+		mac-address-increment = <8>;
 	};
 };
diff --git a/target/linux/ath79/dts/ar9344_pcs_cap324.dts b/target/linux/ath79/dts/ar9344_pcs_cap324.dts
index 3ce8bb58fc..4125a40269 100644
--- a/target/linux/ath79/dts/ar9344_pcs_cap324.dts
+++ b/target/linux/ath79/dts/ar9344_pcs_cap324.dts
@@ -119,7 +119,7 @@
 		compatible = "168c,0030";
 		reg = <0x0000 0 0 0 0>;
 		mtd-mac-address = <&art 0x0>;
-		mtd-mac-address-increment = <(-2)>;
+		mac-address-increment = <(-2)>;
 		mtd-cal-data = <&art 0x5000>;
 		qca,no-eeprom;
 		qca,disable-5ghz;
@@ -134,7 +134,7 @@
 	qca,disable-2ghz;
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &mdio0 {
diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts
index 61389be127..366a0f720a 100644
--- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts
+++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts
@@ -25,7 +25,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&pridata 0x400>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts
index e232cdab24..994b842f34 100644
--- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts
+++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts
@@ -25,7 +25,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&pridata 0x400>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/ar9344_samsung_wam250.dts b/target/linux/ath79/dts/ar9344_samsung_wam250.dts
index 0f38ff82ee..bca757e77f 100644
--- a/target/linux/ath79/dts/ar9344_samsung_wam250.dts
+++ b/target/linux/ath79/dts/ar9344_samsung_wam250.dts
@@ -67,7 +67,7 @@
 	phy-handle = <&swphy0>;
 
 	mtd-mac-address = <&art 0x1002>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 
 	gmac-config {
 		device = <&gmac>;
diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts b/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts
index eb9606e58b..22c2163fec 100644
--- a/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts
+++ b/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts
@@ -165,7 +165,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&config 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts b/target/linux/ath79/dts/ar9344_teltonika_rut955.dts
index ba840a05d3..28dbb74511 100644
--- a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts
+++ b/target/linux/ath79/dts/ar9344_teltonika_rut955.dts
@@ -164,7 +164,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&config 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi
index d9c66d2745..53fe69ae00 100644
--- a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi
+++ b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi
@@ -148,7 +148,7 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&config 0x0>;
-	mtd-mac-address-increment = <2>;
+	mac-address-increment = <2>;
 };
 
 &pinmux {
diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
index 59a06346ae..e8f9672b58 100644
--- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
+++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
@@ -58,7 +58,7 @@
 
 &ath9k {
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &wmac {
@@ -69,7 +69,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 
 	gmac-config {
 		device = <&gmac>;
@@ -84,5 +84,5 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <2>;
+	mac-address-increment = <2>;
 };
diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
index 21fd079e1a..f8b4d0385a 100644
--- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
+++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
@@ -85,7 +85,7 @@
 
 &wmac {
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &mdio0 {
diff --git a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
index 72cd5aab49..87bbd206b2 100644
--- a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
+++ b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
@@ -142,7 +142,7 @@
 		reg = <0x0000 0 0 0 0>;
 		qca,no-eeprom;
 		mtd-mac-address = <&addr 0x0>;
-		mtd-mac-address-increment = <0x10>;
+		mac-address-increment = <0x10>;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
@@ -198,7 +198,7 @@
 	pll-data = <0xe000000 0x04000101 0x04001313>;
 
 	mtd-mac-address = <&addr 0x0>;
-	mtd-mac-address-increment = <0x21>;
+	mac-address-increment = <0x21>;
 
 	phy-mode = "rgmii-rxid";
 	phy-handle = <&phy4>;
diff --git a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts
index 40eabd0488..4f0e371c22 100644
--- a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts
+++ b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts
@@ -107,12 +107,12 @@
 
 &eth0 {
 	mtd-mac-address = <&art 0x1002>;
-	mtd-mac-address-increment = <(-2)>;
+	mac-address-increment = <(-2)>;
 };
 
 &eth1 {
 	mtd-mac-address = <&art 0x1002>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &pcie0 {
diff --git a/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts b/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts
index 42f2c9ffe5..4288e92fcd 100644
--- a/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts
+++ b/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts
@@ -46,7 +46,7 @@
 
 &eth0 {
 	mtd-mac-address = <&art 0x1002>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts
index ab65369246..1effb4485b 100644
--- a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts
+++ b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts
@@ -51,7 +51,7 @@
 
 &eth0 {
 	mtd-mac-address = <&art 0x1002>;
-	mtd-mac-address-increment = <(-2)>;
+	mac-address-increment = <(-2)>;
 };
 
 &eth1 {
@@ -60,7 +60,7 @@
 	compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
 
 	mtd-mac-address = <&art 0x1002>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &gpio_export {
diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts
index a7ea34eeb0..634d20015d 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts
@@ -151,7 +151,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
@@ -163,5 +163,5 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <10>;
+	mac-address-increment = <10>;
 };
diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts
index edb6bbe5f3..f67a8cbb72 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts
@@ -110,7 +110,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
@@ -122,5 +122,5 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <3>;
+	mac-address-increment = <3>;
 };
diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts b/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts
index 6ae2e4eb54..44c85b62e1 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts
@@ -122,5 +122,5 @@
 	mtd-cal-data = <&art 0x1000>;
 
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <10>;
+	mac-address-increment = <10>;
 };
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
index d0b0d88c48..3b20fa51ab 100644
--- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
@@ -151,7 +151,7 @@
 
 &eth1 {
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &wmac {
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
index 24dc8aaf6a..80623085f0 100644
--- a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
@@ -134,7 +134,7 @@
 
 &eth1 {
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &wmac {
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts
index c755e00033..8cb611c11d 100644
--- a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts
@@ -123,7 +123,7 @@
 
 &eth1 {
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &wmac {
diff --git a/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi b/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi
index 7c6ed9f4fe..6423ae0272 100644
--- a/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi
+++ b/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi
@@ -96,7 +96,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&pridata 0x400>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
index 9a39001935..1113c51be5 100644
--- a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
+++ b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
@@ -147,7 +147,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&romfile 0xf100>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts
index 0e2c158260..4c730375a6 100644
--- a/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts
+++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts
@@ -172,7 +172,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
index 82a73d301d..47d9e0846a 100644
--- a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
+++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
@@ -129,12 +129,12 @@
 	phy-handle = <&swphy0>;
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &wmac {
diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
index 69445df741..a769a81d58 100644
--- a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
+++ b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
@@ -148,7 +148,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&info 0x8>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi b/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi
index 53eb08b253..e38fc9378a 100644
--- a/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi
+++ b/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi
@@ -149,5 +149,5 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <2>;
+	mac-address-increment = <2>;
 };
diff --git a/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi b/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi
index c506c849f9..6df843f143 100644
--- a/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi
+++ b/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi
@@ -124,7 +124,7 @@
 	compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
 
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &wmac {
@@ -132,5 +132,5 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <2>;
+	mac-address-increment = <2>;
 };
diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi
index fb034195ec..1835cbcb96 100644
--- a/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi
@@ -74,7 +74,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi
index 4166686795..df68a56d47 100644
--- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi
@@ -109,7 +109,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts
index db99f70b36..cb93afa233 100644
--- a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts
@@ -149,7 +149,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi b/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi
index ab8ac92426..27d9681ead 100644
--- a/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi
+++ b/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi
@@ -91,7 +91,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts b/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts
index 80298a9d82..0b006bcffb 100644
--- a/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts
+++ b/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts
@@ -90,5 +90,5 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
diff --git a/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts b/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts
index 5da50ff6d9..9a45bd4277 100644
--- a/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts
+++ b/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts
@@ -100,7 +100,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 
 	phy-handle = <&phy2>;
 
diff --git a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
index 973cb16efb..3b9e25e3e8 100644
--- a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
+++ b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
@@ -90,5 +90,6 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
+	qca-no-eeprom;
 };
diff --git a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi
index e4bb6c25e5..81c2c0866f 100644
--- a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi
+++ b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi
@@ -199,7 +199,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 
 	fixed-link {
diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts
index 9e38a9f392..85617cc809 100644
--- a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts
+++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts
@@ -59,7 +59,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&art 0x00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 
 	phy-handle = <&phy1>;
 	pll-data = <0x03000101 0x00000101 0x00001313>;
diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts
index 0a1c9cb6dd..895398e358 100644
--- a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts
+++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts
@@ -94,7 +94,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&art 0x00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 
 	phy-handle = <&phy1>;
 	pll-data = <0x03000101 0x00000101 0x00001313>;
diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi
index 7ae33c3e04..ba7f014e6a 100644
--- a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi
+++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi
@@ -114,5 +114,5 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&art 0x00>;
-	mtd-mac-address-increment = <(-2)>;
+	mac-address-increment = <(-2)>;
 };
diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi b/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi
index f4eed22460..fa379030e7 100644
--- a/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi
+++ b/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi
@@ -157,7 +157,7 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &pcie0 {
diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts b/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts
index f7889b00cc..6704fbbe81 100644
--- a/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts
+++ b/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts
@@ -20,6 +20,6 @@
 		compatible = "pci168c,0033";
 		reg = <0x0000 0 0 0 0>;
 		mtd-mac-address = <&art 0x0>;
-		mtd-mac-address-increment = <16>;
+		mac-address-increment = <16>;
 	};
 };
diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts b/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts
index 1f54d2134a..7221b5b098 100644
--- a/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts
+++ b/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts
@@ -20,6 +20,6 @@
 		compatible = "pci168c,0033";
 		reg = <0x0000 0 0 0 0>;
 		mtd-mac-address = <&art 0x0>;
-		mtd-mac-address-increment = <16>;
+		mac-address-increment = <16>;
 	};
 };
diff --git a/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi b/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi
index 21946c42b2..e1c44af3f7 100644
--- a/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi
+++ b/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi
@@ -128,7 +128,7 @@
 	phy-handle = <&phy0>;
 
 	mtd-mac-address = <&pridata 0x400>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi b/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi
index 52cbb5d016..3f965f5b95 100644
--- a/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi
+++ b/target/linux/ath79/dts/qca9558_tplink_archer-c.dtsi
@@ -150,7 +150,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 	phy-handle = <&phy0>;
 	pll-data = <0x56000000 0x00000101 0x00001616>;
 
diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts b/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts
index fd1717b668..90332f1874 100644
--- a/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts
+++ b/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts
@@ -71,7 +71,7 @@
 
 &eth0 {
 	mtd-mac-address = <&romfs 0xf100>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts b/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts
index d2ef7e82a7..754cb17918 100644
--- a/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts
+++ b/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts
@@ -65,7 +65,7 @@
 
 &eth0 {
 	mtd-mac-address = <&romfs 0xf100>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
index 6c487f15be..b12b547a7f 100644
--- a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
+++ b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
@@ -166,5 +166,5 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&info 0x8>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts
index 0099592dc1..10d6e6040b 100644
--- a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts
+++ b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts
@@ -97,7 +97,7 @@
 		compatible = "pci168c,0033";
 		reg = <0x0000 0 0 0 0>;
 		mtd-mac-address = <&uboot 0x1fc00>;
-		mtd-mac-address-increment = <(-2)>;
+		mac-address-increment = <(-2)>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
@@ -191,7 +191,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 	phy-handle = <&phy0>;
 	pll-data = <0x56000000 0x00000101 0x00001616>;
 
@@ -218,5 +218,5 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi
index 959d5c35fb..8f2b626bad 100644
--- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi
+++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi
@@ -146,7 +146,7 @@
 	pll-data = <0x56000000 0x00000101 0x00001616>;
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 	phy-handle = <&phy0>;
 };
 
diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts
index bf744f1087..66a578305d 100644
--- a/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts
+++ b/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts
@@ -179,7 +179,7 @@
 	status = "okay";
 
 	mtd-mac-address = <&info 0x8>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &wmac {
diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi
index 664032936c..673805e132 100644
--- a/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi
+++ b/target/linux/ath79/dts/qca9561_tplink_archer-c5x.dtsi
@@ -127,7 +127,7 @@
 	phy-handle = <&swphy0>;
 
 	mtd-mac-address = <&info 0x8>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 
 	gmac-config {
 		device = <&gmac>;
diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi b/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi
index 75d3816b72..5c5d1620b9 100644
--- a/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi
+++ b/target/linux/ath79/dts/qca9561_tplink_archer-c6x.dtsi
@@ -73,7 +73,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&info 0x8>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts b/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts
index 821f125c20..6693a5cd73 100644
--- a/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts
+++ b/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts
@@ -134,5 +134,5 @@
 
 	mtd-cal-data = <&art 0x1000>;
 	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
diff --git a/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi b/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi
index 78eb0fe219..044485316c 100644
--- a/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi
+++ b/target/linux/ath79/dts/qca9563_elecom_wrc-ghbk2-i.dtsi
@@ -106,7 +106,7 @@
 	pll-data = <0x03000101 0x00000101 0x00001919>;
 
 	mtd-mac-address = <&art 0x1002>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
 };
diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi
index 5c897b16a0..c1c553e8c8 100644
--- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi
+++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi
@@ -64,5 +64,5 @@
 
 &eth1 {
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi
index 31079123c5..14e10596b5 100644
--- a/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi
+++ b/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi
@@ -51,7 +51,7 @@
 	phy-handle = <&swphy4>;
 
 	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &eth1 {
diff --git a/target/linux/generic/pending-5.10/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
similarity index 75%
rename from target/linux/generic/pending-5.10/681-NET-add-of_get_mac_address_mtd.patch
rename to target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
index 71fbfe9978..44a6b6a047 100644
--- a/target/linux/generic/pending-5.10/681-NET-add-of_get_mac_address_mtd.patch
+++ b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
@@ -1,5 +1,7 @@
-From: John Crispin <blogic at openwrt.org>
-Subject: NET: add mtd-mac-address support to of_get_mac_address()
+From 6f8e5369ae054ec6c9265581d5a7e39738a5cd84 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Tue, 30 Mar 2021 13:16:38 +0200
+Subject: [PATCH 1/2] NET: add mtd-mac-address support to of_get_mac_address()
 
 Many embedded devices have information such as mac addresses stored inside mtd
 devices. This patch allows us to add a property inside a node describing a
@@ -8,11 +10,13 @@ where the mac address can be found.
 
 Signed-off-by: John Crispin <blogic at openwrt.org>
 Signed-off-by: Felix Fietkau <nbd at nbd.name>
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 ---
- drivers/of/of_net.c    |   37 +++++++++++++++++++++++++++++++++++++
- include/linux/of_net.h |    1 +
- 2 files changed, 38 insertions(+)
+ drivers/of/of_net.c | 75 ++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 74 insertions(+), 1 deletion(-)
 
+diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
+index 6e411821583e..f072e2509cc9 100644
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
 @@ -11,6 +11,7 @@
@@ -23,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  /**
   * of_get_phy_mode - Get phy mode for given device_node
-@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node *
+@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node *np, phy_interface_t *interface)
  }
  EXPORT_SYMBOL_GPL(of_get_phy_mode);
  
@@ -32,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  {
  	struct property *pp = of_find_property(np, name, NULL);
  
-@@ -78,6 +79,79 @@ static const void *of_get_mac_addr_nvmem
+@@ -78,6 +79,70 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
  	return mac;
  }
  
@@ -47,10 +51,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +	const char *part;
 +	const __be32 *list;
 +	phandle phandle;
-+	u32 mac_inc = 0;
 +	u8 mac[ETH_ALEN];
 +	void *addr;
-+	u32 inc_idx;
 +
 +	list = of_get_property(np, "mtd-mac-address", &size);
 +	if (!list || (size != (2 * sizeof(*list))))
@@ -74,14 +76,6 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +	ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, mac);
 +	put_mtd_device(mtd);
 +
-+	if (of_property_read_u32(np, "mtd-mac-address-increment-byte", &inc_idx))
-+		inc_idx = 5;
-+	if (inc_idx > 5)
-+		return NULL;
-+
-+	if (!of_property_read_u32(np, "mtd-mac-address-increment", &mac_inc))
-+		mac[inc_idx] += mac_inc;
-+
 +	if (!is_valid_ether_addr(mac))
 +		return NULL;
 +
@@ -108,11 +102,12 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +#endif
 +	return NULL;
 +}
++
 +
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
   * checked first, because that is supposed to contain to "most recent" MAC
-@@ -98,12 +172,20 @@ static const void *of_get_mac_addr_nvmem
+@@ -98,6 +163,10 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
   *
@@ -123,13 +118,17 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   * Return: Will be a valid pointer on success and ERR_PTR in case of error.
  */
  const void *of_get_mac_address(struct device_node *np)
- {
- 	const void *addr;
+@@ -116,6 +185,10 @@ const void *of_get_mac_address(struct device_node *np)
+ 	if (addr)
+ 		return addr;
  
 +	addr = of_get_mac_address_mtd(np);
 +	if (addr)
 +		return addr;
 +
- 	addr = of_get_mac_addr(np, "mac-address");
- 	if (addr)
- 		return addr;
+ 	return of_get_mac_addr_nvmem(np);
+ }
+ EXPORT_SYMBOL(of_get_mac_address);
+-- 
+2.30.2
+
diff --git a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
new file mode 100644
index 0000000000..1c08e23699
--- /dev/null
+++ b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
@@ -0,0 +1,133 @@
+From 639dba857aa554f2a78572adc4cf3c32de9ec2e2 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Tue, 30 Mar 2021 18:21:14 +0200
+Subject: [PATCH 2/2] of_net: add mac-address-increment support
+
+Lots of embedded devices use the mac-address of other interface
+extracted from nvmem cells and increments it by one or two. Add two
+bindings to integrate this and directly use the right mac-address for
+the interface. Some example are some routers that use the gmac
+mac-address stored in the art partition and increments it by one for the
+wifi. mac-address-increment-byte bindings is used to tell what byte of
+the mac-address has to be increased (if not defined the last byte is
+increased) and mac-address-increment tells how much the byte decided
+early has to be increased.
+
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
+---
+ drivers/of/of_net.c | 59 ++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 45 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
+index f072e2509cc9..0dbd1f7ef396 100644
+--- a/drivers/of/of_net.c
++++ b/drivers/of/of_net.c
+@@ -55,31 +55,36 @@ static void *of_get_mac_addr(struct device_node *np, const char *name)
+ 	return NULL;
+ }
+ 
+-static const void *of_get_mac_addr_nvmem(struct device_node *np)
++static void *of_get_mac_addr_nvmem(struct device_node *np, int *err)
+ {
+ 	int ret;
+-	const void *mac;
++	void *mac;
+ 	u8 nvmem_mac[ETH_ALEN];
+ 	struct platform_device *pdev = of_find_device_by_node(np);
+ 
+-	if (!pdev)
+-		return ERR_PTR(-ENODEV);
++	if (!pdev) {
++		*err = -ENODEV;
++		return NULL;
++	}
+ 
+ 	ret = nvmem_get_mac_address(&pdev->dev, &nvmem_mac);
+ 	if (ret) {
+ 		put_device(&pdev->dev);
+-		return ERR_PTR(ret);
++		*err = ret;
++		return NULL;
+ 	}
+ 
+ 	mac = devm_kmemdup(&pdev->dev, nvmem_mac, ETH_ALEN, GFP_KERNEL);
+ 	put_device(&pdev->dev);
+-	if (!mac)
+-		return ERR_PTR(-ENOMEM);
++	if (!mac) {
++		*err = -ENOMEM;
++		return NULL;
++	}
+ 
+ 	return mac;
+ }
+ 
+-static const void *of_get_mac_address_mtd(struct device_node *np)
++static void *of_get_mac_address_mtd(struct device_node *np)
+ {
+ #ifdef CONFIG_MTD
+ 	struct device_node *mtd_np = NULL;
+@@ -167,28 +172,54 @@ static const void *of_get_mac_address_mtd(struct device_node *np)
+  * If a mtd-mac-address property exists, try to fetch the MAC address from the
+  * specified mtd device, and store it as a 'mac-address' property
+  *
++ * DT can tell the system to increment the mac-address after is extracted by
++ * using:
++ * - mac-address-increment-byte to decide what byte to increase
++ *   (if not defined is increased the last byte)
++ * - mac-address-increment to decide how much to increase. The value will
++ *   not overflow to other bytes if the increment is over 255.
++ *   (example 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00)
++ *
+  * Return: Will be a valid pointer on success and ERR_PTR in case of error.
+ */
+ const void *of_get_mac_address(struct device_node *np)
+ {
+-	const void *addr;
++	u32 inc_idx, mac_inc;
++	int ret = 0;
++	u8 *addr;
++
++	/* Check first if the increment byte is present and valid.
++	 * If not set assume to increment the last byte if found.
++	 */
++	if (of_property_read_u32(np, "mac-address-increment-byte", &inc_idx))
++		inc_idx = 5;
++	if (inc_idx < 3 || inc_idx > 5)
++		return ERR_PTR(-EINVAL);
+ 
+ 	addr = of_get_mac_addr(np, "mac-address");
+ 	if (addr)
+-		return addr;
++		goto found;
+ 
+ 	addr = of_get_mac_addr(np, "local-mac-address");
+ 	if (addr)
+-		return addr;
++		goto found;
+ 
+ 	addr = of_get_mac_addr(np, "address");
+ 	if (addr)
+-		return addr;
++		goto found;
+ 
+ 	addr = of_get_mac_address_mtd(np);
+ 	if (addr)
+-		return addr;
++		goto found;
++
++	addr = of_get_mac_addr_nvmem(np, &ret);
++	if (ret)
++		return ERR_PTR(ret);
++
++found:
++	if (!of_property_read_u32(np, "mac-address-increment", &mac_inc))
++		addr[inc_idx] += mac_inc;
+ 
+-	return of_get_mac_addr_nvmem(np);
++	return addr;
+ }
+ EXPORT_SYMBOL(of_get_mac_address);
+-- 
+2.30.2
+
diff --git a/target/linux/generic/pending-5.4/681-NET-add-of_get_mac_address_mtd.patch b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
similarity index 75%
rename from target/linux/generic/pending-5.4/681-NET-add-of_get_mac_address_mtd.patch
rename to target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
index b02febefd8..44a6b6a047 100644
--- a/target/linux/generic/pending-5.4/681-NET-add-of_get_mac_address_mtd.patch
+++ b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
@@ -1,5 +1,7 @@
-From: John Crispin <blogic at openwrt.org>
-Subject: NET: add mtd-mac-address support to of_get_mac_address()
+From 6f8e5369ae054ec6c9265581d5a7e39738a5cd84 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Tue, 30 Mar 2021 13:16:38 +0200
+Subject: [PATCH 1/2] NET: add mtd-mac-address support to of_get_mac_address()
 
 Many embedded devices have information such as mac addresses stored inside mtd
 devices. This patch allows us to add a property inside a node describing a
@@ -8,11 +10,13 @@ where the mac address can be found.
 
 Signed-off-by: John Crispin <blogic at openwrt.org>
 Signed-off-by: Felix Fietkau <nbd at nbd.name>
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 ---
- drivers/of/of_net.c    |   37 +++++++++++++++++++++++++++++++++++++
- include/linux/of_net.h |    1 +
- 2 files changed, 38 insertions(+)
+ drivers/of/of_net.c | 75 ++++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 74 insertions(+), 1 deletion(-)
 
+diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
+index 6e411821583e..f072e2509cc9 100644
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
 @@ -11,6 +11,7 @@
@@ -23,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  /**
   * of_get_phy_mode - Get phy mode for given device_node
-@@ -39,7 +40,7 @@ int of_get_phy_mode(struct device_node *
+@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node *np, phy_interface_t *interface)
  }
  EXPORT_SYMBOL_GPL(of_get_phy_mode);
  
@@ -32,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  {
  	struct property *pp = of_find_property(np, name, NULL);
  
-@@ -72,6 +73,79 @@ static const void *of_get_mac_addr_nvmem
+@@ -78,6 +79,70 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
  	return mac;
  }
  
@@ -47,10 +51,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +	const char *part;
 +	const __be32 *list;
 +	phandle phandle;
-+	u32 mac_inc = 0;
 +	u8 mac[ETH_ALEN];
 +	void *addr;
-+	u32 inc_idx;
 +
 +	list = of_get_property(np, "mtd-mac-address", &size);
 +	if (!list || (size != (2 * sizeof(*list))))
@@ -74,14 +76,6 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +	ret = mtd_read(mtd, be32_to_cpup(list), 6, &retlen, mac);
 +	put_mtd_device(mtd);
 +
-+	if (of_property_read_u32(np, "mtd-mac-address-increment-byte", &inc_idx))
-+		inc_idx = 5;
-+	if (inc_idx > 5)
-+		return NULL;
-+
-+	if (!of_property_read_u32(np, "mtd-mac-address-increment", &mac_inc))
-+		mac[inc_idx] += mac_inc;
-+
 +	if (!is_valid_ether_addr(mac))
 +		return NULL;
 +
@@ -108,11 +102,12 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +#endif
 +	return NULL;
 +}
++
 +
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
   * checked first, because that is supposed to contain to "most recent" MAC
-@@ -92,12 +166,20 @@ static const void *of_get_mac_addr_nvmem
+@@ -98,6 +163,10 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
   *
@@ -123,13 +118,17 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   * Return: Will be a valid pointer on success and ERR_PTR in case of error.
  */
  const void *of_get_mac_address(struct device_node *np)
- {
- 	const void *addr;
+@@ -116,6 +185,10 @@ const void *of_get_mac_address(struct device_node *np)
+ 	if (addr)
+ 		return addr;
  
 +	addr = of_get_mac_address_mtd(np);
 +	if (addr)
 +		return addr;
 +
- 	addr = of_get_mac_addr(np, "mac-address");
- 	if (addr)
- 		return addr;
+ 	return of_get_mac_addr_nvmem(np);
+ }
+ EXPORT_SYMBOL(of_get_mac_address);
+-- 
+2.30.2
+
diff --git a/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
new file mode 100644
index 0000000000..1c08e23699
--- /dev/null
+++ b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
@@ -0,0 +1,133 @@
+From 639dba857aa554f2a78572adc4cf3c32de9ec2e2 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Tue, 30 Mar 2021 18:21:14 +0200
+Subject: [PATCH 2/2] of_net: add mac-address-increment support
+
+Lots of embedded devices use the mac-address of other interface
+extracted from nvmem cells and increments it by one or two. Add two
+bindings to integrate this and directly use the right mac-address for
+the interface. Some example are some routers that use the gmac
+mac-address stored in the art partition and increments it by one for the
+wifi. mac-address-increment-byte bindings is used to tell what byte of
+the mac-address has to be increased (if not defined the last byte is
+increased) and mac-address-increment tells how much the byte decided
+early has to be increased.
+
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
+---
+ drivers/of/of_net.c | 59 ++++++++++++++++++++++++++++++++++-----------
+ 1 file changed, 45 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
+index f072e2509cc9..0dbd1f7ef396 100644
+--- a/drivers/of/of_net.c
++++ b/drivers/of/of_net.c
+@@ -55,31 +55,36 @@ static void *of_get_mac_addr(struct device_node *np, const char *name)
+ 	return NULL;
+ }
+ 
+-static const void *of_get_mac_addr_nvmem(struct device_node *np)
++static void *of_get_mac_addr_nvmem(struct device_node *np, int *err)
+ {
+ 	int ret;
+-	const void *mac;
++	void *mac;
+ 	u8 nvmem_mac[ETH_ALEN];
+ 	struct platform_device *pdev = of_find_device_by_node(np);
+ 
+-	if (!pdev)
+-		return ERR_PTR(-ENODEV);
++	if (!pdev) {
++		*err = -ENODEV;
++		return NULL;
++	}
+ 
+ 	ret = nvmem_get_mac_address(&pdev->dev, &nvmem_mac);
+ 	if (ret) {
+ 		put_device(&pdev->dev);
+-		return ERR_PTR(ret);
++		*err = ret;
++		return NULL;
+ 	}
+ 
+ 	mac = devm_kmemdup(&pdev->dev, nvmem_mac, ETH_ALEN, GFP_KERNEL);
+ 	put_device(&pdev->dev);
+-	if (!mac)
+-		return ERR_PTR(-ENOMEM);
++	if (!mac) {
++		*err = -ENOMEM;
++		return NULL;
++	}
+ 
+ 	return mac;
+ }
+ 
+-static const void *of_get_mac_address_mtd(struct device_node *np)
++static void *of_get_mac_address_mtd(struct device_node *np)
+ {
+ #ifdef CONFIG_MTD
+ 	struct device_node *mtd_np = NULL;
+@@ -167,28 +172,54 @@ static const void *of_get_mac_address_mtd(struct device_node *np)
+  * If a mtd-mac-address property exists, try to fetch the MAC address from the
+  * specified mtd device, and store it as a 'mac-address' property
+  *
++ * DT can tell the system to increment the mac-address after is extracted by
++ * using:
++ * - mac-address-increment-byte to decide what byte to increase
++ *   (if not defined is increased the last byte)
++ * - mac-address-increment to decide how much to increase. The value will
++ *   not overflow to other bytes if the increment is over 255.
++ *   (example 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00)
++ *
+  * Return: Will be a valid pointer on success and ERR_PTR in case of error.
+ */
+ const void *of_get_mac_address(struct device_node *np)
+ {
+-	const void *addr;
++	u32 inc_idx, mac_inc;
++	int ret = 0;
++	u8 *addr;
++
++	/* Check first if the increment byte is present and valid.
++	 * If not set assume to increment the last byte if found.
++	 */
++	if (of_property_read_u32(np, "mac-address-increment-byte", &inc_idx))
++		inc_idx = 5;
++	if (inc_idx < 3 || inc_idx > 5)
++		return ERR_PTR(-EINVAL);
+ 
+ 	addr = of_get_mac_addr(np, "mac-address");
+ 	if (addr)
+-		return addr;
++		goto found;
+ 
+ 	addr = of_get_mac_addr(np, "local-mac-address");
+ 	if (addr)
+-		return addr;
++		goto found;
+ 
+ 	addr = of_get_mac_addr(np, "address");
+ 	if (addr)
+-		return addr;
++		goto found;
+ 
+ 	addr = of_get_mac_address_mtd(np);
+ 	if (addr)
+-		return addr;
++		goto found;
++
++	addr = of_get_mac_addr_nvmem(np, &ret);
++	if (ret)
++		return ERR_PTR(ret);
++
++found:
++	if (!of_property_read_u32(np, "mac-address-increment", &mac_inc))
++		addr[inc_idx] += mac_inc;
+ 
+-	return of_get_mac_addr_nvmem(np);
++	return addr;
+ }
+ EXPORT_SYMBOL(of_get_mac_address);
+-- 
+2.30.2
+
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
index af0efb2565..bbecdb7f0c 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
@@ -289,7 +289,7 @@
 	pinctrl-names = "default";
 
 	mtd-mac-address = <&defaultmac 0x8>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 
 	fixed-link {
 		speed = <1000>;
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
index 893addf240..79b22ff0c3 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
@@ -324,7 +324,7 @@
 	pinctrl-names = "default";
 
 	mtd-mac-address = <&defaultmac 0>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 
 	fixed-link {
 		speed = <1000>;
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
index 55291cd531..9444235173 100644
--- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
+++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
@@ -426,7 +426,7 @@
 			reg = <0x00010000 0 0 0 0>;
 
 			mtd-mac-address = <&art 6>;
-			mtd-mac-address-increment = <(1)>;
+			mac-address-increment = <(1)>;
 		};
 	};
 };
@@ -446,7 +446,7 @@
 			reg = <0x00010000 0 0 0 0>;
 
 			mtd-mac-address = <&art 6>;
-			mtd-mac-address-increment = <(2)>;
+			mac-address-increment = <(2)>;
 		};
 	};
 };
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
index 4a4a06514f..19cb54db6b 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
@@ -97,7 +97,7 @@
 	phy-mode = "rmii";
 	phy-handle = <&phy0>;
 	mtd-mac-address = <&ath9k_cal 0xa91>;
-	mtd-mac-address-increment = <(-2)>;
+	mac-address-increment = <(-2)>;
 
 	mdio-bus {
 		#address-cells = <1>;
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
index 5f38936577..4d7986f0a5 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
@@ -98,7 +98,7 @@
 &gsw {
 	phy-mode = "mii";
 	mtd-mac-address = <&ath9k_cal 0xa91>;
-	mtd-mac-address-increment = <(-2)>;
+	mac-address-increment = <(-2)>;
 };
 
 &gpio {
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts
index 87954fef02..f0b288c6ba 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts
@@ -155,6 +155,6 @@
 		ralink,mtd-eeprom = <&boardconfig 0x410>;
 		ralink,mtd-eeprom-swap;
 		mtd-mac-address = <&boardconfig 0x16>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 	};
 };
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
index f2592961cb..ca0cf107dd 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
@@ -213,7 +213,7 @@
 		reg = <0x7000 0 0 0 0>;
 		qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
 		mtd-mac-address = <&boardconfig 0x16>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 	};
 };
 
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts
index 5986279e6e..3b9f6c2461 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts
@@ -160,7 +160,7 @@
 		reg = <0x7000 0 0 0 0>;
 		qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
 		mtd-mac-address = <&art 0x16>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 	};
 };
 
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi
index 8faf335c02..7a277892bb 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi
@@ -220,7 +220,7 @@
 		ralink,mtd-eeprom = <&boardconfig 0x410>;
 		ralink,mtd-eeprom-swap;
 		mtd-mac-address = <&boardconfig 0x16>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 	};
 };
 
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi
index 7c3ab53d73..c8dd817b6c 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi
@@ -128,7 +128,7 @@
 
 &eth0 {
 	mtd-mac-address = <&boardconfig 0x16>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &gphy0 {
@@ -239,7 +239,7 @@
 		ralink,mtd-eeprom = <&boardconfig 0x410>;
 		ralink,mtd-eeprom-swap;
 		mtd-mac-address = <&boardconfig 0x16>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 	};
 };
 
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
index dafff26f1b..d91dc74e2f 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_avm_fritz736x.dtsi
@@ -82,7 +82,7 @@
 
 &eth0 {
 	mtd-mac-address = <&urlader 0xa91>;
-	mtd-mac-address-increment = <(-2)>;
+	mac-address-increment = <(-2)>;
 };
 
 &gphy0 {
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
index 10389e539f..7749410816 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
@@ -204,7 +204,7 @@
 			qca,no-eeprom;
 			qca,disable-5ghz;
 			mtd-mac-address = <&ath9k_cal 0xf100>;
-			mtd-mac-address-increment = <2>;
+			mac-address-increment = <2>;
 		};
 	};
 };
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi
index d3d8907860..67edc01d90 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi
@@ -192,7 +192,7 @@
 			big-endian;
 			ieee80211-freq-limit = <5000000 6000000>;
 			mtd-mac-address = <&romfile 0xf100>;
-			mtd-mac-address-increment = <2>;
+			mac-address-increment = <2>;
 		};
 	};
 };
diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts
index 3ca132d0c0..10bb353683 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts
@@ -177,7 +177,7 @@
 			phy-handle = <&phy1>;
 			phy-connection-type = "rgmii-id";
 			mtd-mac-address = <&hwinfo 0>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 
 		gpio0: gpio-controller at fc00 {
diff --git a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi
index 7d4c7f0de9..7a4d2e6683 100644
--- a/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi
+++ b/target/linux/octeon/files/arch/mips/boot/dts/cavium-octeon/cn7130_ubnt_edgerouter-e300.dtsi
@@ -181,7 +181,7 @@
 			phy-mode = "sgmii";
 			phy-handle = <&phy5>;
 			mtd-mac-address = <&eeprom 0>;
-			mtd-mac-address-increment = <(1)>;
+			mac-address-increment = <(1)>;
 		};
 
 		ethernet at 2 {
@@ -190,7 +190,7 @@
 			phy-mode = "sgmii";
 			phy-handle = <&phy6>;
 			mtd-mac-address = <&eeprom 0>;
-			mtd-mac-address-increment = <(2)>;
+			mac-address-increment = <(2)>;
 		};
 
 		ethernet at 3 {
@@ -199,7 +199,7 @@
 			phy-mode = "sgmii";
 			phy-handle = <&phy7>;
 			mtd-mac-address = <&eeprom 0>;
-			mtd-mac-address-increment = <(3)>;
+			mac-address-increment = <(3)>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
index 70407449db..b1a50bb711 100644
--- a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
+++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
@@ -154,6 +154,6 @@
 		mediatek,mtd-eeprom = <&factory 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mtd-mac-address = <&factory 0x28>;
-		mtd-mac-address-increment = <2>;
+		mac-address-increment = <2>;
 	};
 };
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
index 774d90c79d..5b8d883dd5 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
@@ -115,7 +115,7 @@
 	mt76x0e at 0,0 {
 		reg = <0x0000 0 0 0 0>;
 		mtd-mac-address = <&config 0xe490>;
-		mtd-mac-address-increment = <(2)>;
+		mac-address-increment = <(2)>;
 		mediatek,mtd-eeprom = <&config 0xe05d>;
 	};
 };
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
index b86ab1449b..2e755b6620 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
@@ -143,7 +143,7 @@
 	wifi at 0,0 {
 		reg = <0x0000 0 0 0 0>;
 		mtd-mac-address = <&config 0xe496>;
-		mtd-mac-address-increment = <(2)>;
+		mac-address-increment = <(2)>;
 		mediatek,mtd-eeprom = <&config 0xe083>;
 
 		led {
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts
index b0dd31cafc..eec4969ff3 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts
@@ -141,7 +141,7 @@
 		reg = <0x0000 0 0 0 0>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mtd-mac-address = <&config 0xe4a8>;
-		mtd-mac-address-increment = <(2)>;
+		mac-address-increment = <(2)>;
 
 		led {
 			led-sources = <2>;
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts
index 4284c61aa2..eed57f7f68 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts
@@ -176,7 +176,7 @@
 		ieee80211-freq-limit = <5000000 6000000>;
 		mediatek,mtd-eeprom = <&config 0xe08e>;
 		mtd-mac-address = <&config 0xe50e>;
-		mtd-mac-address-increment = <2>;
+		mac-address-increment = <2>;
 	};
 };
 
diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
index 41d69d009b..2f882b3b50 100644
--- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
+++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
@@ -141,7 +141,7 @@
 	mt76x0e at 0,0 {
 		reg = <0x0000 0 0 0 0>;
 		mtd-mac-address = <&config 0xe07e>;
-		mtd-mac-address-increment = <(2)>;
+		mac-address-increment = <(2)>;
 		mediatek,mtd-eeprom = <&config 0xe08a>;
 	};
 };
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 184af58d29..cfd55ea221 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
@@ -184,6 +184,6 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		mtd-mac-address = <&rom 0xf100>;
-		mtd-mac-address-increment = <(-1)>;
+		mac-address-increment = <(-1)>;
 	};
 };
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 f7e7d50df7..89f48dc7d3 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
@@ -73,10 +73,10 @@
 	pinctrl-0 = <&pa_pins>;
 
 	mtd-mac-address = <&rom 0xf100>;
-	mtd-mac-address-increment = <(-2)>;
+	mac-address-increment = <(-2)>;
 };
 
 &wifi {
 	mtd-mac-address = <&rom 0xf100>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
index a6c3cea736..c4fb98c467 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
@@ -58,5 +58,5 @@
 
 &wifi {
 	mtd-mac-address = <&rom 0xf100>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
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 d564552ff0..8de87caecc 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
@@ -73,10 +73,10 @@
 	pinctrl-0 = <&pa_pins>;
 
 	mtd-mac-address = <&rom 0xf100>;
-	mtd-mac-address-increment = <(-2)>;
+	mac-address-increment = <(-2)>;
 };
 
 &wifi {
 	mtd-mac-address = <&rom 0xf100>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
diff --git a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi
index 80b47b7d77..7b3025e8b4 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi
+++ b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi
@@ -89,7 +89,7 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		mtd-mac-address = <&uboot 0x1fc00>;
-		mtd-mac-address-increment = <2>;
+		mac-address-increment = <2>;
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts
index 3290a5e710..84c0d3b282 100644
--- a/target/linux/ramips/dts/mt7621_adslr_g7.dts
+++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts
@@ -130,7 +130,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe00c>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
index ed9e9852d3..0a4971d06c 100644
--- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
+++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
@@ -135,7 +135,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
index cf91dc0311..0e66057fa5 100644
--- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
+++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
@@ -18,7 +18,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
index 5a4c03fb7c..4088b8137d 100644
--- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
+++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
@@ -13,7 +13,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 
 		port at 2 {
diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
index 048eac5a3d..9244c8368b 100644
--- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
+++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
@@ -165,7 +165,7 @@
 
 &gmac0 {
 	mtd-mac-address = <&factory 0x4>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts
index a66ce942a5..e943c04069 100644
--- a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts
+++ b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts
@@ -142,7 +142,7 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x8000>;
 		mtd-mac-address = <&bdinfo 0xde00>;
-		mtd-mac-address-increment = <2>;
+		mac-address-increment = <2>;
 		ieee80211-freq-limit = <5000000 6000000>;
 
 		led {
@@ -182,7 +182,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&bdinfo 0xde00>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
index 0f4fbc1873..fd11768ce6 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
@@ -18,10 +18,10 @@
 
 &wifi0 {
 	mtd-mac-address = <&factory 0xe000>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &wifi1 {
 	mtd-mac-address = <&factory 0xe000>;
-	mtd-mac-address-increment = <2>;
+	mac-address-increment = <2>;
 };
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
index 323a790600..b19f70f7c9 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
@@ -25,10 +25,10 @@
 
 &wifi0 {
 	mtd-mac-address = <&factory 0xe000>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &wifi1 {
 	mtd-mac-address = <&factory 0xe000>;
-	mtd-mac-address-increment = <2>;
+	mac-address-increment = <2>;
 };
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
index fbf233d96f..a4d72876ab 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
@@ -25,10 +25,10 @@
 
 &wifi0 {
 	mtd-mac-address = <&factory 0xe000>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &wifi1 {
 	mtd-mac-address = <&factory 0xe000>;
-	mtd-mac-address-increment = <2>;
+	mac-address-increment = <2>;
 };
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
index b6a7383557..f8ea5dbbbf 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
@@ -169,7 +169,7 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x0>;
 		mtd-mac-address = <&factory 0xe000>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 	};
 };
 
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
index 6349fd487e..becd2a9f9d 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
@@ -49,5 +49,5 @@
 
 &wifi {
 	mtd-mac-address = <&factory 0x4>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
index 11b782488a..5cc8ff27f6 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
@@ -49,5 +49,5 @@
 
 &wifi {
 	mtd-mac-address = <&factory 0xe006>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts
index 62423f02e5..9689326570 100644
--- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts
+++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts
@@ -134,7 +134,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
index e7b19fa42c..f0152e8db3 100644
--- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
+++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
@@ -131,7 +131,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
index 20f63902af..629a9a2439 100644
--- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
+++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
@@ -116,7 +116,7 @@
 
 &gmac0 {
 	mtd-mac-address = <&factory 0x4000>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &switch0 {
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
index 879fb68c85..c549bbb518 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
@@ -137,7 +137,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0x4>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 
 		port at 1 {
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
index 06d024e9a7..91f30f8721 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
@@ -137,7 +137,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0x4>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 
 		port at 1 {
diff --git a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
index 04996558a4..ec9be40ce4 100644
--- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
+++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
@@ -142,7 +142,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0x5>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts
index 45901474d2..130193c171 100644
--- a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts
+++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts
@@ -123,7 +123,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts
index 8a79d9ca9a..cfa0e6af24 100644
--- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts
+++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts
@@ -128,7 +128,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0x4>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
index 1a19cd048b..eaf9059e39 100644
--- a/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_ayx.dtsi
@@ -136,7 +136,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0x4>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
index 71c95e75bd..3ed8bc55e9 100644
--- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
@@ -191,7 +191,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0x4>;
-			mtd-mac-address-increment = <2>;
+			mac-address-increment = <2>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
index 7a15cd1f6c..61cb522dfd 100644
--- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
@@ -125,7 +125,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0x4>;
-			mtd-mac-address-increment = <2>;
+			mac-address-increment = <2>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
index d44960a9a1..6ecf71895c 100644
--- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
+++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
@@ -131,7 +131,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe006>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts
index f597d0f63a..0386a3cdd2 100644
--- a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts
+++ b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts
@@ -150,7 +150,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe006>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts
index d0e38f1721..4b53e60cd5 100644
--- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts
+++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts
@@ -129,7 +129,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
index 17308eb605..cf63e6b989 100644
--- a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
@@ -147,7 +147,7 @@
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mtd-mac-address = <&info 0x8>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 	};
 };
 
diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts
index 9f29ecd8cf..0a810b0195 100644
--- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts
@@ -131,7 +131,7 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x0>;
 		mtd-mac-address = <&config 0x10008>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 	};
 };
 
@@ -141,7 +141,7 @@
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mtd-mac-address = <&config 0x10008>;
-		mtd-mac-address-increment = <2>;
+		mac-address-increment = <2>;
 	};
 };
 
diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi
index 45a983098d..0ec83fa389 100644
--- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi
+++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi
@@ -149,7 +149,7 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x0>;
 		mtd-mac-address = <&config 0x10008>;
-		mtd-mac-address-increment = <1>;
+		mac-address-increment = <1>;
 		ieee80211-freq-limit = <2400000 2500000>;
 	};
 };
@@ -160,7 +160,7 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		mtd-mac-address = <&config 0x10008>;
-		mtd-mac-address-increment = <2>;
+		mac-address-increment = <2>;
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
index 9f92178900..536180be10 100644
--- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
+++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
@@ -67,7 +67,7 @@
 			phy-handle = <&ephy7>;
 			phy-mode = "rgmii-rxid";
 			mtd-mac-address = <&factory 0x22>;
-			mtd-mac-address-increment = <5>;
+			mac-address-increment = <5>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
index 04eb49bfa3..b92dc8f3f0 100644
--- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
+++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
@@ -35,28 +35,28 @@
 			status = "okay";
 			label = "eth1";
 			mtd-mac-address = <&factory 0x22>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 
 		port at 2 {
 			status = "okay";
 			label = "eth2";
 			mtd-mac-address = <&factory 0x22>;
-			mtd-mac-address-increment = <2>;
+			mac-address-increment = <2>;
 		};
 
 		port at 3 {
 			status = "okay";
 			label = "eth3";
 			mtd-mac-address = <&factory 0x22>;
-			mtd-mac-address-increment = <3>;
+			mac-address-increment = <3>;
 		};
 
 		port at 4 {
 			status = "okay";
 			label = "eth4";
 			mtd-mac-address = <&factory 0x22>;
-			mtd-mac-address-increment = <4>;
+			mac-address-increment = <4>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
index 336f68ea61..b9b16fbb4b 100644
--- a/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-01.dtsi
@@ -82,7 +82,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 
 		port at 1 {
diff --git a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
index 3b149df85a..29e6251721 100644
--- a/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
+++ b/target/linux/ramips/dts/mt7621_unielec_u7621-06.dtsi
@@ -103,7 +103,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
index b90ff92c70..ee1a452fa9 100644
--- a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
+++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
@@ -114,7 +114,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0x4>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
index 182b6db5b3..afee235ac7 100644
--- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
+++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
@@ -182,7 +182,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts
index d0d656ba6d..b1fbf53931 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts
@@ -136,7 +136,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
index 515d37ceaa..2fe855abd5 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
@@ -140,7 +140,7 @@
 			status = "okay";
 			label = "wan";
 			mtd-mac-address = <&factory 0xe000>;
-			mtd-mac-address-increment = <1>;
+			mac-address-increment = <1>;
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6120.dts b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts
index f4d9823cd2..c70db4989b 100644
--- a/target/linux/ramips/dts/mt7628an_netgear_r6120.dts
+++ b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts
@@ -45,5 +45,5 @@
 
 &wifi5 {
 	mtd-mac-address = <&factory 0x4>;
-	mtd-mac-address-increment = <(2)>;
+	mac-address-increment = <(2)>;
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts
index 58743db6b4..55f39db680 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts
@@ -78,7 +78,7 @@
 };
 
 &wmac {
-	mtd-mac-address-increment = <(-2)>;
+	mac-address-increment = <(-2)>;
 };
 
 &esw {
@@ -102,6 +102,6 @@
 		mediatek,mtd-eeprom = <&factory 0x28000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mtd-mac-address = <&factory 0xf100>;
-		mtd-mac-address-increment = <(-1)>;
+		mac-address-increment = <(-1)>;
 	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts
index d76ce34ca9..38879d70e6 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts
@@ -97,6 +97,6 @@
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mtd-mac-address = <&rom 0xf100>;
-		mtd-mac-address-increment = <(-1)>;
+		mac-address-increment = <(-1)>;
 	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts
index 4966d56a68..bb13bac8c8 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts
@@ -97,6 +97,6 @@
 		mediatek,mtd-eeprom = <&factory 0x28000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mtd-mac-address = <&factory 0xf100>;
-		mtd-mac-address-increment = <(-1)>;
+		mac-address-increment = <(-1)>;
 	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts
index 11bf903531..34170547a4 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts
@@ -95,6 +95,6 @@
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mtd-mac-address = <&rom 0xf100>;
-		mtd-mac-address-increment = <(-1)>;
+		mac-address-increment = <(-1)>;
 	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
index 95addff3c0..633950f287 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
+++ b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
@@ -138,7 +138,7 @@
 
 	mediatek,mtd-eeprom = <&radio 0x0>;
 	mtd-mac-address = <&config 0x2008>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &pcie {
@@ -151,6 +151,6 @@
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mtd-mac-address = <&config 0x2008>;
-		mtd-mac-address-increment = <2>;
+		mac-address-increment = <2>;
 	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts
index 22e15eb7a1..300ea3bb29 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts
@@ -128,7 +128,7 @@
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mtd-mac-address = <&config 0x10008>;
-		mtd-mac-address-increment = <2>;
+		mac-address-increment = <2>;
 	};
 };
 
@@ -137,7 +137,7 @@
 
 	mediatek,mtd-eeprom = <&radio 0x0>;
 	mtd-mac-address = <&config 0x10008>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
 
 &ethernet {
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts
index 77a68acf34..d3558547b8 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts
@@ -93,6 +93,6 @@
 		mediatek,mtd-eeprom = <&factory 0x28000>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mtd-mac-address = <&factory 0xf100>;
-		mtd-mac-address-increment = <(-1)>;
+		mac-address-increment = <(-1)>;
 	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts
index 37797fc368..ff562cbff4 100644
--- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts
@@ -36,7 +36,7 @@
 
 &ethernet {
 	mtd-mac-address = <&factory 0x4>;
-	mtd-mac-address-increment = <(-1)>;
+	mac-address-increment = <(-1)>;
 };
 
 &esw {
diff --git a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts
index ccf9917dac..6bed6f57bc 100644
--- a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts
+++ b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts
@@ -65,7 +65,7 @@
 &ethernet {
 	status = "okay";
 	mtd-mac-address = <&factory 0x8004>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 
 	port at 0 {
 		phy-handle = <&phy0>;
diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts
index 03e504a6d1..b5cae66732 100644
--- a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts
+++ b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts
@@ -117,5 +117,5 @@
 	ralink,mtd-eeprom = <&factory 0x0>;
 	ralink,5ghz = <0>;
 	mtd-mac-address = <&factory 0x4>;
-	mtd-mac-address-increment = <1>;
+	mac-address-increment = <1>;
 };
diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts
index 95a2bb75f3..39fb3d1c78 100644
--- a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts
+++ b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts
@@ -143,5 +143,5 @@
 	ralink,mtd-eeprom = <&factory 0x0>;
 	ralink,5ghz = <0>;
 	mtd-mac-address = <&factory 0x4>;
-	mtd-mac-address-increment = <3>;
+	mac-address-increment = <3>;
 };


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:51 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:51 -0400
Subject: [openwrt/openwrt] mpc85xx: convert mtd-mac-address to nvmem
 implementation
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8538.1626699116.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/8ec21d6bb2101d801f1ee915d1cd0412c6585078

commit 8ec21d6bb2101d801f1ee915d1cd0412c6585078
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 2 23:52:21 2021 +0200

    mpc85xx: convert mtd-mac-address to nvmem implementation
    
    Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
    The conversion is done with an automated script.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 .../mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts   | 16 ++++++++++++++--
 .../files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts        | 13 ++++++++++++-
 2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts
index 10bb353683..97f5b7c7b7 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts
@@ -165,7 +165,8 @@
 			status = "okay";
 			phy-handle = <&phy0>;
 			phy-connection-type = "rgmii-id";
-			mtd-mac-address = <&hwinfo 0>;
+			nvmem-cells = <&macaddr_hwinfo_0>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		enet1: ethernet at b1000 {
@@ -176,7 +177,8 @@
 			status = "okay";
 			phy-handle = <&phy1>;
 			phy-connection-type = "rgmii-id";
-			mtd-mac-address = <&hwinfo 0>;
+			nvmem-cells = <&macaddr_hwinfo_0>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 
@@ -234,3 +236,13 @@
 	};
 };
 /include/ "fsl/p1020si-post.dtsi"
+
+&hwinfo {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_hwinfo_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
index 29b49a9357..1976b4af96 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
@@ -119,7 +119,8 @@
 		enet0: ethernet at b0000 {
 			phy-handle = <&phy0>;
 			phy-connection-type = "rgmii-id";
-			mtd-mac-address = <&uboot 0x4fc00>;
+			nvmem-cells = <&macaddr_uboot_4fc00>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		enet1: ethernet at b1000 {
@@ -290,3 +291,13 @@
 		/delete-node/ crypto at 30000; /* Pulled in by p1010si-post */
 	};
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_4fc00: macaddr at 4fc00 {
+		reg = <0x4fc00 0x6>;
+	};
+};


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:48 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:48 -0400
Subject: [openwrt/openwrt] ath79: convert mtd-mac-address to nvmem
 implementation
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8539.1626699116.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/abc17bf306acd1c5954fbba97134e891439f917c

commit abc17bf306acd1c5954fbba97134e891439f917c
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 2 23:47:31 2021 +0200

    ath79: convert mtd-mac-address to nvmem implementation
    
    Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
    The conversion is done with an automated script.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 target/linux/ath79/dts/ar7161_aruba_ap-105.dts     | 19 ++++++++++++---
 .../ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi    | 20 ++++++++++++++--
 target/linux/ath79/dts/ar7161_meraki_mr16.dts      | 19 ++++++++++++---
 target/linux/ath79/dts/ar7161_netgear_wndr.dtsi    |  4 ++--
 .../linux/ath79/dts/ar7240_buffalo_whr-g301n.dts   | 19 ++++++++++++---
 .../linux/ath79/dts/ar7240_engenius_enh202-v1.dts  | 16 +++++++++++--
 .../linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts  | 23 +++++++++++++++---
 .../linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi  | 23 +++++++++++++++---
 target/linux/ath79/dts/ar7240_tplink.dtsi          | 13 ++++++++++-
 target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi    | 13 ++++++++++-
 target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi    | 16 +++++++++++--
 .../linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts  | 23 +++++++++++++++---
 target/linux/ath79/dts/ar7241_tplink.dtsi          | 19 ++++++++++++---
 .../linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts | 19 ++++++++++++---
 .../dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts      | 13 ++++++++++-
 target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi      |  1 -
 target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts | 13 ++++++++++-
 .../ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts | 16 +++++++++++--
 .../ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts      | 16 +++++++++++--
 .../linux/ath79/dts/ar7242_engenius_eap350-v1.dts  | 16 +++++++++++--
 .../linux/ath79/dts/ar7242_engenius_ecb350-v1.dts  | 16 +++++++++++--
 target/linux/ath79/dts/ar7242_meraki_mr12.dts      | 19 ++++++++++++---
 .../linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts | 16 +++++++++++--
 .../linux/ath79/dts/ar7242_ubnt_edgeswitch-5xp.dts | 13 ++++++++++-
 .../linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts | 13 ++++++++++-
 target/linux/ath79/dts/ar7242_ubnt_sw.dtsi         | 13 ++++++++++-
 target/linux/ath79/dts/ar724x_ubnt_xm.dtsi         | 20 ++++++++++++++--
 .../ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi    | 16 +++++++++++--
 .../ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts      | 16 +++++++++++--
 .../ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts     | 16 +++++++++++--
 .../linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts  | 16 +++++++++++--
 target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts  | 19 ++++++++++++---
 target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi   | 20 ++++++++++++++--
 target/linux/ath79/dts/ar9330_pqi_air-pen.dts      | 20 ++++++++++++++--
 target/linux/ath79/dts/ar9330_ziking_cpe46b.dts    | 18 ++++++++++++---
 target/linux/ath79/dts/ar9331_8dev_carambola2.dts  | 20 ++++++++++++++--
 .../ath79/dts/ar9331_alfa-network_ap121f.dtsi      | 13 ++++++++++-
 .../ath79/dts/ar9331_embeddedwireless_dorin.dts    | 13 ++++++++++-
 target/linux/ath79/dts/ar9331_etactica_eg200.dts   | 13 ++++++++++-
 target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts   | 16 +++++++++++--
 target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts | 13 ++++++++++-
 target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi | 16 +++++++++++--
 .../ath79/dts/ar9331_hak5_wifi-pineapple-nano.dts  | 13 ++++++++++-
 target/linux/ath79/dts/ar9331_pisen_ts-d084.dts    | 16 +++++++++++--
 target/linux/ath79/dts/ar9331_pisen_wmm003n.dts    | 16 +++++++++++--
 .../linux/ath79/dts/ar9331_teltonika_rut230-v1.dts | 23 ++++++++++++++----
 .../linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts | 16 +++++++++++--
 .../linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts | 16 +++++++++++--
 .../dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi      | 16 +++++++++++--
 .../ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi     | 19 ++++++++++++---
 .../linux/ath79/dts/ar9341_engenius_eap300-v2.dts  | 13 ++++++++++-
 .../ath79/dts/ar9341_engenius_ens202ext-v1.dts     | 16 +++++++++++--
 .../linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi   | 20 ++++++++++++++--
 target/linux/ath79/dts/ar9341_pcs_cr3000.dts       | 16 +++++++++++--
 target/linux/ath79/dts/ar9341_pisen_wmb001n.dts    | 13 ++++++++++-
 target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi    | 16 +++++++++++--
 target/linux/ath79/dts/ar9342_ubnt_aircube-ac.dts  | 13 ++++++++++-
 target/linux/ath79/dts/ar9342_ubnt_wa_1port.dtsi   | 13 ++++++++++-
 target/linux/ath79/dts/ar9342_ubnt_wa_2port.dtsi   | 13 ++++++++++-
 target/linux/ath79/dts/ar9342_ubnt_xw.dtsi         | 13 ++++++++++-
 .../linux/ath79/dts/ar9344_aerohive_hiveap-121.dts | 19 ++++++++++++---
 target/linux/ath79/dts/ar9344_alfa-network_n5q.dts | 20 ++++++++++++++--
 .../linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts | 20 ++++++++++++++--
 .../linux/ath79/dts/ar9344_compex_wpj344-16m.dts   | 13 ++++++++++-
 .../linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi   | 13 ++++++++++-
 target/linux/ath79/dts/ar9344_engenius_eap600.dts  | 19 ++++++++++++---
 target/linux/ath79/dts/ar9344_engenius_ecb600.dts  | 19 ++++++++++++---
 target/linux/ath79/dts/ar9344_netgear_wndr.dtsi    | 23 +++++++++++++++---
 target/linux/ath79/dts/ar9344_ocedo_raccoon.dts    | 27 +++++++++++++++++++---
 target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi  | 19 ++++++++++++---
 target/linux/ath79/dts/ar9344_openmesh_om5p.dts    | 20 ++++++++++++++--
 target/linux/ath79/dts/ar9344_pcs_cap324.dts       | 19 ++++++++++++---
 target/linux/ath79/dts/ar9344_pcs_cr5000.dts       | 20 ++++++++++++++--
 .../linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts | 16 +++++++++++--
 .../linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts  | 16 +++++++++++--
 .../linux/ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts | 13 ++++++++++-
 .../linux/ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts  | 13 ++++++++++-
 target/linux/ath79/dts/ar9344_samsung_wam250.dts   | 16 +++++++++++--
 .../ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts   | 16 +++++++++++--
 target/linux/ath79/dts/ar9344_teltonika_rut955.dts | 16 +++++++++++--
 .../linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi   | 13 ++++++++++-
 target/linux/ath79/dts/ar9344_tplink_cpe.dtsi      | 16 +++++++++++--
 .../linux/ath79/dts/ar9344_tplink_cpe_2port.dtsi   | 13 ++++++++++-
 .../ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts      | 22 ++++++++++++++----
 .../linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi  | 19 ++++++++++++---
 .../linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts   | 13 ++++++++++-
 .../linux/ath79/dts/ar9344_winchannel_wb2000.dts   | 19 ++++++++++++---
 .../linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts   | 20 ++++++++++++++--
 target/linux/ath79/dts/qca9531_8dev_lima.dts       | 20 ++++++++++++++--
 .../linux/ath79/dts/qca9531_alfa-network_n2q.dts   | 16 +++++++++++--
 .../ath79/dts/qca9531_alfa-network_pi-wifi4.dts    | 13 ++++++++++-
 .../linux/ath79/dts/qca9531_alfa-network_r36a.dts  | 16 +++++++++++--
 .../ath79/dts/qca9531_comfast_cf-e130n-v2.dts      | 16 +++++++++++--
 .../linux/ath79/dts/qca9531_comfast_cf-e313ac.dts  | 20 ++++++++++++++--
 .../ath79/dts/qca9531_comfast_cf-e314n-v2.dts      | 20 ++++++++++++++--
 target/linux/ath79/dts/qca9531_comfast_cf-e5.dts   | 20 ++++++++++++++--
 .../linux/ath79/dts/qca9531_comfast_cf-e560ac.dts  | 19 ++++++++++++---
 target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts | 19 ++++++++++++---
 .../ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts    | 16 +++++++++++--
 .../linux/ath79/dts/qca9531_compex_wpj531-16m.dts  | 20 ++++++++++++++--
 .../linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi  | 16 +++++++++++--
 target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts | 16 +++++++++++--
 target/linux/ath79/dts/qca9531_glinet_gl-e750.dts  | 13 ++++++++++-
 target/linux/ath79/dts/qca9531_glinet_gl-x750.dts  | 16 +++++++++++--
 target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi   | 16 +++++++++++--
 target/linux/ath79/dts/qca9531_telco_t1.dts        | 20 ++++++++++++++--
 .../ath79/dts/qca9531_tplink_archer-d50-v1.dts     | 19 ++++++++++++---
 .../ath79/dts/qca9531_tplink_tl-mr3420-v3.dts      | 19 ++++++++++++---
 .../ath79/dts/qca9531_tplink_tl-mr6400-v1.dts      | 19 ++++++++++++---
 .../ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts     | 16 +++++++++++--
 target/linux/ath79/dts/qca9531_wallys_dr531.dts    | 20 ++++++++++++++--
 target/linux/ath79/dts/qca9531_yuncore_a770.dts    | 20 ++++++++++++++--
 .../ath79/dts/qca9533_comfast_cf-e110n-v2.dts      | 27 +++++++++++++++++++---
 .../linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi  | 23 +++++++++++++++---
 .../linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi | 19 ++++++++++++---
 .../linux/ath79/dts/qca9533_tplink_cpe220-v3.dts   | 13 ++++++++++-
 target/linux/ath79/dts/qca9533_tplink_cpexxx.dtsi  | 16 +++++++++++--
 .../linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi | 16 +++++++++++--
 .../ath79/dts/qca9533_tplink_tl-wa850re-v2.dts     | 16 +++++++++++--
 .../linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi  | 16 +++++++++++--
 .../linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi   | 19 ++++++++++++---
 .../ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts     | 21 +++++++++++++----
 .../ath79/dts/qca9533_tplink_tl-wr842n-v3.dts      | 19 ++++++++++++---
 .../linux/ath79/dts/qca9533_ubnt_aircube-isp.dts   | 20 ++++++++++++++--
 .../linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi  | 19 ++++++++++++---
 target/linux/ath79/dts/qca9550_airtight_c-75.dts   | 20 ++++++++++++++--
 target/linux/ath79/dts/qca9557_8dev_rambutan.dts   | 20 ++++++++++++++--
 .../linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts  | 20 ++++++++++++++--
 .../linux/ath79/dts/qca9557_engenius_eap1200h.dts  | 16 +++++++++++--
 .../ath79/dts/qca9557_engenius_enstationac-v1.dts  | 16 +++++++++++--
 .../ath79/dts/qca9558_allnet_all-wap02860ac.dts    | 17 +++++++++++---
 target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi  | 16 +++++++++++--
 target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts | 13 ++++++++++-
 target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts | 13 ++++++++++-
 target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi | 16 +++++++++++--
 target/linux/ath79/dts/qca9558_domywifi_dw33d.dts  | 27 +++++++++++++++++++---
 .../dts/qca9558_librerouter_librerouter-v1.dts     | 27 +++++++++++++++++++---
 target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi | 20 ++++++++++++++--
 target/linux/ath79/dts/qca9558_ocedo_koala.dts     | 20 ++++++++++++++--
 target/linux/ath79/dts/qca9558_ocedo_ursus.dts     | 27 +++++++++++++++++++---
 target/linux/ath79/dts/qca9558_openmesh_a60.dtsi   | 25 ++++++++++++++++----
 target/linux/ath79/dts/qca9558_openmesh_mr.dtsi    | 16 +++++++++++--
 .../linux/ath79/dts/qca9558_openmesh_mr900-v1.dts  | 13 ++++++++++-
 .../linux/ath79/dts/qca9558_openmesh_mr900-v2.dts  | 13 ++++++++++-
 target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi    | 16 +++++++++++--
 .../ath79/dts/qca9558_tplink_archer-d7-v1.dts      | 19 ++++++++++++---
 .../ath79/dts/qca9558_tplink_archer-d7b-v1.dts     | 19 ++++++++++++---
 .../linux/ath79/dts/qca9558_tplink_re350k-v1.dts   | 16 +++++++++++--
 target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi   | 16 +++++++++++--
 .../ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts     | 22 ++++++++++++++----
 .../ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi      | 19 ++++++++++++---
 .../ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts   | 16 +++++++++++--
 .../ath79/dts/qca9558_ubnt_powerbeam-5ac-500.dts   | 13 ++++++++++-
 .../ath79/dts/qca9558_ubnt_rocket-5ac-lite.dts     | 13 ++++++++++-
 .../ath79/dts/qca9561_tplink_archer-c25-v1.dts     | 19 ++++++++++++---
 .../ath79/dts/qca9561_tplink_eap225-wall-v2.dts    | 16 +++++++++++--
 .../ath79/dts/qca9561_xiaomi_mi-router-4q.dts      | 23 +++++++++++++++---
 .../linux/ath79/dts/qca9563_comfast_cf-e375ac.dts  | 18 ++++++++++++---
 target/linux/ath79/dts/qca9563_compex_wpj563.dts   | 13 ++++++++++-
 .../linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi  | 13 ++++++++++-
 target/linux/ath79/dts/qca9563_netgear_wndr.dtsi   | 23 +++++++++++++++---
 target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi | 13 ++++++++++-
 target/linux/ath79/dts/qca9563_rosinson_wr818.dts  | 13 ++++++++++-
 .../ath79/dts/qca9563_tplink_archer-c2-v3.dts      | 16 +++++++++++--
 .../ath79/dts/qca9563_tplink_archer-c7-v4.dts      | 16 +++++++++++--
 .../linux/ath79/dts/qca9563_tplink_eap245-v3.dts   | 16 +++++++++++--
 .../ath79/dts/qca9563_tplink_eap2x5-1port.dtsi     | 16 +++++++++++--
 .../ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts     | 16 +++++++++++--
 .../linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi | 13 ++++++++++-
 .../linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi  | 13 ++++++++++-
 .../linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts | 13 ++++++++++-
 target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi | 13 ++++++++++-
 .../ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi      | 13 ++++++++++-
 .../linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts | 13 ++++++++++-
 .../linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts | 13 ++++++++++-
 .../ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts      | 21 +++++++++++++----
 target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi    | 16 +++++++++++--
 177 files changed, 2637 insertions(+), 364 deletions(-)

diff --git a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts
index 083db183d4..8180e0d6bd 100644
--- a/target/linux/ath79/dts/ar7161_aruba_ap-105.dts
+++ b/target/linux/ath79/dts/ar7161_aruba_ap-105.dts
@@ -103,7 +103,8 @@
 
 	ath9k0: wifi at 0,11 { /* 2.4 GHz */
 		compatible = "pci168c,0029";
-		mtd-mac-address = <&hwinfo 0x1c>;
+		nvmem-cells = <&macaddr_hwinfo_1c>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 		reg = <0x8800 0 0 0 0>;
 		#gpio-cells = <2>;
@@ -112,7 +113,8 @@
 
 	ath9k1: wifi at 0,12 { /* 5 GHz */
 		compatible = "pci168c,0029";
-		mtd-mac-address = <&hwinfo 0x1c>;
+		nvmem-cells = <&macaddr_hwinfo_1c>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <2>;
 		reg = <0x9000 0 0 0 0>;
 		#gpio-cells = <2>;
@@ -132,7 +134,8 @@
 
 &eth0 {
 	status = "okay";
-	mtd-mac-address = <&hwinfo 0x1c>;
+	nvmem-cells = <&macaddr_hwinfo_1c>;
+	nvmem-cell-names = "mac-address";
 
 	pll-data = <0x00110000 0x00001099 0x00991099>;
 
@@ -179,3 +182,13 @@
 		};
 	};
 };
+
+&hwinfo {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_hwinfo_1c: macaddr at 1c {
+		reg = <0x1c 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi
index 15ac148697..006755e418 100644
--- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi
+++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dtsi
@@ -247,7 +247,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x120c>;
+	nvmem-cells = <&macaddr_art_120c>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -258,8 +259,23 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x520c>;
+	nvmem-cells = <&macaddr_art_520c>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 
 	phy-handle = <&phy4>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_120c: macaddr at 120c {
+		reg = <0x120c 0x6>;
+	};
+
+	macaddr_art_520c: macaddr at 520c {
+		reg = <0x520c 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7161_meraki_mr16.dts b/target/linux/ath79/dts/ar7161_meraki_mr16.dts
index 3d11e641eb..d672364e56 100644
--- a/target/linux/ath79/dts/ar7161_meraki_mr16.dts
+++ b/target/linux/ath79/dts/ar7161_meraki_mr16.dts
@@ -81,7 +81,8 @@
 		compatible = "pci168c,0029";
 		reg = <0x8800 0 0 0 0>;
 		qca,no-eeprom;
-		mtd-mac-address = <&config 0x66>;
+		nvmem-cells = <&macaddr_config_66>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 		#gpio-cells = <2>;
 		gpio-controller;
@@ -91,7 +92,8 @@
 		compatible = "pci168c,0029";
 		reg = <0x9000 0 0 0 0>;
 		qca,no-eeprom;
-		mtd-mac-address = <&config 0x66>;
+		nvmem-cells = <&macaddr_config_66>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <2>;
 		#gpio-cells = <2>;
 		gpio-controller;
@@ -114,7 +116,8 @@
 
 &eth0 {
 	status = "okay";
-	mtd-mac-address = <&config 0x66>;
+	nvmem-cells = <&macaddr_config_66>;
+	nvmem-cell-names = "mac-address";
 
 	pll-data = <0x00110000 0x00001099 0x00991099>;
 
@@ -167,3 +170,13 @@
 		};
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_66: macaddr at 66 {
+		reg = <0x66 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi
index c7e83631cc..369c89a97e 100644
--- a/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi
+++ b/target/linux/ath79/dts/ar7161_netgear_wndr.dtsi
@@ -153,7 +153,7 @@
 	ath9k0: wifi at 0,11 {
 		compatible = "pci168c,0029";
 		reg = <0x8800 0 0 0 0>;
-		mtd-mac-address = <&art 0x0>;
+		mtd-mac-address = <&art 0xc>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
@@ -181,7 +181,7 @@
 	ath9k1: wifi at 0,12 {
 		compatible = "pci168c,0029";
 		reg = <0x9000 0 0 0 0>;
-		mtd-mac-address = <&art 0xc>;
+		mtd-mac-address = <&art 0x0>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
diff --git a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts
index 7f736dc005..cf51078bc3 100644
--- a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts
+++ b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts
@@ -153,13 +153,15 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x120c>;
+	nvmem-cells = <&macaddr_art_120c>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x120c>;
+	nvmem-cells = <&macaddr_art_120c>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -170,7 +172,8 @@
 		compatible = "pci168c,002a";
 		reg = <0x0000 0 0 0 0>;
 		qca,no-eeprom;
-		mtd-mac-address = <&art 0x120c>;
+		nvmem-cells = <&macaddr_art_120c>;
+		nvmem-cell-names = "mac-address";
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
@@ -181,3 +184,13 @@
 		pinctrl-single,bits = <0x0 0x0 0xf8>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_120c: macaddr at 120c {
+		reg = <0x120c 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts b/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts
index c5a667b513..9a233c836b 100644
--- a/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts
+++ b/target/linux/ath79/dts/ar7240_engenius_enh202-v1.dts
@@ -72,13 +72,15 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie {
@@ -92,3 +94,13 @@
 		gpio-controller;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts
index 931032d851..91b72cf1db 100644
--- a/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts
+++ b/target/linux/ath79/dts/ar7240_netgear_wnr1000-v2.dts
@@ -174,13 +174,15 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie {
@@ -189,10 +191,25 @@
 	ath9k: wifi at 0,0 {
 		compatible = "pci168c,002b";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&art 0x0>;
+		nvmem-cells = <&macaddr_art_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
index 91438ebf8f..9bae95b557 100644
--- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
+++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi
@@ -107,13 +107,15 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie {
@@ -122,10 +124,25 @@
 	ath9k: wifi at 0,0 {
 		compatible = "pci168c,002b";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&art 0x0>;
+		nvmem-cells = <&macaddr_art_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7240_tplink.dtsi b/target/linux/ath79/dts/ar7240_tplink.dtsi
index 4799fd79ec..60cd38c220 100644
--- a/target/linux/ath79/dts/ar7240_tplink.dtsi
+++ b/target/linux/ath79/dts/ar7240_tplink.dtsi
@@ -104,7 +104,8 @@
 	ath9k: wifi at 0,0 {
 		reg = <0x0000 0 0 0 0>;
 		qca,no-eeprom;
-		mtd-mac-address = <&uboot 0x1fc00>;
+		nvmem-cells = <&macaddr_uboot_1fc00>;
+		nvmem-cell-names = "mac-address";
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
@@ -115,3 +116,13 @@
 		pinctrl-single,bits = <0x0 0x0 0xf8>;
 	};
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi
index e0ac582f9d..ceb6b1d7a2 100644
--- a/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi
+++ b/target/linux/ath79/dts/ar7240_tplink_tl-wa.dtsi
@@ -14,9 +14,20 @@
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ath9k {
 	compatible = "pci168c,002a";
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi
index adc6cc87b3..40a2ca2399 100644
--- a/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi
+++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr.dtsi
@@ -30,15 +30,27 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &ath9k {
 	compatible = "pci168c,002b";
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
index 380f82a59f..290871d648 100644
--- a/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
+++ b/target/linux/ath79/dts/ar7241_netgear_wnr2000-v3.dts
@@ -179,13 +179,15 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	compatible = "qca,ar7241-eth", "syscon", "simple-mfd";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie {
@@ -194,10 +196,25 @@
 	ath9k: wifi at 0,0 {
 		compatible = "pci168c,002e";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&art 0x0>;
+		nvmem-cells = <&macaddr_art_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi
index c2c81b3a87..84a9a4f63d 100644
--- a/target/linux/ath79/dts/ar7241_tplink.dtsi
+++ b/target/linux/ath79/dts/ar7241_tplink.dtsi
@@ -89,18 +89,31 @@
 		#gpio-cells = <2>;
 		gpio-controller;
 		qca,no-eeprom;
-		mtd-mac-address = <&uboot 0x1fc00>;
+		nvmem-cells = <&macaddr_uboot_1fc00>;
+		nvmem-cell-names = "mac-address";
 	};
 };
 
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
index 4cc6d2a8f1..df77ca0fdc 100644
--- a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
+++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts
@@ -135,18 +135,31 @@
 		#gpio-cells = <2>;
 		gpio-controller;
 		qca,no-eeprom;
-		mtd-mac-address = <&uboot 0x1fc00>;
+		nvmem-cells = <&macaddr_uboot_1fc00>;
+		nvmem-cell-names = "mac-address";
 	};
 };
 
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts
index 68f83f7a66..3a0cc4250e 100644
--- a/target/linux/ath79/dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts
+++ b/target/linux/ath79/dts/ar7241_ubnt_unifi-ap-outdoor-plus.dts
@@ -94,9 +94,20 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wifi {
 	ubnt,hsr;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi b/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi
index 73ded0f5bd..614ac1454f 100644
--- a/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi
+++ b/target/linux/ath79/dts/ar7241_ubnt_unifi.dtsi
@@ -45,4 +45,3 @@
 
 	mtd-mac-address = <&art 0x0>;
 };
-
diff --git a/target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts b/target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts
index 3b2dc0ecfc..dde9129505 100644
--- a/target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts
+++ b/target/linux/ath79/dts/ar7242_buffalo_bhr-4grv.dts
@@ -15,5 +15,16 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts
index 111d06491e..fa3c47354e 100644
--- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts
+++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts
@@ -192,7 +192,8 @@
 
 	pll-data = <0x1c000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&art 0x120c>;
+	nvmem-cells = <&macaddr_art_120c>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
@@ -204,7 +205,8 @@
 	ath9k: wifi at 0,0 {
 		compatible = "pci168c,002a";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&art 0x120c>;
+		nvmem-cells = <&macaddr_art_120c>;
+		nvmem-cell-names = "mac-address";
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
@@ -229,3 +231,13 @@
 		#trigger-source-cells = <0>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_120c: macaddr at 120c {
+		reg = <0x120c 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts
index 4f186c2c11..84d029b5dc 100644
--- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts
+++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts
@@ -64,7 +64,8 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie {
@@ -73,9 +74,20 @@
 	ath9k: wifi at 0,0 {
 		compatible = "pci168c,0030";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&art 0x1002>;
+		nvmem-cells = <&macaddr_art_1002>;
+		nvmem-cell-names = "mac-address";
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_1002: macaddr at 1002 {
+		reg = <0x1002 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts
index 3e2a67697f..7458685802 100644
--- a/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts
+++ b/target/linux/ath79/dts/ar7242_engenius_eap350-v1.dts
@@ -63,7 +63,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-handle = <&phy4>;
 	phy-mode = "rgmii-id";
@@ -77,10 +78,21 @@
 	ath9k: wifi at 0,0,0 {
 		compatible = "pci168c,002a";
 		reg = <0x0 0 0 0 0>;
-		mtd-mac-address = <&art 0x0>;
+		nvmem-cells = <&macaddr_art_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts
index 9026eb997f..f1f86019dd 100644
--- a/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts
+++ b/target/linux/ath79/dts/ar7242_engenius_ecb350-v1.dts
@@ -63,7 +63,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-handle = <&phy4>;
 	phy-mode = "rgmii-id";
@@ -77,10 +78,21 @@
 	ath9k: wifi at 0,0,0 {
 		compatible = "pci168c,002a";
 		reg = <0x0 0 0 0 0>;
-		mtd-mac-address = <&art 0x0>;
+		nvmem-cells = <&macaddr_art_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(-1)>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7242_meraki_mr12.dts b/target/linux/ath79/dts/ar7242_meraki_mr12.dts
index 8a19bffe6e..5e82b5bb6b 100644
--- a/target/linux/ath79/dts/ar7242_meraki_mr12.dts
+++ b/target/linux/ath79/dts/ar7242_meraki_mr12.dts
@@ -81,7 +81,8 @@
 		compatible = "pci168c,002a";
 		reg = <0x0000 0 0 0 0>;
 		qca,no-eeprom;
-		mtd-mac-address = <&config 0x66>;
+		nvmem-cells = <&macaddr_config_66>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 	};
 };
@@ -101,7 +102,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&config 0x66>;
+	nvmem-cells = <&macaddr_config_66>;
+	nvmem-cell-names = "mac-address";
 
 	pll-data = <0x02000000 0x00000101 0x00001313>;
 
@@ -116,7 +118,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&config 0x66>;
+	nvmem-cells = <&macaddr_config_66>;
+	nvmem-cell-names = "mac-address";
 };
 
 &spi {
@@ -164,3 +167,13 @@
 		};
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_66: macaddr at 66 {
+		reg = <0x66 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts
index 01f4cb7fde..ae4867521a 100644
--- a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts
+++ b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts
@@ -157,7 +157,8 @@
 		#gpio-cells = <2>;
 		gpio-controller;
 		qca,no-eeprom;
-		mtd-mac-address = <&uboot 0x1fc00>;
+		nvmem-cells = <&macaddr_uboot_1fc00>;
+		nvmem-cell-names = "mac-address";
 	};
 };
 
@@ -165,7 +166,8 @@
 	status = "okay";
 
 	phy-mode = "rgmii";
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 
 	phy-handle = <&phy0>;
 	fixed-link {
@@ -173,3 +175,13 @@
 		full-duplex;
 	};
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-5xp.dts b/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-5xp.dts
index 85e85d8415..b353e76028 100644
--- a/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-5xp.dts
+++ b/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-5xp.dts
@@ -67,10 +67,21 @@
 	phy-handle = <&phy0>;
 	phy-mode = "rgmii";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
 		full-duplex;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts b/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts
index b640badb32..ec17d59d1a 100644
--- a/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts
+++ b/target/linux/ath79/dts/ar7242_ubnt_edgeswitch-8xp.dts
@@ -179,7 +179,8 @@
 
 	phy-mode = "rgmii-rxid";
 	pll-data = <0x16000000 0x00000101 0x00001313>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-handle = <&phy0>;
 	fixed-link {
@@ -187,3 +188,13 @@
 		full-duplex;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi b/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi
index caae72c91f..3f996a16c7 100644
--- a/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi
+++ b/target/linux/ath79/dts/ar7242_ubnt_sw.dtsi
@@ -131,5 +131,16 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar724x_ubnt_xm.dtsi b/target/linux/ath79/dts/ar724x_ubnt_xm.dtsi
index 77dbfc4ac3..341d0bad0d 100644
--- a/target/linux/ath79/dts/ar724x_ubnt_xm.dtsi
+++ b/target/linux/ath79/dts/ar724x_ubnt_xm.dtsi
@@ -79,11 +79,27 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi
index 9bd4656d85..ca1eeab449 100644
--- a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi
+++ b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi
@@ -188,7 +188,8 @@
 	status = "disabled";
 
 	phy-mode = "rgmii";
-	mtd-mac-address = <&art 0x1120c>;
+	nvmem-cells = <&macaddr_art_1120c>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -215,7 +216,8 @@
 	resets = <&rst 13>;
 	reset-names = "mac";
 	qca,mac-idx = <1>;
-	mtd-mac-address = <&art 0x1120c>;
+	nvmem-cells = <&macaddr_art_1120c>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -247,3 +249,13 @@
 &usb_phy {
 	status = "okay";
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_1120c: macaddr at 1120c {
+		reg = <0x1120c 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts
index 606572aaba..354213c440 100644
--- a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts
+++ b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts
@@ -118,7 +118,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 
 	phy-handle = <&phy12>;
 };
@@ -127,5 +128,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts
index 3b406e4d80..12e417d3a4 100644
--- a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts
+++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts
@@ -137,7 +137,8 @@
 	status = "okay";
 
 	phy-mode = "rgmii";
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -149,5 +150,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts
index 821c2aec66..58586eb036 100644
--- a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts
+++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts
@@ -144,7 +144,8 @@
 	status = "okay";
 
 	phy-mode = "rmii";
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <100>;
@@ -155,5 +156,16 @@
 &wmac {
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts
index 6a13c1bafe..b31d0f961b 100644
--- a/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts
+++ b/target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts
@@ -113,13 +113,15 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -133,5 +135,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi b/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi
index 4f428cbb17..e010e5cad0 100644
--- a/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi
+++ b/target/linux/ath79/dts/ar9330_openmesh_om2p.dtsi
@@ -130,13 +130,15 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -144,3 +146,17 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts
index 607ee5f6c9..5383d65884 100644
--- a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts
+++ b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts
@@ -112,7 +112,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -132,5 +133,20 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x2>;
+	nvmem-cells = <&macaddr_art_2>;
+	nvmem-cell-names = "mac-address";
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_2: macaddr at 2 {
+		reg = <0x2 0x6>;
+	};
+
+	macaddr_art_1002: macaddr at 1002 {
+		reg = <0x1002 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts b/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts
index 19a7390977..5801044f4e 100644
--- a/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts
+++ b/target/linux/ath79/dts/ar9330_ziking_cpe46b.dts
@@ -86,14 +86,16 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <2>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <2>;
 };
 
 &wmac {
@@ -101,3 +103,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts
index ba01d25d58..d99e0a422a 100644
--- a/target/linux/ath79/dts/ar9331_8dev_carambola2.dts
+++ b/target/linux/ath79/dts/ar9331_8dev_carambola2.dts
@@ -103,7 +103,8 @@
 
 &eth0 {
 	status = "okay";
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -115,10 +116,25 @@
 
 &eth1 {
 	status = "okay";
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi
index 7734f20e04..e12205c310 100644
--- a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi
+++ b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi
@@ -55,7 +55,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -123,3 +124,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
index b14e70c132..de6b709b5c 100644
--- a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
+++ b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts
@@ -93,7 +93,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment-byte = <3>;
 	mac-address-increment = <0x40>;
 };
@@ -107,3 +108,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_1002: macaddr at 1002 {
+		reg = <0x1002 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9331_etactica_eg200.dts b/target/linux/ath79/dts/ar9331_etactica_eg200.dts
index 95c8a10e0d..402fca80a1 100644
--- a/target/linux/ath79/dts/ar9331_etactica_eg200.dts
+++ b/target/linux/ath79/dts/ar9331_etactica_eg200.dts
@@ -63,7 +63,8 @@
 
 &eth0 {
 	status = "okay";
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -117,3 +118,13 @@
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts b/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts
index 7d6e7bd4af..e5460b299d 100644
--- a/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts
+++ b/target/linux/ath79/dts/ar9331_glinet_gl-mifi.dts
@@ -121,7 +121,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -134,7 +135,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -142,3 +144,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts b/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts
index d1c2654712..6f332dd99b 100644
--- a/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts
+++ b/target/linux/ath79/dts/ar9331_glinet_gl-usb150.dts
@@ -58,7 +58,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -117,3 +118,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi b/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi
index 261657312b..69d974eb53 100644
--- a/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi
+++ b/target/linux/ath79/dts/ar9331_hak5_lan-turtle.dtsi
@@ -24,7 +24,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 
 	gmac-config {
@@ -38,7 +39,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -90,3 +92,13 @@
 &usb_phy {
 	status = "okay";
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9331_hak5_wifi-pineapple-nano.dts b/target/linux/ath79/dts/ar9331_hak5_wifi-pineapple-nano.dts
index 62d5caeb9d..0502d5d14c 100644
--- a/target/linux/ath79/dts/ar9331_hak5_wifi-pineapple-nano.dts
+++ b/target/linux/ath79/dts/ar9331_hak5_wifi-pineapple-nano.dts
@@ -62,7 +62,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
@@ -119,3 +120,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts b/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts
index 873762088a..58ef4ab091 100644
--- a/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts
+++ b/target/linux/ath79/dts/ar9331_pisen_ts-d084.dts
@@ -75,7 +75,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -102,5 +103,16 @@
 &wmac {
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts b/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts
index 3a18249aa6..f438567e52 100644
--- a/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts
+++ b/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts
@@ -83,7 +83,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -111,5 +112,16 @@
 &wmac {
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts b/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts
index c394cf1cb8..1858c74272 100644
--- a/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts
+++ b/target/linux/ath79/dts/ar9331_teltonika_rut230-v1.dts
@@ -109,14 +109,16 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&config 0x0>;
+	nvmem-cells = <&macaddr_config_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&config 0x0>;
-	mtd-mac-address-increment = <1>;
+	nvmem-cells = <&macaddr_config_0>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <1>;
 };
 
 &spi {
@@ -188,6 +190,17 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&config 0x0>;
-	mtd-mac-address-increment = <2>;
+	nvmem-cells = <&macaddr_config_0>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <2>;
+};
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts
index 7df4ed9a98..c420c1a4cd 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts
@@ -146,7 +146,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	gmac-config {
 		device = <&gmac>;
 
@@ -165,5 +166,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts
index 6c353379b7..619fd09ee9 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts
@@ -135,7 +135,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	gmac-config {
 		device = <&gmac>;
 
@@ -154,5 +155,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi
index e31640b87f..5fda458fbc 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi
@@ -80,7 +80,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -110,5 +111,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi
index 248a2b646e..b74b8251ce 100644
--- a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi
+++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi
@@ -121,7 +121,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 
 	gmac-config {
@@ -135,7 +136,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
@@ -143,5 +145,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts b/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts
index 8c87a73508..4a993c9301 100644
--- a/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts
+++ b/target/linux/ath79/dts/ar9341_engenius_eap300-v2.dts
@@ -46,7 +46,8 @@
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -54,3 +55,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts b/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts
index 5c81020ccd..ec574ccf9f 100644
--- a/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts
+++ b/target/linux/ath79/dts/ar9341_engenius_ens202ext-v1.dts
@@ -65,13 +65,15 @@
 
 	phy-handle = <&swphy0>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -84,3 +86,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi b/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi
index 727064def3..2dfdff03d8 100644
--- a/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi
+++ b/target/linux/ath79/dts/ar9341_openmesh_om2p-hs.dtsi
@@ -142,11 +142,13 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -154,3 +156,17 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts
index f822c69aee..4e4daef1c8 100644
--- a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts
+++ b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts
@@ -133,7 +133,8 @@
 	status = "okay";
 
 	phy-handle = <&swphy0>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -141,10 +142,21 @@
 	phy-handle = <&swphy4>;
 	pll-data = <0x06000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
 		switch-phy-swap = <1>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts b/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts
index ffa52b437c..23b5cf7450 100644
--- a/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts
+++ b/target/linux/ath79/dts/ar9341_pisen_wmb001n.dts
@@ -188,7 +188,8 @@
 &eth0 {
 	status = "okay";
 	phy-handle = <&swphy4>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
@@ -213,3 +214,13 @@
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi b/target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi
index 499ef98201..5d5b88c5f3 100644
--- a/target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi
+++ b/target/linux/ath79/dts/ar9341_tplink_tl-wa.dtsi
@@ -54,7 +54,8 @@
 
 	phy-handle = <&swphy0>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -71,5 +72,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9342_ubnt_aircube-ac.dts b/target/linux/ath79/dts/ar9342_ubnt_aircube-ac.dts
index 01bc487626..25adac4e8a 100644
--- a/target/linux/ath79/dts/ar9342_ubnt_aircube-ac.dts
+++ b/target/linux/ath79/dts/ar9342_ubnt_aircube-ac.dts
@@ -96,7 +96,8 @@
 	/* default for ar934x, except for 1000M and 10M */
 	pll-data = <0x06000000 0x00000101 0x00001313>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
@@ -111,3 +112,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9342_ubnt_wa_1port.dtsi b/target/linux/ath79/dts/ar9342_ubnt_wa_1port.dtsi
index 918b69c1da..bd6feb3d78 100644
--- a/target/linux/ath79/dts/ar9342_ubnt_wa_1port.dtsi
+++ b/target/linux/ath79/dts/ar9342_ubnt_wa_1port.dtsi
@@ -18,7 +18,8 @@
 	/* default for ar934x, except for 1000M and 10M */
 	pll-data = <0x02000000 0x00000101 0x00001313>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii-id";
 	phy-handle = <&phy4>;
@@ -29,3 +30,13 @@
 		rxdv-delay = <3>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9342_ubnt_wa_2port.dtsi b/target/linux/ath79/dts/ar9342_ubnt_wa_2port.dtsi
index f2e936bcc4..5024a140f3 100644
--- a/target/linux/ath79/dts/ar9342_ubnt_wa_2port.dtsi
+++ b/target/linux/ath79/dts/ar9342_ubnt_wa_2port.dtsi
@@ -26,7 +26,8 @@
 	/* default for ar934x, except for 1000M and 10M */
 	pll-data = <0x06000000 0x00000101 0x00001313>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
@@ -37,3 +38,13 @@
 		rxdv-delay = <2>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi
index 3089e6b341..ce49c10e5c 100644
--- a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi
+++ b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi
@@ -110,5 +110,16 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts
index 2f87194375..a2ac53b996 100644
--- a/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts
+++ b/target/linux/ath79/dts/ar9344_aerohive_hiveap-121.dts
@@ -106,7 +106,8 @@
 		compatible = "pci168c,0030";
 		reg = <0x0000 0 0 0 0>;
 
-		mtd-mac-address = <&hw_info 0x0>;
+		nvmem-cells = <&macaddr_hw_info_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <2>;
 	};
 };
@@ -160,7 +161,8 @@
 &wmac {
 	status = "okay";
 
-	mtd-mac-address = <&hw_info 0x0>;
+	nvmem-cells = <&macaddr_hw_info_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -215,7 +217,8 @@
 
 	pll-data = <0x06000000 0x00000101 0x00001313>;
 
-	mtd-mac-address = <&hw_info 0x0>;
+	nvmem-cells = <&macaddr_hw_info_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii-id";
 	phy-handle = <&phy0>;
@@ -227,3 +230,13 @@
 		rxdv-delay = <1>;
 	};
 };
+
+&hw_info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_hw_info_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts b/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts
index 486e109c8f..c54270a78d 100644
--- a/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts
+++ b/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts
@@ -90,14 +90,16 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-handle = <&swphy4>;
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ref {
@@ -149,3 +151,17 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts b/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts
index 73e06370f8..94a82baddc 100644
--- a/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts
+++ b/target/linux/ath79/dts/ar9344_comfast_cf-e120a-v3.dts
@@ -120,7 +120,8 @@
 &eth0 {
 	status = "okay";
 	phy-handle = <&swphy0>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -130,10 +131,25 @@
 
 &eth1 {
 	status = "okay";
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts b/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts
index 96549ec2ca..8d42f0c211 100644
--- a/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts
+++ b/target/linux/ath79/dts/ar9344_compex_wpj344-16m.dts
@@ -139,8 +139,19 @@
 
 	pll-data = <0x06000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&uboot 0x2e010>;
+	nvmem-cells = <&macaddr_uboot_2e010>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_2e010: macaddr at 2e010 {
+		reg = <0x2e010 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi
index b61ab75ae8..1cec662569 100644
--- a/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi
+++ b/target/linux/ath79/dts/ar9344_devolo_dlan_wifi.dtsi
@@ -130,7 +130,8 @@
 
 	pll-data = <0x02000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <2>;
 
 	phy-mode = "rgmii";
@@ -168,3 +169,13 @@
 		>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_1002: macaddr at 1002 {
+		reg = <0x1002 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_engenius_eap600.dts b/target/linux/ath79/dts/ar9344_engenius_eap600.dts
index b25e3be17f..5ad8078f83 100644
--- a/target/linux/ath79/dts/ar9344_engenius_eap600.dts
+++ b/target/linux/ath79/dts/ar9344_engenius_eap600.dts
@@ -29,17 +29,30 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-2)>;
 };
 
 &pcie {
 	wifi at 0,0,0 {
-		mtd-mac-address = <&art 0x0>;
+		nvmem-cells = <&macaddr_art_0>;
+		nvmem-cell-names = "mac-address";
 	};
 };
 
 &wmac {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts
index 6c7a99c477..e064994dba 100644
--- a/target/linux/ath79/dts/ar9344_engenius_ecb600.dts
+++ b/target/linux/ath79/dts/ar9344_engenius_ecb600.dts
@@ -24,17 +24,30 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie {
 	wifi at 0,0,0 {
-		mtd-mac-address = <&art 0x0>;
+		nvmem-cells = <&macaddr_art_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(-2)>;
 	};
 };
 
 &wmac {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi
index 52425a071c..c075c38557 100644
--- a/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi
+++ b/target/linux/ath79/dts/ar9344_netgear_wndr.dtsi
@@ -219,7 +219,8 @@
 	/* default for ar934x, except for 1000M */
 	pll-data = <0x06000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&caldata 0x0>;
+	nvmem-cells = <&macaddr_caldata_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
@@ -244,7 +245,8 @@
 &wmac {
 	status = "okay";
 
-	mtd-mac-address = <&caldata 0x0>;
+	nvmem-cells = <&macaddr_caldata_0>;
+	nvmem-cell-names = "mac-address";
 	qca,no-eeprom;
 };
 
@@ -254,9 +256,24 @@
 	ath9k: wifi at 0,0 {
 		compatible = "pci168c,0033";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&caldata 0xc>;
+		nvmem-cells = <&macaddr_caldata_c>;
+		nvmem-cell-names = "mac-address";
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
 };
+
+&caldata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_caldata_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_caldata_c: macaddr at c {
+		reg = <0xc 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
index cf02b711fa..e5e2067846 100644
--- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
+++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts
@@ -129,7 +129,8 @@
 	ath9k: wifi at 0,0 {
 		compatible = "pci168c,0030";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&art 0xc>;
+		nvmem-cells = <&macaddr_art_c>;
+		nvmem-cell-names = "mac-address";
 		qca,no-eeprom;
 		#gpio-cells = <2>;
 		gpio-controller;
@@ -140,7 +141,8 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &mdio0 {
@@ -158,8 +160,27 @@
 
 	pll-data = <0x06000000 0x00000101 0x00001313>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii-id";
 	phy-handle = <&phy0>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+
+	macaddr_art_c: macaddr at c {
+		reg = <0xc 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi b/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi
index 6a7af59147..de8bfb70b7 100644
--- a/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi
+++ b/target/linux/ath79/dts/ar9344_openmesh_mr600.dtsi
@@ -96,7 +96,8 @@
 
 	pll-data = <0x02000000 0x00000101 0x00001313>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii-id";
 	phy-handle = <&phy0>;
@@ -113,7 +114,8 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -124,7 +126,18 @@
 		compatible = "pci168c,0030";
 		reg = <0x0000 0 0 0 0>;
 		qca,no-eeprom;
-		mtd-mac-address = <&art 0x0>;
+		nvmem-cells = <&macaddr_art_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <8>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_openmesh_om5p.dts b/target/linux/ath79/dts/ar9344_openmesh_om5p.dts
index 636595c9ee..3e60d05ed3 100644
--- a/target/linux/ath79/dts/ar9344_openmesh_om5p.dts
+++ b/target/linux/ath79/dts/ar9344_openmesh_om5p.dts
@@ -145,13 +145,15 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -159,3 +161,17 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_pcs_cap324.dts b/target/linux/ath79/dts/ar9344_pcs_cap324.dts
index 4125a40269..1f15a2e8b8 100644
--- a/target/linux/ath79/dts/ar9344_pcs_cap324.dts
+++ b/target/linux/ath79/dts/ar9344_pcs_cap324.dts
@@ -118,7 +118,8 @@
 	ath9k: wifi at 0,0 {
 		compatible = "168c,0030";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&art 0x0>;
+		nvmem-cells = <&macaddr_art_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(-2)>;
 		mtd-cal-data = <&art 0x5000>;
 		qca,no-eeprom;
@@ -133,7 +134,8 @@
 
 	qca,disable-2ghz;
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
@@ -154,8 +156,19 @@
 	/* default for ar934x, except for 1000M */
 	pll-data = <0x06000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts
index 9aaabd0c24..7b99ef7373 100644
--- a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts
+++ b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts
@@ -125,7 +125,8 @@
 	ath9k: wifi at 0,0 {
 		compatible = "pci168c,0030";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&art 0x5002>;
+		nvmem-cells = <&macaddr_art_5002>;
+		nvmem-cell-names = "mac-address";
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
@@ -159,7 +160,8 @@
 	/* default for ar934x, except for 1000M */
 	pll-data = <0x06000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
@@ -209,3 +211,17 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_5002: macaddr at 5002 {
+		reg = <0x5002 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts
index 366a0f720a..7c2f90e72c 100644
--- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts
+++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-16m.dts
@@ -24,14 +24,16 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&pridata 0x400>;
+	nvmem-cells = <&macaddr_pridata_400>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&pridata 0x400>;
+	nvmem-cells = <&macaddr_pridata_400>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -47,3 +49,13 @@
 		reg = <0x070000 0xf90000>;
 	};
 };
+
+&pridata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_pridata_400: macaddr at 400 {
+		reg = <0x400 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts
index 994b842f34..042974610c 100644
--- a/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts
+++ b/target/linux/ath79/dts/ar9344_qxwlan_e750a-v4-8m.dts
@@ -24,14 +24,16 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&pridata 0x400>;
+	nvmem-cells = <&macaddr_pridata_400>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&pridata 0x400>;
+	nvmem-cells = <&macaddr_pridata_400>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -47,3 +49,13 @@
 		reg = <0x070000 0x790000>;
 	};
 };
+
+&pridata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_pridata_400: macaddr at 400 {
+		reg = <0x400 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts
index fb200fae35..195ab9db20 100644
--- a/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts
+++ b/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-16m.dts
@@ -33,7 +33,8 @@
 
 	pll-data = <0x06000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&pridata 0x400>;
+	nvmem-cells = <&macaddr_pridata_400>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
@@ -46,3 +47,13 @@
 		reg = <0x070000 0xf90000>;
 	};
 };
+
+&pridata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_pridata_400: macaddr at 400 {
+		reg = <0x400 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts b/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts
index 75ef13ec13..b81a7f7778 100644
--- a/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts
+++ b/target/linux/ath79/dts/ar9344_qxwlan_e750g-v8-8m.dts
@@ -33,7 +33,8 @@
 
 	pll-data = <0x06000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&pridata 0x400>;
+	nvmem-cells = <&macaddr_pridata_400>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
@@ -46,3 +47,13 @@
 		reg = <0x070000 0x790000>;
 	};
 };
+
+&pridata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_pridata_400: macaddr at 400 {
+		reg = <0x400 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_samsung_wam250.dts b/target/linux/ath79/dts/ar9344_samsung_wam250.dts
index bca757e77f..fd5bf9e81d 100644
--- a/target/linux/ath79/dts/ar9344_samsung_wam250.dts
+++ b/target/linux/ath79/dts/ar9344_samsung_wam250.dts
@@ -66,7 +66,8 @@
 
 	phy-handle = <&swphy0>;
 
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 
 	gmac-config {
@@ -78,7 +79,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gpio {
@@ -154,3 +156,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_1002: macaddr at 1002 {
+		reg = <0x1002 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts b/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts
index 22c2163fec..e017ae2308 100644
--- a/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts
+++ b/target/linux/ath79/dts/ar9344_teltonika_rut955-h7v3c0.dts
@@ -164,14 +164,16 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&config 0x0>;
+	nvmem-cells = <&macaddr_config_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&config 0x0>;
+	nvmem-cells = <&macaddr_config_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &builtin_switch {
@@ -190,3 +192,13 @@
 		pinctrl-single,bits = <0x0 0x002e0000 0x00ff0000>;
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts b/target/linux/ath79/dts/ar9344_teltonika_rut955.dts
index 28dbb74511..56821fccde 100644
--- a/target/linux/ath79/dts/ar9344_teltonika_rut955.dts
+++ b/target/linux/ath79/dts/ar9344_teltonika_rut955.dts
@@ -163,14 +163,16 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&config 0x0>;
+	nvmem-cells = <&macaddr_config_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&config 0x0>;
+	nvmem-cells = <&macaddr_config_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &builtin_switch {
@@ -186,3 +188,13 @@
 					<0x14 0x08 0xff>;
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi
index 53fe69ae00..c989a30b10 100644
--- a/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi
+++ b/target/linux/ath79/dts/ar9344_teltonika_rut9xx.dtsi
@@ -147,7 +147,8 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&config 0x0>;
+	nvmem-cells = <&macaddr_config_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <2>;
 };
 
@@ -171,3 +172,13 @@
 					<0x3c 0x000b0000 0x00ff0000>;
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi b/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi
index fd6aa0f08b..9d8873ddaf 100644
--- a/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi
+++ b/target/linux/ath79/dts/ar9344_tplink_cpe.dtsi
@@ -84,7 +84,8 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth0 {
@@ -92,7 +93,8 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
@@ -114,3 +116,13 @@
 		line-name = "tp-link:ext:lna1";
 	};
 };
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_tplink_cpe_2port.dtsi b/target/linux/ath79/dts/ar9344_tplink_cpe_2port.dtsi
index e7d33ab22b..d539d2e0a6 100644
--- a/target/linux/ath79/dts/ar9344_tplink_cpe_2port.dtsi
+++ b/target/linux/ath79/dts/ar9344_tplink_cpe_2port.dtsi
@@ -45,7 +45,8 @@
 };
 
 &eth1 {
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -53,3 +54,13 @@
 		switch-only-mode = <1>;
 	};
 };
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
index e8f9672b58..6c5d013ccd 100644
--- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
+++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3500-v1.dts
@@ -57,18 +57,21 @@
 };
 
 &ath9k {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &wmac {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 
 	gmac-config {
@@ -83,6 +86,17 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <2>;
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
index f8b4d0385a..262c6f713e 100644
--- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
+++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi
@@ -80,11 +80,13 @@
 };
 
 &ath9k {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
@@ -115,8 +117,19 @@
 	/* default for ar934x, except for 1000M */
 	pll-data = <0x06000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts b/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts
index 4612ae1a66..8471be9b6b 100644
--- a/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts
+++ b/target/linux/ath79/dts/ar9344_ubnt_unifi-ap-pro.dts
@@ -144,8 +144,19 @@
 
 	pll-data = <0x6000000 0x101 0x1616>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii";
 	phy-handle = <&phy0>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
index 87bbd206b2..2586a174cb 100644
--- a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
+++ b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
@@ -141,7 +141,8 @@
 		compatible = "pci168c,0030";
 		reg = <0x0000 0 0 0 0>;
 		qca,no-eeprom;
-		mtd-mac-address = <&addr 0x0>;
+		nvmem-cells = <&macaddr_addr_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <0x10>;
 		#gpio-cells = <2>;
 		gpio-controller;
@@ -179,7 +180,8 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&addr 0x0>;
+	nvmem-cells = <&macaddr_addr_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &mdio0 {
@@ -197,7 +199,8 @@
 
 	pll-data = <0xe000000 0x04000101 0x04001313>;
 
-	mtd-mac-address = <&addr 0x0>;
+	nvmem-cells = <&macaddr_addr_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <0x21>;
 
 	phy-mode = "rgmii-rxid";
@@ -210,3 +213,13 @@
 		rxdv-delay = <1>;
 	};
 };
+
+&addr {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_addr_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts b/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts
index a3b4534cb5..8fc21be1dc 100644
--- a/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts
+++ b/target/linux/ath79/dts/ar9344_zbtlink_zbt-wd323.dts
@@ -84,12 +84,14 @@
 &eth0 {
 	status = "okay";
 	phy-handle = <&swphy4>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &spi {
@@ -150,3 +152,17 @@
 		pinctrl-single,bits = <0x14 0x0 0xff00>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_8dev_lima.dts b/target/linux/ath79/dts/qca9531_8dev_lima.dts
index 7fc84a6787..5a21251d6d 100644
--- a/target/linux/ath79/dts/qca9531_8dev_lima.dts
+++ b/target/linux/ath79/dts/qca9531_8dev_lima.dts
@@ -87,7 +87,8 @@
 
 	phy-handle = <&swphy0>;
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -98,7 +99,8 @@
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -106,3 +108,17 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts
index 4f0e371c22..671adb8ccf 100644
--- a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts
+++ b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts
@@ -106,15 +106,27 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-2)>;
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
 &pcie0 {
 	status = "okay";
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_1002: macaddr at 1002 {
+		reg = <0x1002 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts b/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts
index 4288e92fcd..5a934ce957 100644
--- a/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts
+++ b/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts
@@ -45,7 +45,8 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
@@ -85,3 +86,13 @@
 		#trigger-source-cells = <0>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_1002: macaddr at 1002 {
+		reg = <0x1002 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts
index 1effb4485b..01e14bb0b1 100644
--- a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts
+++ b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts
@@ -50,7 +50,8 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-2)>;
 };
 
@@ -59,7 +60,8 @@
 	 * (GMAC0 -> eth0, GMAC1 -> eth1, same as in old ar71xx target) */
 	compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
 
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
@@ -79,3 +81,13 @@
 		debounce-interval = <60>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_1002: macaddr at 1002 {
+		reg = <0x1002 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts
index e14cf772af..4a84e150ae 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-e130n-v2.dts
@@ -118,7 +118,8 @@
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -129,6 +130,17 @@
 &wmac {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts
index 757a2eaeee..c187521351 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-e313ac.dts
@@ -121,7 +121,8 @@
 
 	phy-handle = <&swphy0>;
 
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -130,7 +131,8 @@
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie0 {
@@ -141,3 +143,17 @@
 		reg = <0 0 0 0 0>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_1002: macaddr at 1002 {
+		reg = <0x1002 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts
index 4738ba56af..c182390b21 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-e314n-v2.dts
@@ -136,14 +136,30 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts
index 57727754bb..d839725258 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-e5.dts
@@ -121,11 +121,13 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -139,3 +141,17 @@
 		pinctrl-single,bits = <0x4 0x0 0xff>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts
index 634d20015d..477a2bddc6 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-e560ac.dts
@@ -150,18 +150,31 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <10>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts
index f67a8cbb72..e5024b39f9 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-ew72.dts
@@ -109,18 +109,31 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <3>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts b/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts
index 44c85b62e1..fc2f6de111 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-wr752ac-v1.dts
@@ -109,7 +109,8 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
@@ -121,6 +122,17 @@
 
 	mtd-cal-data = <&art 0x1000>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <10>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts b/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts
index 89822586ff..16a2794b97 100644
--- a/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts
+++ b/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts
@@ -105,11 +105,13 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&uboot 0x2e010>;
+	nvmem-cells = <&macaddr_uboot_2e010>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x2e018>;
+	nvmem-cells = <&macaddr_uboot_2e018>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -134,3 +136,17 @@
 &usb0 {
 	status = "okay";
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_2e010: macaddr at 2e010 {
+		reg = <0x2e010 0x6>;
+	};
+
+	macaddr_uboot_2e018: macaddr at 2e018 {
+		reg = <0x2e018 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
index 3b20fa51ab..d4e1e6b237 100644
--- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
@@ -146,11 +146,13 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -158,3 +160,13 @@
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
index 80623085f0..60bd2922a2 100644
--- a/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar750.dts
@@ -129,11 +129,13 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -142,3 +144,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
index 98022d7cc5..ca0784e6bf 100644
--- a/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-e750.dts
@@ -120,7 +120,8 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
@@ -132,3 +133,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts
index 8cb611c11d..7fd622a8c5 100644
--- a/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts
@@ -118,11 +118,13 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -131,3 +133,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi b/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi
index 6423ae0272..ce515159b1 100644
--- a/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi
+++ b/target/linux/ath79/dts/qca9531_qxwlan_e600g.dtsi
@@ -95,12 +95,14 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&pridata 0x400>;
+	nvmem-cells = <&macaddr_pridata_400>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&pridata 0x400>;
+	nvmem-cells = <&macaddr_pridata_400>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -108,3 +110,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&pridata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_pridata_400: macaddr at 400 {
+		reg = <0x400 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_telco_t1.dts b/target/linux/ath79/dts/qca9531_telco_t1.dts
index eaaf4f154c..540de60377 100644
--- a/target/linux/ath79/dts/qca9531_telco_t1.dts
+++ b/target/linux/ath79/dts/qca9531_telco_t1.dts
@@ -118,11 +118,13 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -136,3 +138,17 @@
 		pinctrl-single,bits = <0x4 0x0 0xff>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
index 1113c51be5..27b70e082a 100644
--- a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
+++ b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
@@ -146,19 +146,22 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&romfile 0xf100>;
+	nvmem-cells = <&macaddr_romfile_f100>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&romfile 0xf100>;
+	nvmem-cells = <&macaddr_romfile_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&romfile 0xf100>;
+	nvmem-cells = <&macaddr_romfile_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie0 {
@@ -184,3 +187,13 @@
 		#trigger-source-cells = <0>;
 	};
 };
+
+&romfile {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_romfile_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts
index 4c730375a6..818ec77695 100644
--- a/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts
+++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr3420-v3.dts
@@ -171,19 +171,22 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &usb0 {
@@ -200,3 +203,13 @@
 &usb_phy {
 	status = "okay";
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
index 47d9e0846a..ca7832ebd4 100644
--- a/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
+++ b/target/linux/ath79/dts/qca9531_tplink_tl-mr6400-v1.dts
@@ -128,12 +128,14 @@
 
 	phy-handle = <&swphy0>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
@@ -141,7 +143,8 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &usb0 {
@@ -158,3 +161,13 @@
 &usb_phy {
 	status = "okay";
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
index a769a81d58..7ce8cd30cd 100644
--- a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
+++ b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
@@ -147,7 +147,8 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -159,7 +160,8 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie0 {
@@ -185,3 +187,13 @@
 		#trigger-source-cells = <0>;
 	};
 };
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_wallys_dr531.dts b/target/linux/ath79/dts/qca9531_wallys_dr531.dts
index abf821b11b..9982914442 100644
--- a/target/linux/ath79/dts/qca9531_wallys_dr531.dts
+++ b/target/linux/ath79/dts/qca9531_wallys_dr531.dts
@@ -76,7 +76,8 @@
 	status = "okay";
 
 	phy-handle = <&swphy4>;
-	mtd-mac-address = <&env 0xf818>;
+	nvmem-cells = <&macaddr_env_f818>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
@@ -84,7 +85,8 @@
 	 * (GMAC0 -> eth0, GMAC1 -> eth1, same as in old ar71xx target) */
 	compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
 
-	mtd-mac-address = <&env 0xf810>;
+	nvmem-cells = <&macaddr_env_f810>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie0 {
@@ -150,3 +152,17 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&env {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_env_f810: macaddr at f810 {
+		reg = <0xf810 0x6>;
+	};
+
+	macaddr_env_f818: macaddr at f818 {
+		reg = <0xf818 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9531_yuncore_a770.dts b/target/linux/ath79/dts/qca9531_yuncore_a770.dts
index c58b0c4e38..a255342015 100644
--- a/target/linux/ath79/dts/qca9531_yuncore_a770.dts
+++ b/target/linux/ath79/dts/qca9531_yuncore_a770.dts
@@ -98,11 +98,13 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie0 {
@@ -114,3 +116,17 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts b/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts
index 8deeea4245..64df0cff7c 100644
--- a/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts
+++ b/target/linux/ath79/dts/qca9533_comfast_cf-e110n-v2.dts
@@ -134,11 +134,13 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x1002>;
+	nvmem-cells = <&macaddr_art_1002>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -149,5 +151,24 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+
+	macaddr_art_1002: macaddr at 1002 {
+		reg = <0x1002 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi b/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi
index e38fc9378a..8a51d6b6d6 100644
--- a/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi
+++ b/target/linux/ath79/dts/qca9533_openmesh_om2p-v4.dtsi
@@ -132,7 +132,8 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
@@ -141,13 +142,29 @@
 	 */
 	compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <2>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi b/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi
index 6df843f143..602365f45d 100644
--- a/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi
+++ b/target/linux/ath79/dts/qca9533_plasmacloud_pa300.dtsi
@@ -114,7 +114,8 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
@@ -123,7 +124,8 @@
 	 */
 	compatible = "qca,qca9530-eth", "syscon", "simple-mfd";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -131,6 +133,17 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <2>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9533_tplink_cpe220-v3.dts b/target/linux/ath79/dts/qca9533_tplink_cpe220-v3.dts
index 1d8098944a..fb31aa2872 100644
--- a/target/linux/ath79/dts/qca9533_tplink_cpe220-v3.dts
+++ b/target/linux/ath79/dts/qca9533_tplink_cpe220-v3.dts
@@ -20,7 +20,8 @@
 };
 
 &eth1 {
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -28,3 +29,13 @@
 		switch-only-mode = <1>;
 	};
 };
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9533_tplink_cpexxx.dtsi b/target/linux/ath79/dts/qca9533_tplink_cpexxx.dtsi
index d5eeec13b7..3f3fae1dfd 100644
--- a/target/linux/ath79/dts/qca9533_tplink_cpexxx.dtsi
+++ b/target/linux/ath79/dts/qca9533_tplink_cpexxx.dtsi
@@ -108,12 +108,24 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
+};
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi
index 6033acddf3..43db72ec65 100644
--- a/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wa801nd.dtsi
@@ -102,7 +102,8 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
@@ -113,5 +114,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts
index 45fe9e86b3..e7d837a574 100644
--- a/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wa850re-v2.dts
@@ -150,7 +150,8 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
@@ -161,5 +162,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
+};
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi
index 1835cbcb96..4be1ced4b2 100644
--- a/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr802n.dtsi
@@ -73,7 +73,8 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -85,5 +86,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi
index df68a56d47..c9c109ee39 100644
--- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi
@@ -108,17 +108,30 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts
index 7170601f6a..07b706251a 100644
--- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841hp-v3.dts
@@ -130,17 +130,30 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
-	mtd-mac-address-increment = <1>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts
index cb93afa233..e171984511 100644
--- a/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts
+++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr842n-v3.dts
@@ -148,17 +148,30 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9533_ubnt_aircube-isp.dts b/target/linux/ath79/dts/qca9533_ubnt_aircube-isp.dts
index f7910b3d6f..e854f3700c 100644
--- a/target/linux/ath79/dts/qca9533_ubnt_aircube-isp.dts
+++ b/target/linux/ath79/dts/qca9533_ubnt_aircube-isp.dts
@@ -76,11 +76,13 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -91,3 +93,17 @@
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi b/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi
index 27d9681ead..e49b8fc1ca 100644
--- a/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi
+++ b/target/linux/ath79/dts/qca953x_tplink_tl-wr810n.dtsi
@@ -90,17 +90,30 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9550_airtight_c-75.dts b/target/linux/ath79/dts/qca9550_airtight_c-75.dts
index a984b38ad2..0121753445 100644
--- a/target/linux/ath79/dts/qca9550_airtight_c-75.dts
+++ b/target/linux/ath79/dts/qca9550_airtight_c-75.dts
@@ -63,7 +63,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-handle = <&phy0>;
 	pll-data = <0xa6000000 0x00000101 0x00001616>;
 };
@@ -87,7 +88,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 
 	fixed-link {
@@ -179,3 +181,17 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9557_8dev_rambutan.dts b/target/linux/ath79/dts/qca9557_8dev_rambutan.dts
index 638d78a7a5..2724c3a1b6 100644
--- a/target/linux/ath79/dts/qca9557_8dev_rambutan.dts
+++ b/target/linux/ath79/dts/qca9557_8dev_rambutan.dts
@@ -77,7 +77,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-mode = "mii";
 	phy-handle = <&phy0>;
 };
@@ -88,7 +89,8 @@
 	pll-data = <0x17000000 0x101 0x1313>;
 	phy-handle = <&phy1>;
 	qca955x-sgmii-fixup;
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -123,3 +125,17 @@
 	#address-cells = <1>;
 	#size-cells = <0>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts b/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts
index dce1a2144f..a4e2a615f6 100644
--- a/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts
+++ b/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts
@@ -118,7 +118,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-handle = <&phy0>;
 	pll-data = <0x56000000 0x00000101 0x00001616>;
 };
@@ -126,7 +127,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 
 	fixed-link {
@@ -134,3 +136,17 @@
 		full-duplex;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts b/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts
index 0b006bcffb..3b3a3e3c3d 100644
--- a/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts
+++ b/target/linux/ath79/dts/qca9557_engenius_eap1200h.dts
@@ -77,7 +77,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-handle = <&phy5>;
 	phy-mode = "rgmii-id";
@@ -89,6 +90,17 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts b/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts
index 9a45bd4277..812fcfc5dc 100644
--- a/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts
+++ b/target/linux/ath79/dts/qca9557_engenius_enstationac-v1.dts
@@ -88,7 +88,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-handle = <&phy1>;
 	phy-mode = "rgmii-id";
@@ -99,7 +100,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 
 	phy-handle = <&phy2>;
@@ -108,3 +110,13 @@
 
 	qca955x-sgmii-fixup;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
index 3b9e25e3e8..aa1f4ad02b 100644
--- a/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
+++ b/target/linux/ath79/dts/qca9558_allnet_all-wap02860ac.dts
@@ -59,7 +59,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-handle = <&phy5>;
 	phy-mode = "rgmii-id";
@@ -89,7 +90,17 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
-	qca-no-eeprom;
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi
index 81c2c0866f..23fe321efb 100644
--- a/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi
+++ b/target/linux/ath79/dts/qca9558_belkin_f9x-v2.dtsi
@@ -185,7 +185,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-handle = <&phy0>;
 	pll-data = <0xa6000000 0x00000101 0x00001616>;
 
@@ -198,7 +199,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 
@@ -222,3 +224,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts
index 85617cc809..d078df1989 100644
--- a/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts
+++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200e.dts
@@ -58,7 +58,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x00>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 
 	phy-handle = <&phy1>;
@@ -66,3 +67,13 @@
 
 	qca955x-sgmii-fixup;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts
index 895398e358..d60e7c4857 100644
--- a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts
+++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts
@@ -93,7 +93,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x00>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 
 	phy-handle = <&phy1>;
@@ -101,3 +102,13 @@
 
 	qca955x-sgmii-fixup;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi
index ba7f014e6a..b96b314fa5 100644
--- a/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi
+++ b/target/linux/ath79/dts/qca9558_devolo_dvl1xxx.dtsi
@@ -99,7 +99,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x00>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-handle = <&phy4>;
 
 	gmac_config: gmac-config {
@@ -113,6 +114,17 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x00>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-2)>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts b/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts
index 0c42208c20..5b3318b8b2 100644
--- a/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts
+++ b/target/linux/ath79/dts/qca9558_domywifi_dw33d.dts
@@ -182,7 +182,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	pll-data = <0x56000000 0x00000101 0x00001616>;
 	phy-handle = <&phy0>;
 };
@@ -190,7 +191,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 	fixed-link {
 		speed = <1000>;
@@ -202,5 +204,24 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0xc>;
+	nvmem-cells = <&macaddr_art_c>;
+	nvmem-cell-names = "mac-address";
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+
+	macaddr_art_c: macaddr at c {
+		reg = <0xc 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts
index ddb91d0791..6cd8ba4578 100644
--- a/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts
+++ b/target/linux/ath79/dts/qca9558_librerouter_librerouter-v1.dts
@@ -167,7 +167,8 @@
 	status = "okay";
 
 	pll-data = <0xa6000000 0x00000101 0x00001616>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-handle = <&phy0>;
 };
@@ -176,7 +177,8 @@
 	status = "okay";
 
 	pll-data = <0x03000101 0x00000101 0x00001616>;
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -188,5 +190,24 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0xc>;
+	nvmem-cells = <&macaddr_art_c>;
+	nvmem-cell-names = "mac-address";
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+
+	macaddr_art_c: macaddr at c {
+		reg = <0xc 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi b/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi
index 2f7cdcf8c3..6c5ed4defb 100644
--- a/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi
+++ b/target/linux/ath79/dts/qca9558_netgear_ex7300.dtsi
@@ -188,7 +188,8 @@
 	status = "okay";
 
 	mtd-cal-data = <&caldata 0x1000>;
-	mtd-mac-address = <&caldata 0x06>;
+	nvmem-cells = <&macaddr_caldata_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &mdio0 {
@@ -203,10 +204,25 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&caldata 0x00>;
+	nvmem-cells = <&macaddr_caldata_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-handle = <&phy4>;
 	phy-mode = "rgmii-rxid";
 
 	pll-data = <0x86000000 0x80000101 0x80001313>;
 };
+
+&caldata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_caldata_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_caldata_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts
index fd54a6e8c2..66f8c6589b 100644
--- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts
+++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts
@@ -124,7 +124,8 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x06>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &mdio0 {
@@ -140,10 +141,25 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x00>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-handle = <&phy5>;
 	phy-mode = "rgmii-rxid";
 
 	pll-data = <0x8e000000 0x80000101 0x80001313>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_ocedo_ursus.dts b/target/linux/ath79/dts/qca9558_ocedo_ursus.dts
index 05c2d2d1dc..2dc4c07e91 100644
--- a/target/linux/ath79/dts/qca9558_ocedo_ursus.dts
+++ b/target/linux/ath79/dts/qca9558_ocedo_ursus.dts
@@ -95,7 +95,8 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x06>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &mdio0 {
@@ -113,7 +114,8 @@
 
 &eth0 {
 	status = "okay";
-	mtd-mac-address = <&art 0x00>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii-rxid";
 	phy-handle = <&phy1>;
@@ -132,8 +134,27 @@
 
 &eth1 {
 	status = "okay";
-	mtd-mac-address = <&art 0x12>;
+	nvmem-cells = <&macaddr_art_12>;
+	nvmem-cell-names = "mac-address";
 	phy-handle = <&phy2>;
 	pll-data = <0x3000101 0x101 0x1313>;
 	qca955x-sgmii-fixup;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+
+	macaddr_art_12: macaddr at 12 {
+		reg = <0x12 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi b/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi
index 9938e5f4c0..05d3a4f341 100644
--- a/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi
+++ b/target/linux/ath79/dts/qca9558_openmesh_a60.dtsi
@@ -140,7 +140,8 @@
 
 	pll-data = <0x82000101 0x80000101 0x80001313>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii-id";
 	phy-handle = <&phy1>;
@@ -160,7 +161,8 @@
 
 	pll-data = <0x03000101 0x80000101 0x80001313>;
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 
 	qca955x-sgmii-fixup;
 
@@ -171,10 +173,25 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <2>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <2>;
 };
 
 &pcie0 {
 	status = "okay";
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi b/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi
index fa379030e7..8c4856f1ea 100644
--- a/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi
+++ b/target/linux/ath79/dts/qca9558_openmesh_mr.dtsi
@@ -141,7 +141,8 @@
 
 	pll-data = <0x82000000 0x80000101 0x80001313>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "rgmii-id";
 	phy-handle = <&phy5>;
@@ -156,10 +157,21 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &pcie0 {
 	status = "okay";
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts b/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts
index 6704fbbe81..ff33a075f5 100644
--- a/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts
+++ b/target/linux/ath79/dts/qca9558_openmesh_mr900-v1.dts
@@ -19,7 +19,18 @@
 	wifi at 0,0 {
 		compatible = "pci168c,0033";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&art 0x0>;
+		nvmem-cells = <&macaddr_art_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <16>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts b/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts
index 7221b5b098..12ebb67ba6 100644
--- a/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts
+++ b/target/linux/ath79/dts/qca9558_openmesh_mr900-v2.dts
@@ -19,7 +19,18 @@
 	wifi at 0,0 {
 		compatible = "pci168c,0033";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&art 0x0>;
+		nvmem-cells = <&macaddr_art_0>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <16>;
 	};
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi b/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi
index e1c44af3f7..5b28af5ca6 100644
--- a/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi
+++ b/target/linux/ath79/dts/qca9558_qxwlan_e558.dtsi
@@ -127,7 +127,8 @@
 
 	phy-handle = <&phy0>;
 
-	mtd-mac-address = <&pridata 0x400>;
+	nvmem-cells = <&macaddr_pridata_400>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -136,7 +137,8 @@
 
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&pridata 0x400>;
+	nvmem-cells = <&macaddr_pridata_400>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -165,3 +167,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&pridata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_pridata_400: macaddr at 400 {
+		reg = <0x400 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts b/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts
index 90332f1874..4f822fbc7d 100644
--- a/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts
+++ b/target/linux/ath79/dts/qca9558_tplink_archer-d7-v1.dts
@@ -70,15 +70,28 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&romfs 0xf100>;
+	nvmem-cells = <&macaddr_romfs_f100>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&romfs 0xf100>;
+	nvmem-cells = <&macaddr_romfs_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&romfs 0xf100>;
+	nvmem-cells = <&macaddr_romfs_f100>;
+	nvmem-cell-names = "mac-address";
+};
+
+&romfs {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_romfs_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts b/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts
index 754cb17918..9adaa7fa6d 100644
--- a/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts
+++ b/target/linux/ath79/dts/qca9558_tplink_archer-d7b-v1.dts
@@ -64,15 +64,28 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&romfs 0xf100>;
+	nvmem-cells = <&macaddr_romfs_f100>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &eth1 {
-	mtd-mac-address = <&romfs 0xf100>;
+	nvmem-cells = <&macaddr_romfs_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&romfs 0xf100>;
+	nvmem-cells = <&macaddr_romfs_f100>;
+	nvmem-cell-names = "mac-address";
+};
+
+&romfs {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_romfs_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts b/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts
index c0fbeb5a43..0966f01908 100644
--- a/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts
+++ b/target/linux/ath79/dts/qca9558_tplink_re350k-v1.dts
@@ -99,7 +99,8 @@
 	phy-handle = <&phy4>;
 	pll-data = <0x9e000000 0x80000101 0x80001313>;
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 
 	gmac-config {
 		device = <&gmac>;
@@ -172,5 +173,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
+};
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
index b12b547a7f..31089f339d 100644
--- a/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
+++ b/target/linux/ath79/dts/qca9558_tplink_rex5x.dtsi
@@ -158,13 +158,25 @@
 	phy-handle = <&phy4>;
 	pll-data = <0xa6000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts
index 10d6e6040b..5b69a1708e 100644
--- a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts
+++ b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts
@@ -96,7 +96,8 @@
 	ath9k: wifi at 0,0 {
 		compatible = "pci168c,0033";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&uboot 0x1fc00>;
+		nvmem-cells = <&macaddr_uboot_1fc00>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(-2)>;
 		qca,no-eeprom;
 		#gpio-cells = <2>;
@@ -190,7 +191,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 	phy-handle = <&phy0>;
 	pll-data = <0x56000000 0x00000101 0x00001616>;
@@ -204,7 +206,8 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 
 	fixed-link {
@@ -217,6 +220,17 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi
index 8f2b626bad..ff7ea7da03 100644
--- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi
+++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi
@@ -145,7 +145,8 @@
 
 	pll-data = <0x56000000 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 	phy-handle = <&phy0>;
 };
@@ -155,7 +156,8 @@
 
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 
 	fixed-link {
 		speed = <1000>;
@@ -166,5 +168,16 @@
 &wmac {
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts
index 058acda746..27bf82d20d 100644
--- a/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts
+++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr941n-v7-cn.dts
@@ -103,7 +103,8 @@
 &eth0 {
 	status = "okay";
 	phy-mode = "mii";
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	fixed-link {
 		speed = <100>;
 		full-duplex;
@@ -113,5 +114,16 @@
 &wmac {
 	status = "okay";
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9558_ubnt_powerbeam-5ac-500.dts b/target/linux/ath79/dts/qca9558_ubnt_powerbeam-5ac-500.dts
index 3d90531a31..9d3d1395f9 100644
--- a/target/linux/ath79/dts/qca9558_ubnt_powerbeam-5ac-500.dts
+++ b/target/linux/ath79/dts/qca9558_ubnt_powerbeam-5ac-500.dts
@@ -32,7 +32,18 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-mode = "sgmii";
 	phy-handle = <&phy4>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9558_ubnt_rocket-5ac-lite.dts b/target/linux/ath79/dts/qca9558_ubnt_rocket-5ac-lite.dts
index e8e2322c56..0458fcaa4d 100644
--- a/target/linux/ath79/dts/qca9558_ubnt_rocket-5ac-lite.dts
+++ b/target/linux/ath79/dts/qca9558_ubnt_rocket-5ac-lite.dts
@@ -32,7 +32,18 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-mode = "sgmii";
 	phy-handle = <&phy4>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts
index 66a578305d..4b371e0e8e 100644
--- a/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts
+++ b/target/linux/ath79/dts/qca9561_tplink_archer-c25-v1.dts
@@ -172,13 +172,15 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -186,5 +188,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
+};
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts b/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts
index a39fde01e5..ecb427029d 100644
--- a/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts
+++ b/target/linux/ath79/dts/qca9561_tplink_eap225-wall-v2.dts
@@ -129,12 +129,24 @@
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
+};
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts b/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts
index 6693a5cd73..6e45fbb20f 100644
--- a/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts
+++ b/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts
@@ -120,19 +120,36 @@
 	status = "okay";
 
 	phy-handle = <&swphy4>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x6>;
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts b/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts
index 1eeb02f7f9..1337341b0b 100644
--- a/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts
+++ b/target/linux/ath79/dts/qca9563_comfast_cf-e375ac.dts
@@ -124,7 +124,8 @@
 	pll-data = <0x03000101 0x00000101 0x00001919>;
 
 	phy-mode = "sgmii";
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-handle = <&phy0>;
 };
 
@@ -132,6 +133,17 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&art 0x0>;
-	mtd-mac-address-increment = <10>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <10>;
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9563_compex_wpj563.dts b/target/linux/ath79/dts/qca9563_compex_wpj563.dts
index aa829413dc..ba31f40fe2 100644
--- a/target/linux/ath79/dts/qca9563_compex_wpj563.dts
+++ b/target/linux/ath79/dts/qca9563_compex_wpj563.dts
@@ -118,7 +118,8 @@
 
 	pll-data = <0x03000101 0x00000101 0x00001919>;
 
-	mtd-mac-address = <&uboot 0x2e010>;
+	nvmem-cells = <&macaddr_uboot_2e010>;
+	nvmem-cell-names = "mac-address";
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
 };
@@ -136,3 +137,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_2e010: macaddr at 2e010 {
+		reg = <0x2e010 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi
index 9226d37a43..878a740cfd 100644
--- a/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi
+++ b/target/linux/ath79/dts/qca9563_glinet_gl-ar750s.dtsi
@@ -123,7 +123,8 @@
 	status = "okay";
 
 	phy-handle = <&phy0>;
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gpio {
@@ -175,3 +176,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
index 8c6a374131..6090fdf527 100644
--- a/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
+++ b/target/linux/ath79/dts/qca9563_netgear_wndr.dtsi
@@ -201,7 +201,8 @@
 
 	pll-data = <0x03000101 0x00000101 0x00001919>;
 
-	mtd-mac-address = <&caldata 0x0>;
+	nvmem-cells = <&macaddr_caldata_0>;
+	nvmem-cell-names = "mac-address";
 
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
@@ -210,7 +211,8 @@
 &wmac {
 	status = "okay";
 
-	mtd-mac-address = <&caldata 0x0>;
+	nvmem-cells = <&macaddr_caldata_0>;
+	nvmem-cell-names = "mac-address";
 	qca,no-eeprom;
 };
 
@@ -221,7 +223,8 @@
 		/* chip is AR9580, override bogus PCI ID 168c:abcd */
 		compatible = "pci168c,0033";
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&caldata 0xc>;
+		nvmem-cells = <&macaddr_caldata_c>;
+		nvmem-cell-names = "mac-address";
 		qca,no-eeprom;
 		qca,gpio-mask=<0xf6ff>;	/* unmask pin 9 for RFKILL button */
 		#gpio-cells = <2>;
@@ -243,3 +246,17 @@
 		#trigger-source-cells = <0>;
 	};
 };
+
+&caldata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_caldata_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_caldata_c: macaddr at c {
+		reg = <0xc 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi b/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi
index 9cf146c918..91c73567d8 100644
--- a/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi
+++ b/target/linux/ath79/dts/qca9563_qxwlan_e1700ac.dtsi
@@ -118,7 +118,8 @@
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
 
-	mtd-mac-address = <&pridata 0x400>;
+	nvmem-cells = <&macaddr_pridata_400>;
+	nvmem-cell-names = "mac-address";
 };
 
 &usb_phy0 {
@@ -149,3 +150,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&pridata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_pridata_400: macaddr at 400 {
+		reg = <0x400 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts
index a88eeb3de0..c08291560b 100644
--- a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts
+++ b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts
@@ -107,7 +107,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&info 0x0>;
+	nvmem-cells = <&macaddr_info_0>;
+	nvmem-cell-names = "mac-address";
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
 };
@@ -147,3 +148,13 @@
 		#trigger-source-cells = <0>;
 	};
 };
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts
index 6c4b04b81c..81c25fc01d 100644
--- a/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts
+++ b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts
@@ -161,7 +161,8 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
 };
@@ -170,5 +171,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
+};
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts
index 63040acf4a..4334475ff7 100644
--- a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts
+++ b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts
@@ -247,7 +247,8 @@
 	pll-data = <0x03000101 0x00000101 0x00001919>;
 
 	phy-mode = "sgmii";
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 	phy-handle = <&phy0>;
 };
 
@@ -255,5 +256,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
+};
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts b/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts
index 6b438ce126..ee9f5ff5c7 100644
--- a/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts
+++ b/target/linux/ath79/dts/qca9563_tplink_eap245-v3.dts
@@ -146,12 +146,24 @@
 	phy-handle = <&phy0>;
 	phy-mode = "sgmii";
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
+};
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi b/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi
index a6aefc7b55..e10c5dbb73 100644
--- a/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi
+++ b/target/linux/ath79/dts/qca9563_tplink_eap2x5-1port.dtsi
@@ -114,7 +114,8 @@
 	phy-mode = "sgmii";
 	pll-data = <0x03000000 0x00000101 0x00001313>;
 
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 
 	qca956x-serdes-fixup;
 
@@ -127,5 +128,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
+};
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts
index 4df03efb44..d0fa6d332f 100644
--- a/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts
+++ b/target/linux/ath79/dts/qca9563_tplink_tl-wpa8630-v1.dts
@@ -38,9 +38,21 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&uboot 0x0fc00>;
+	nvmem-cells = <&macaddr_uboot_fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
-	mtd-mac-address = <&uboot 0x0fc00>;
+	nvmem-cells = <&macaddr_uboot_fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_fc00: macaddr at fc00 {
+		reg = <0xfc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi
index b41e90abe8..d2797086f4 100644
--- a/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi
+++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac-lite.dtsi
@@ -21,9 +21,20 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-mode = "sgmii";
 	phy-handle = <&phy4>;
 
 	pll-data = <0x03000000 0x00000101 0x00001313>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi
index 5a0cf4bade..f3dc068605 100644
--- a/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi
+++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac-pro.dtsi
@@ -25,6 +25,17 @@
 &eth0 {
 	status = "okay";
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-handle = <&phy0>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
index d8fc589d58..a7a73ad2fb 100644
--- a/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
+++ b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
@@ -163,7 +163,8 @@
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -175,3 +176,13 @@
 &pcie {
 	status = "okay";
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi b/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi
index 4eed20bea4..f8dec2bc6b 100644
--- a/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi
+++ b/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi
@@ -26,7 +26,8 @@
 
 	pll-data = <0x03000101 0x00000101 0x00001919>;
 
-	mtd-mac-address = <&art 0x0>;
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
 	phy-mode = "sgmii";
 	phy-handle = <&phy0>;
 };
@@ -105,3 +106,13 @@
 
 	mtd-cal-data = <&art 0x1000>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi
index c1c553e8c8..416623fec4 100644
--- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi
+++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v3.dtsi
@@ -63,6 +63,17 @@
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts
index 21a2be993c..35facbdade 100644
--- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts
+++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v4.dts
@@ -66,5 +66,16 @@
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts
index 4334b70ce8..1bc3b0ae90 100644
--- a/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts
+++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr940n-v6.dts
@@ -30,5 +30,16 @@
 };
 
 &eth1 {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts b/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts
index 7451f00740..d4638f1acf 100644
--- a/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts
+++ b/target/linux/ath79/dts/tp9343_tplink_tl-wr941hp-v1.dts
@@ -136,19 +136,32 @@
 
 	phy-handle = <&swphy0>;
 
-	mtd-mac-address = <&config 0x8>;
-	mtd-mac-address-increment = <1>;
+	nvmem-cells = <&macaddr_config_8>;
+	nvmem-cell-names = "mac-address";
+	mac-address-increment = <1>;
 };
 
 &eth1 {
 	status = "okay";
 
-	mtd-mac-address = <&config 0x8>;
+	nvmem-cells = <&macaddr_config_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&config 0x8>;
+	nvmem-cells = <&macaddr_config_8>;
+	nvmem-cell-names = "mac-address";
+};
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
 };
diff --git a/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi b/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi
index 14e10596b5..3a38b8025a 100644
--- a/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi
+++ b/target/linux/ath79/dts/tp9343_tplink_tl-wx.dtsi
@@ -50,7 +50,8 @@
 
 	phy-handle = <&swphy4>;
 
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -62,5 +63,16 @@
 	status = "okay";
 
 	mtd-cal-data = <&art 0x1000>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
+};
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
 };


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:49 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:49 -0400
Subject: [openwrt/openwrt] ramips: convert mtd-mac-address to nvmem
 implementation
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8542.1626699119.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/06bb4a5018cd84dc4553e71c273e2daae2c996ab

commit 06bb4a5018cd84dc4553e71c273e2daae2c996ab
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 2 23:50:02 2021 +0200

    ramips: convert mtd-mac-address to nvmem implementation
    
    Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
    The conversion is done with an automated script.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 .../linux/ramips/dts/mt7620a_aigale_ai-br100.dts   | 13 ++++++++++-
 .../ramips/dts/mt7620a_alfa-network_ac1200rm.dts   | 13 ++++++++++-
 .../ramips/dts/mt7620a_alfa-network_r36m-e4g.dts   | 13 ++++++++++-
 .../ramips/dts/mt7620a_alfa-network_tube-e4g.dts   | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi  | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts  | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts | 13 ++++++++++-
 .../ramips/dts/mt7620a_buffalo_whr-300hp2.dts      | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_buffalo_whr-600d.dts  | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_cameo_810.dtsi     | 19 ++++++++++++---
 target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts  | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts  | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts  | 13 ++++++++++-
 .../ramips/dts/mt7620a_edimax_br-6478ac-v2.dts     | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi   | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_engenius_esr600.dts   | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_fon_fon2601.dts    | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts  | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts  | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_glinet_gl-mt750.dts   | 13 ++++++++++-
 .../ramips/dts/mt7620a_head-weblink_hdrm200.dts    | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts  | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_hnet_c108.dts      | 13 ++++++++++-
 .../ramips/dts/mt7620a_iodata_wn-ac1167gr.dts      | 13 ++++++++++-
 .../ramips/dts/mt7620a_iodata_wn-ac733gr3.dts      | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_iptime.dtsi        | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts   | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts  | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts  | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_linksys_e1700.dts  | 13 ++++++++++-
 .../ramips/dts/mt7620a_microduino_microwrt.dts     | 13 ++++++++++-
 .../ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi  | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_netis_wf2770.dts   | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_phicomm_k2g.dts    | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_phicomm_psg1208.dts   | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_phicomm_psg1218a.dts  | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_phicomm_psg1218b.dts  | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_planex_db-wrt01.dts   | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts | 13 ++++++++++-
 .../ramips/dts/mt7620a_planex_mzk-ex300np.dts      | 13 ++++++++++-
 .../ramips/dts/mt7620a_planex_mzk-ex750np.dts      | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_sanlinking_d240.dts   | 13 ++++++++++-
 .../ramips/dts/mt7620a_tplink_archer-c2-v1.dts     | 19 ++++++++++++---
 .../ramips/dts/mt7620a_tplink_archer-c20-v1.dts    | 16 +++++++++++--
 .../ramips/dts/mt7620a_tplink_archer-c20i.dts      | 16 +++++++++++--
 .../ramips/dts/mt7620a_tplink_archer-c50-v1.dts    | 16 +++++++++++--
 .../ramips/dts/mt7620a_tplink_archer-mr200.dts     | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_tplink_archer.dtsi | 13 ++++++++++-
 .../linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi  | 19 ++++++++++++---
 .../ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts     | 13 ++++++++++-
 .../ramips/dts/mt7620a_wavlink_wl-wn579x3.dts      | 13 ++++++++++-
 .../ramips/dts/mt7620a_xiaomi_miwifi-mini.dts      | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi   | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_yukai_bocco.dts    | 13 ++++++++++-
 .../ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts    | 13 ++++++++++-
 .../ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi     | 13 ++++++++++-
 target/linux/ramips/dts/mt7620a_zte_q7.dts         | 13 ++++++++++-
 .../ramips/dts/mt7620a_zyxel_keenetic-viva.dts     | 13 ++++++++++-
 target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts   | 13 ++++++++++-
 target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts   | 13 ++++++++++-
 .../linux/ramips/dts/mt7620n_buffalo_wmr-300.dts   | 13 ++++++++++-
 .../linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts | 13 ++++++++++-
 .../linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts  | 13 ++++++++++-
 target/linux/ramips/dts/mt7620n_kimax_u35wf.dts    | 13 ++++++++++-
 .../linux/ramips/dts/mt7620n_kingston_mlw221.dts   | 13 ++++++++++-
 target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts | 13 ++++++++++-
 target/linux/ramips/dts/mt7620n_netgear_n300.dtsi  | 13 ++++++++++-
 .../ramips/dts/mt7620n_sunvalley_filehub.dtsi      | 13 ++++++++++-
 .../linux/ramips/dts/mt7620n_vonets_var11n-300.dts | 13 ++++++++++-
 .../linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts   | 13 ++++++++++-
 .../ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts      | 13 ++++++++++-
 .../linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts  | 13 ++++++++++-
 .../ramips/dts/mt7620n_zbtlink_zbt-we2026.dts      | 13 ++++++++++-
 .../ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts    | 13 ++++++++++-
 .../ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts  | 13 ++++++++++-
 .../ramips/dts/mt7620n_zyxel_keenetic-omni.dts     | 13 ++++++++++-
 target/linux/ramips/dts/mt7621_adslr_g7.dts        | 16 +++++++++++--
 target/linux/ramips/dts/mt7621_afoundry_ew1200.dts | 16 +++++++++++--
 .../ramips/dts/mt7621_alfa-network_quad-e4g.dts    | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_asiarf_ap7621-001.dts  | 13 ++++++++++-
 .../linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts  | 13 ++++++++++-
 target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi  | 13 ++++++++++-
 target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts   | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi  | 13 ++++++++++-
 target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts | 20 ++++++++++++++--
 .../ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts     | 13 ++++++++++-
 .../linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts | 13 ++++++++++-
 target/linux/ramips/dts/mt7621_cudy_wr1300.dts     | 22 ++++++++++++++----
 target/linux/ramips/dts/mt7621_cudy_wr2100.dts     | 18 ++++++++++++---
 .../linux/ramips/dts/mt7621_d-team_newifi-d2.dts   | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts   | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts  | 16 +++++++++++--
 .../linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts  | 16 +++++++++++--
 .../linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts  | 16 +++++++++++--
 .../linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts  | 13 ++++++++++-
 .../linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_edimax_re23s.dts    | 13 ++++++++++-
 target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi   | 13 ++++++++++-
 .../ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts   | 23 +++++++++++++++---
 .../ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts     | 27 +++++++++++++++++++---
 .../ramips/dts/mt7621_elecom_wrc-1167gst2.dts      | 23 +++++++++++++++---
 .../ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi      | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_firefly_firewrt.dts | 16 +++++++++++--
 target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts | 16 +++++++++++--
 .../linux/ramips/dts/mt7621_glinet_gl-mt1300.dts   | 16 +++++++++++--
 target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts   | 13 ++++++++++-
 target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts   | 13 ++++++++++-
 .../linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts | 26 +++++++++++++++++++--
 .../linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts  | 16 +++++++++++--
 .../linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi   | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_iodata_wnpr2600g.dts   | 13 ++++++++++-
 target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts   | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_iptime_a8004t.dts   | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts  | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_jcg_q20.dts         | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_jcg_y2.dts          | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_lenovo_newifi-d1.dts   | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_linksys_re6500.dts  | 13 ++++++++++-
 .../ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts  | 16 +++++++++++--
 target/linux/ramips/dts/mt7621_mqmaker_witi.dts    | 22 ++++++++++++++----
 target/linux/ramips/dts/mt7621_mtc_wr1201.dts      | 16 +++++++++++--
 target/linux/ramips/dts/mt7621_netgear_ex6150.dts  | 13 ++++++++++-
 .../ramips/dts/mt7621_netgear_sercomm_bzv.dtsi     | 16 +++++++++++--
 .../ramips/dts/mt7621_netgear_sercomm_chj.dtsi     | 16 +++++++++++--
 target/linux/ramips/dts/mt7621_netgear_wac104.dts  | 13 ++++++++++-
 target/linux/ramips/dts/mt7621_netis_wf2881.dts    | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_phicomm_k2p.dts     | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_planex_vr500.dts    | 20 ++++++++++++++--
 .../ramips/dts/mt7621_samknows_whitebox-v8.dts     | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_sercomm_na502.dts   | 23 ++++++++++++++----
 .../ramips/dts/mt7621_storylink_sap-g3200u3.dts    | 16 +++++++++++--
 .../ramips/dts/mt7621_telco-electronics_x1.dts     | 16 +++++++++++--
 .../linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_thunder_timecloud.dts  | 13 ++++++++++-
 target/linux/ramips/dts/mt7621_totolink_a7000r.dts | 16 +++++++++++--
 target/linux/ramips/dts/mt7621_totolink_x5000r.dts | 20 ++++++++++++++--
 .../ramips/dts/mt7621_tplink_archer-c6u-v1.dts     | 26 ++++++++++++++++-----
 .../ramips/dts/mt7621_tplink_archer-x6-v3.dtsi     | 23 ++++++++++++++----
 .../ramips/dts/mt7621_tplink_eap235-wall-v1.dts    | 19 ++++++++++++---
 target/linux/ramips/dts/mt7621_tplink_re350-v1.dts | 19 ++++++++++++---
 .../linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi   | 19 ++++++++++++---
 .../ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts    | 13 ++++++++++-
 .../linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi | 25 ++++++++++++++++----
 .../linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts  | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi   | 20 ++++++++++++++--
 .../ramips/dts/mt7621_winstars_ws-wn583a6.dts      | 20 ++++++++++++++--
 .../ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts   | 20 ++++++++++++++--
 .../ramips/dts/mt7621_xiaomi_mi-router-3g.dts      | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts | 20 ++++++++++++++--
 .../dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi      | 20 ++++++++++++++--
 .../ramips/dts/mt7621_xiaomi_router-ac2100.dtsi    | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts    | 16 +++++++++++--
 .../ramips/dts/mt7621_xzwifi_creativebox-v1.dts    | 16 +++++++++++--
 target/linux/ramips/dts/mt7621_youhua_wr1200js.dts | 20 ++++++++++++++--
 target/linux/ramips/dts/mt7621_youku_yk-l2.dts     | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts | 20 ++++++++++++++--
 .../linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts | 16 +++++++++++--
 .../ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi      | 16 +++++++++++--
 target/linux/ramips/dts/mt7621_zyxel_nr7101.dts    | 13 ++++++++++-
 target/linux/ramips/dts/mt7621_zyxel_wap6805.dts   | 13 ++++++++++-
 .../ramips/dts/mt7628an_alfa-network_awusfree1.dts | 13 ++++++++++-
 target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi  | 13 ++++++++++-
 target/linux/ramips/dts/mt7628an_cudy_wr1000.dts   | 13 ++++++++++-
 target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts | 13 ++++++++++-
 target/linux/ramips/dts/mt7628an_duzun_dm06.dts    | 13 ++++++++++-
 .../ramips/dts/mt7628an_elecom_wrc-1167fs.dts      | 13 ++++++++++-
 .../ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts    | 13 ++++++++++-
 .../dts/mt7628an_glinet_vixmini_microuter.dtsi     | 13 ++++++++++-
 .../dts/mt7628an_hak5_wifi-pineapple-mk7.dts       | 13 ++++++++++-
 .../linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts | 13 ++++++++++-
 .../linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts | 13 ++++++++++-
 .../linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts   | 13 ++++++++++-
 .../linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi  | 13 ++++++++++-
 target/linux/ramips/dts/mt7628an_iptime.dtsi       | 13 ++++++++++-
 .../linux/ramips/dts/mt7628an_jotale_js76x8.dtsi   | 13 ++++++++++-
 .../dts/mt7628an_mediatek_linkit-smart-7688.dts    | 13 ++++++++++-
 .../ramips/dts/mt7628an_mercury_mac1200r-v2.dts    | 13 ++++++++++-
 target/linux/ramips/dts/mt7628an_minew_g1-c.dts    | 13 ++++++++++-
 target/linux/ramips/dts/mt7628an_netgear_r6120.dts | 13 ++++++++++-
 .../linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi   | 13 ++++++++++-
 target/linux/ramips/dts/mt7628an_onion_omega2.dtsi | 13 ++++++++++-
 .../ramips/dts/mt7628an_rakwireless_rak633.dts     | 13 ++++++++++-
 .../ramips/dts/mt7628an_ravpower_rp-wd009.dts      | 13 ++++++++++-
 target/linux/ramips/dts/mt7628an_skylab_skw92a.dts | 13 ++++++++++-
 target/linux/ramips/dts/mt7628an_tama_w06.dts      | 13 ++++++++++-
 .../linux/ramips/dts/mt7628an_totolink_lr1200.dts  | 13 ++++++++++-
 .../ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi | 16 +++++++++++--
 target/linux/ramips/dts/mt7628an_tplink_8m.dtsi    | 16 +++++++++++--
 .../ramips/dts/mt7628an_tplink_archer-c20-v4.dts   | 13 ++++++++++-
 .../ramips/dts/mt7628an_tplink_archer-c20-v5.dts   | 13 ++++++++++-
 .../ramips/dts/mt7628an_tplink_archer-c50-v3.dts   | 13 ++++++++++-
 .../ramips/dts/mt7628an_tplink_archer-c50-v4.dts   | 13 ++++++++++-
 target/linux/ramips/dts/mt7628an_tplink_re200.dtsi | 19 ++++++++++++---
 .../linux/ramips/dts/mt7628an_tplink_re305-v1.dts  | 19 ++++++++++++---
 .../ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts    | 16 +++++++++++--
 .../ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts    | 16 +++++++++++--
 .../ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts    | 16 +++++++++++--
 .../ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts    | 13 ++++++++++-
 .../ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts    | 16 +++++++++++--
 .../ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts   | 16 +++++++++++--
 .../ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts   | 13 ++++++++++-
 .../ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts    | 13 ++++++++++-
 .../ramips/dts/mt7628an_wavlink_wl-wn575a3.dts     | 13 ++++++++++-
 .../ramips/dts/mt7628an_wavlink_wl-wn577a2.dts     | 13 ++++++++++-
 .../ramips/dts/mt7628an_wavlink_wl-wn578a2.dts     | 13 ++++++++++-
 .../linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts | 13 ++++++++++-
 .../ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi      | 13 ++++++++++-
 .../dts/mt7628an_xiaomi_mi-router-4a-100m.dts      | 13 ++++++++++-
 .../ramips/dts/mt7628an_xiaomi_mi-router-4c.dts    | 13 ++++++++++-
 .../ramips/dts/mt7628an_xiaomi_miwifi-nano.dts     | 13 ++++++++++-
 .../ramips/dts/mt7628an_zbtlink_zbt-we1226.dts     | 13 ++++++++++-
 .../dts/mt7628an_zyxel_keenetic-extra-ii.dts       | 13 ++++++++++-
 .../linux/ramips/dts/rt2880_airlink101_ar670w.dts  | 13 ++++++++++-
 .../linux/ramips/dts/rt2880_airlink101_ar725w.dts  | 13 ++++++++++-
 target/linux/ramips/dts/rt2880_asus_rt-n15.dts     | 13 ++++++++++-
 .../linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts  | 13 ++++++++++-
 .../ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts   | 13 ++++++++++-
 .../ramips/dts/rt2880_buffalo_wzr-agl300nh.dts     | 13 ++++++++++-
 .../linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts  | 13 ++++++++++-
 .../linux/ramips/dts/rt3050_8devices_carambola.dts | 13 ++++++++++-
 .../ramips/dts/rt3050_arcwireless_freestation5.dts | 13 ++++++++++-
 target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts  | 13 ++++++++++-
 .../linux/ramips/dts/rt3050_asus_rt-n10-plus.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3050_asus_wl-330n.dts    | 13 ++++++++++-
 target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts  | 13 ++++++++++-
 target/linux/ramips/dts/rt3050_dlink_dcs-930.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt3050_dlink_dir-300-b1.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt3050_dlink_dir-600-b1.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt3050_dlink_dir-620-a1.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts | 13 ++++++++++-
 .../linux/ramips/dts/rt3050_edimax_3g-6200nl.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3050_huawei_d105.dts     | 13 ++++++++++-
 target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3050_netcore_nw718.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts | 13 ++++++++++-
 .../linux/ramips/dts/rt3050_teltonika_rut5xx.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3050_tenda_w150m.dts     | 13 ++++++++++-
 .../ramips/dts/rt3050_trendnet_tew-638apb-v2.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_accton_wr6202.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt3052_alfa-network_w502u.dts | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_argus_atp-52b.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_asus_rt-n13u.dts    | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts | 13 ++++++++++-
 .../linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts  | 13 ++++++++++-
 .../linux/ramips/dts/rt3052_buffalo_whr-g300n.dts  | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_dlink_dap-1350.dts  | 13 ++++++++++-
 .../linux/ramips/dts/rt3052_engenius_esr-9753.dts  | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_fon_fonera-20n.dts  | 13 ++++++++++-
 .../linux/ramips/dts/rt3052_hauppauge_broadway.dts | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_huawei_hg255d.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt3052_netgear_wnce2001.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_nexaira_bc2.dts     | 13 ++++++++++-
 .../linux/ramips/dts/rt3052_omnima_miniembwifi.dts | 13 ++++++++++-
 .../linux/ramips/dts/rt3052_petatel_psr-680w.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_poray_ip2202.dts    | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_sitecom_wl-351.dts  | 13 ++++++++++-
 .../linux/ramips/dts/rt3052_skyline_sl-r7205.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_tenda_3g300m.dts    | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts  | 13 ++++++++++-
 .../ramips/dts/rt3052_unbranded_xdx-rn502j.dts     | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_upvel_ur-336un.dts  | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_zyxel_keenetic.dts  | 13 ++++++++++-
 target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts  | 13 ++++++++++-
 target/linux/ramips/dts/rt3352_allnet_all5002.dts  | 13 ++++++++++-
 .../linux/ramips/dts/rt3352_dlink_dir-615-h1.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt3352_dlink_dir-620-d1.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3352_zte_mf283plus.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts  | 13 ++++++++++-
 target/linux/ramips/dts/rt3662_asus_rt-n56u.dts    | 13 ++++++++++-
 target/linux/ramips/dts/rt3662_dlink_dir-645.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt3662_edimax_br-6475nd.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt3662_omnima_hpm.dts      | 13 ++++++++++-
 .../linux/ramips/dts/rt3883_sitecom_wlr-6000.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt3883_trendnet_tew-691gr.dts | 16 +++++++++++--
 .../linux/ramips/dts/rt3883_trendnet_tew-692gr.dts | 16 +++++++++++--
 target/linux/ramips/dts/rt5350_airlive_air3gii.dts | 13 ++++++++++-
 target/linux/ramips/dts/rt5350_allnet_all5003.dts  | 13 ++++++++++-
 .../linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts  | 13 ++++++++++-
 .../linux/ramips/dts/rt5350_dlink_dir-300-b7.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt5350_dlink_dir-320-b1.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt5350_dlink_dir-610-a1.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts | 16 +++++++++++--
 .../ramips/dts/rt5350_easyacc_wizard-8800.dts      | 13 ++++++++++-
 target/linux/ramips/dts/rt5350_hame_mpr-a1.dts     | 13 ++++++++++-
 target/linux/ramips/dts/rt5350_hame_mpr-a2.dts     | 13 ++++++++++-
 target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts | 13 ++++++++++-
 target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts  | 13 ++++++++++-
 .../ramips/dts/rt5350_intenso_memory2move.dts      | 13 ++++++++++-
 .../dts/rt5350_olimex_rt5350f-olinuxino.dtsi       | 13 ++++++++++-
 .../linux/ramips/dts/rt5350_omnima_miniembplug.dts | 13 ++++++++++-
 .../linux/ramips/dts/rt5350_planex_mzk-dp150n.dts  | 13 ++++++++++-
 target/linux/ramips/dts/rt5350_poray_m3.dts        | 13 ++++++++++-
 target/linux/ramips/dts/rt5350_poray_x5.dts        | 13 ++++++++++-
 target/linux/ramips/dts/rt5350_poray_x8.dts        | 13 ++++++++++-
 target/linux/ramips/dts/rt5350_tenda_3g150b.dts    | 13 ++++++++++-
 .../ramips/dts/rt5350_trendnet_tew-714tru.dts      | 13 ++++++++++-
 .../linux/ramips/dts/rt5350_unbranded_a5-v11.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt5350_wansview_ncs601w.dts   | 13 ++++++++++-
 .../linux/ramips/dts/rt5350_wiznet_wizfi630a.dts   | 13 ++++++++++-
 target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts | 13 ++++++++++-
 .../ramips/dts/rt5350_zyxel_keenetic-lite-b.dts    | 13 ++++++++++-
 .../ramips/dts/rt5350_zyxel_keenetic-start.dts     | 13 ++++++++++-
 319 files changed, 4213 insertions(+), 434 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts
index ba251c2656..1142746c7a 100644
--- a/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts
+++ b/target/linux/ramips/dts/mt7620a_aigale_ai-br100.dts
@@ -103,7 +103,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -111,3 +112,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts
index 752a940cd8..19b6d5fdfb 100644
--- a/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts
+++ b/target/linux/ramips/dts/mt7620a_alfa-network_ac1200rm.dts
@@ -55,7 +55,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -148,3 +149,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts b/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts
index 0991ae8447..09afc018e8 100644
--- a/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts
+++ b/target/linux/ramips/dts/mt7620a_alfa-network_r36m-e4g.dts
@@ -126,7 +126,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gpio1 {
@@ -209,3 +210,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts b/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts
index ca58d780f4..a90f9b2775 100644
--- a/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts
+++ b/target/linux/ramips/dts/mt7620a_alfa-network_tube-e4g.dts
@@ -103,7 +103,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gpio1 {
@@ -178,3 +179,13 @@
 &wmac {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi
index 423b4edc6b..f61843095d 100644
--- a/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi
+++ b/target/linux/ramips/dts/mt7620a_asus_rt-ac5x.dtsi
@@ -122,7 +122,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -134,3 +135,13 @@
 &pcie {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts
index fc2b74db2a..b95a428656 100644
--- a/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts
+++ b/target/linux/ramips/dts/mt7620a_bdcom_wap2100-sk.dts
@@ -117,7 +117,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -144,3 +145,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts
index 93a09f99c3..f71545815d 100644
--- a/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts
+++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-1166d.dts
@@ -139,7 +139,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 5 {
 		status = "okay";
@@ -173,3 +174,13 @@
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts
index 95152bc41a..7c8caa5066 100644
--- a/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts
+++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-300hp2.dts
@@ -139,7 +139,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -149,3 +150,13 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pa_pins>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts
index 226967763b..d943e3abef 100644
--- a/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts
+++ b/target/linux/ramips/dts/mt7620a_buffalo_whr-600d.dts
@@ -139,7 +139,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -159,3 +160,13 @@
 		ralink,mtd-eeprom = <&factory 0x8000>;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
index b1a50bb711..3174b98bbf 100644
--- a/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
+++ b/target/linux/ramips/dts/mt7620a_cameo_810.dtsi
@@ -127,7 +127,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -141,7 +142,8 @@
 	pinctrl-0 = <&pa_pins>;
 
 	ralink,mtd-eeprom = <&factory 0x0>;
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie {
@@ -153,7 +155,18 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&factory 0x28>;
+		nvmem-cells = <&macaddr_factory_28>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <2>;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts
index 0c9f56875e..68b733cade 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dch-m225.dts
@@ -168,7 +168,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -176,3 +177,13 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pa_pins>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
index 5b8d883dd5..2b8ad2759c 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dir-510l.dts
@@ -114,7 +114,8 @@
 &pcie0 {
 	mt76x0e at 0,0 {
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&config 0xe490>;
+		nvmem-cells = <&macaddr_config_e490>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(2)>;
 		mediatek,mtd-eeprom = <&config 0xe05d>;
 	};
@@ -126,3 +127,13 @@
 		function = "gpio";
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_e490: macaddr at e490 {
+		reg = <0xe490 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
index 2e755b6620..c63a85dd88 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a1.dts
@@ -142,7 +142,8 @@
 &pcie0 {
 	wifi at 0,0 {
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&config 0xe496>;
+		nvmem-cells = <&macaddr_config_e496>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(2)>;
 		mediatek,mtd-eeprom = <&config 0xe083>;
 
@@ -188,3 +189,13 @@
 	mediatek,port4-gmac;
 	mediatek,ephy-base = /bits/ 8 <8>;
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_e496: macaddr at e496 {
+		reg = <0xe496 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts
index eec4969ff3..711f9f7c9a 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-118-a2.dts
@@ -140,7 +140,8 @@
 	wifi at 0,0 {
 		reg = <0x0000 0 0 0 0>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&config 0xe4a8>;
+		nvmem-cells = <&macaddr_config_e4a8>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(2)>;
 
 		led {
@@ -176,3 +177,13 @@
 	mediatek,port4-gmac;
 	mediatek,ephy-base = /bits/ 8 <2>;
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_e4a8: macaddr at e4a8 {
+		reg = <0xe4a8 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts
index eed57f7f68..e80719a4e7 100644
--- a/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts
+++ b/target/linux/ramips/dts/mt7620a_dlink_dwr-960.dts
@@ -175,7 +175,8 @@
 		reg = <0x0000 0 0 0 0>;
 		ieee80211-freq-limit = <5000000 6000000>;
 		mediatek,mtd-eeprom = <&config 0xe08e>;
-		mtd-mac-address = <&config 0xe50e>;
+		nvmem-cells = <&macaddr_config_e50e>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <2>;
 	};
 };
@@ -186,3 +187,13 @@
 		function = "gpio";
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_e50e: macaddr at e50e {
+		reg = <0xe50e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts
index 03a4c96f6b..cc902888ba 100644
--- a/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts
+++ b/target/linux/ramips/dts/mt7620a_edimax_br-6478ac-v2.dts
@@ -132,7 +132,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 
@@ -204,3 +205,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts
index 986b047e47..bc73c197c0 100644
--- a/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts
+++ b/target/linux/ramips/dts/mt7620a_edimax_ew-7478apc.dts
@@ -124,7 +124,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 
@@ -196,3 +197,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi
index 6060fd99a6..1d77c27f5f 100644
--- a/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi
+++ b/target/linux/ramips/dts/mt7620a_edimax_ew-747x.dtsi
@@ -153,7 +153,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &mdio_pins &phy_reset_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	phy-reset-gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
 	phy-reset-duration = <30>;
@@ -218,3 +219,13 @@
 		mediatek,2ghz = <0>;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts
index ea895ac6ea..267525a0fc 100644
--- a/target/linux/ramips/dts/mt7620a_engenius_esr600.dts
+++ b/target/linux/ramips/dts/mt7620a_engenius_esr600.dts
@@ -134,7 +134,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &mdio_pins>;
 
-	mtd-mac-address = <&iNIC_rf 0x4>;
+	nvmem-cells = <&macaddr_iNIC_rf_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 5 {
 		status = "okay";
@@ -193,3 +194,13 @@
 &ohci {
 	status = "okay";
 };
+
+&iNIC_rf {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_iNIC_rf_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts
index 373205e725..69ddea589b 100644
--- a/target/linux/ramips/dts/mt7620a_fon_fon2601.dts
+++ b/target/linux/ramips/dts/mt7620a_fon_fon2601.dts
@@ -117,7 +117,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 4 {
 		status = "okay";
@@ -165,3 +166,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts
index 545e11a83f..9c9b3d3bf9 100644
--- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts
+++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300a.dts
@@ -127,7 +127,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4000>;
+	nvmem-cells = <&macaddr_factory_4000>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -142,3 +143,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4000: macaddr at 4000 {
+		reg = <0x4000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts
index 575566c5fa..70d0827ed2 100644
--- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts
+++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt300n.dts
@@ -118,7 +118,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4000>;
+	nvmem-cells = <&macaddr_factory_4000>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -133,3 +134,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4000: macaddr at 4000 {
+		reg = <0x4000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts
index 75823787bf..9ee19686b7 100644
--- a/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts
+++ b/target/linux/ramips/dts/mt7620a_glinet_gl-mt750.dts
@@ -122,7 +122,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4000>;
+	nvmem-cells = <&macaddr_factory_4000>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -148,3 +149,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4000: macaddr at 4000 {
+		reg = <0x4000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts
index 7d807bff4b..10c9958e0a 100644
--- a/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts
+++ b/target/linux/ramips/dts/mt7620a_head-weblink_hdrm200.dts
@@ -120,7 +120,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 4 {
 		status = "okay";
@@ -182,3 +183,13 @@
 &uart {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
index d77df2158c..6222efcca5 100644
--- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5861.dts
@@ -72,7 +72,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 
@@ -109,3 +110,13 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pa_pins>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi
index 42a59f285b..4c24857df1 100644
--- a/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi
+++ b/target/linux/ramips/dts/mt7620a_hiwifi_hc5x61.dtsi
@@ -85,7 +85,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -104,3 +105,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_hnet_c108.dts b/target/linux/ramips/dts/mt7620a_hnet_c108.dts
index 4035139ed1..4c241a84de 100644
--- a/target/linux/ramips/dts/mt7620a_hnet_c108.dts
+++ b/target/linux/ramips/dts/mt7620a_hnet_c108.dts
@@ -136,7 +136,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -153,3 +154,13 @@
 &pcie {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts
index d59b481a61..5eca06fcb9 100644
--- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts
+++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac1167gr.dts
@@ -139,7 +139,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 5 {
 		status = "okay";
@@ -210,3 +211,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts
index e29431dc8d..9997e5cecf 100644
--- a/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts
+++ b/target/linux/ramips/dts/mt7620a_iodata_wn-ac733gr3.dts
@@ -147,7 +147,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 5 {
 		status = "okay";
@@ -188,3 +189,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_iptime.dtsi b/target/linux/ramips/dts/mt7620a_iptime.dtsi
index c7c90ca722..3e2378aa60 100644
--- a/target/linux/ramips/dts/mt7620a_iptime.dtsi
+++ b/target/linux/ramips/dts/mt7620a_iptime.dtsi
@@ -49,7 +49,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&uboot 0x1fc20>;
+	nvmem-cells = <&macaddr_uboot_1fc20>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ehci {
@@ -84,3 +85,13 @@
 
 	ralink,mtd-eeprom = <&uboot 0x1f400>;
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc20: macaddr at 1fc20 {
+		reg = <0x1fc20 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts
index 218dd7a761..87e6222c53 100644
--- a/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts
+++ b/target/linux/ramips/dts/mt7620a_kimax_u25awf-h1.dts
@@ -96,7 +96,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -109,3 +110,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
index 2f882b3b50..1966e4cffd 100644
--- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
+++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
@@ -140,7 +140,8 @@
 &pcie0 {
 	mt76x0e at 0,0 {
 		reg = <0x0000 0 0 0 0>;
-		mtd-mac-address = <&config 0xe07e>;
+		nvmem-cells = <&macaddr_config_e07e>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(2)>;
 		mediatek,mtd-eeprom = <&config 0xe08a>;
 	};
@@ -152,3 +153,13 @@
 		function = "gpio";
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_e07e: macaddr at e07e {
+		reg = <0xe07e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts
index 9e0b817163..5368f939a2 100644
--- a/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts
+++ b/target/linux/ramips/dts/mt7620a_lb-link_bl-w1200.dts
@@ -90,7 +90,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 
@@ -168,3 +169,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts
index 2bea987b42..bff117b729 100644
--- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts
+++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1.dts
@@ -53,7 +53,18 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts
index 0544550bf9..2b59351bd8 100644
--- a/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts
+++ b/target/linux/ramips/dts/mt7620a_lenovo_newifi-y1s.dts
@@ -79,7 +79,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 
@@ -114,3 +115,13 @@
 	mediatek,port4-gmac;
 	mediatek,ephy-base = /bits/ 8 <8>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts
index c38ea8082c..862f28e399 100644
--- a/target/linux/ramips/dts/mt7620a_linksys_e1700.dts
+++ b/target/linux/ramips/dts/mt7620a_linksys_e1700.dts
@@ -101,7 +101,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	port at 5 {
 		status = "okay";
@@ -151,3 +152,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts b/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts
index 4307d51424..ceecafa066 100644
--- a/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts
+++ b/target/linux/ramips/dts/mt7620a_microduino_microwrt.dts
@@ -80,7 +80,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -95,3 +96,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi
index 11e8f7fce6..6884bf7943 100644
--- a/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi
+++ b/target/linux/ramips/dts/mt7620a_netgear_ex3x00_ex61xx.dtsi
@@ -137,7 +137,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -150,3 +151,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts
index f839048865..2a0e52cee2 100644
--- a/target/linux/ramips/dts/mt7620a_netis_wf2770.dts
+++ b/target/linux/ramips/dts/mt7620a_netis_wf2770.dts
@@ -99,7 +99,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 5 {
 		status = "okay";
@@ -162,3 +163,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts
index 7dabbed9ba..a691f4203f 100644
--- a/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts
+++ b/target/linux/ramips/dts/mt7620a_ohyeah_oy-0001.dts
@@ -98,7 +98,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -118,3 +119,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts
index a153520e2f..fd6cc7f82b 100644
--- a/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts
+++ b/target/linux/ramips/dts/mt7620a_phicomm_k2g.dts
@@ -23,7 +23,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 
@@ -47,3 +48,13 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pa_pins>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts
index 27c4ec31dc..4e123c32bd 100644
--- a/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts
+++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1208.dts
@@ -99,7 +99,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -119,3 +120,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts
index d5aa159498..3a9a57d90b 100644
--- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts
+++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218a.dts
@@ -14,7 +14,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -23,3 +24,13 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pa_pins>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts
index 4143d5e4d6..916479c252 100644
--- a/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts
+++ b/target/linux/ramips/dts/mt7620a_phicomm_psg1218b.dts
@@ -14,5 +14,16 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
 };
diff --git a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts
index 3edc41ac0d..e095401c4e 100644
--- a/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts
+++ b/target/linux/ramips/dts/mt7620a_planex_cs-qr10.dts
@@ -117,7 +117,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -137,3 +138,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts
index 8f8f173de3..7d875c24fc 100644
--- a/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts
+++ b/target/linux/ramips/dts/mt7620a_planex_db-wrt01.dts
@@ -89,7 +89,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -97,3 +98,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts
index e1c5568ed8..bfa4dac6f1 100644
--- a/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts
+++ b/target/linux/ramips/dts/mt7620a_planex_mzk-750dhp.dts
@@ -109,7 +109,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -128,3 +129,13 @@
 		mediatek,mtd-eeprom = <&factory 0x8000>;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts
index 5459886a3a..ab53f678f5 100644
--- a/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts
+++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex300np.dts
@@ -129,7 +129,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -137,3 +138,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts
index 457d4fd552..6fc95214a2 100644
--- a/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts
+++ b/target/linux/ramips/dts/mt7620a_planex_mzk-ex750np.dts
@@ -134,7 +134,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -153,3 +154,13 @@
 		mediatek,mtd-eeprom = <&factory 0x8000>;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts
index 6cff557fcd..6b1edabc1a 100644
--- a/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts
+++ b/target/linux/ramips/dts/mt7620a_sanlinking_d240.dts
@@ -140,7 +140,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -173,3 +174,13 @@
 &pcie {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
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 cfd55ea221..63643927d5 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
@@ -130,7 +130,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 
 	port at 5 {
 		status = "okay";
@@ -164,7 +165,8 @@
 
 &wmac {
 	ralink,mtd-eeprom = <&radio 0x0>;
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ehci {
@@ -183,7 +185,18 @@
 	mt76 at 0,0 {
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
-		mtd-mac-address = <&rom 0xf100>;
+		nvmem-cells = <&macaddr_rom_f100>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(-1)>;
 	};
 };
+
+&rom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_rom_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
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 89f48dc7d3..2248da5b10 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
@@ -72,11 +72,23 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pa_pins>;
 
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-2)>;
 };
 
 &wifi {
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
+
+&rom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_rom_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
index c4fb98c467..ba9bf1db99 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
@@ -53,10 +53,22 @@
 };
 
 &wmac {
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wifi {
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
+
+&rom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_rom_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
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 8de87caecc..db92af7e37 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
@@ -72,11 +72,23 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&pa_pins>;
 
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-2)>;
 };
 
 &wifi {
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
+
+&rom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_rom_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts
index 4212a70dc3..1222ff2fcd 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-mr200.dts
@@ -167,7 +167,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ehci {
@@ -192,3 +193,13 @@
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 	};
 };
+
+&rom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_rom_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
index d2fb891433..743d1e8db6 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
@@ -92,7 +92,8 @@
 &ethernet {
 	pinctrl-names = "default";
 
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -120,3 +121,13 @@
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
+
+&rom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_rom_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi
index 7b3025e8b4..e6d9b8576d 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi
+++ b/target/linux/ramips/dts/mt7620a_tplink_re2x0-v1.dtsi
@@ -72,12 +72,14 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	ralink,mtd-eeprom = <&radio 0x0>;
-	mtd-mac-address = <&uboot 0x1fc00>;
+	nvmem-cells = <&macaddr_uboot_1fc00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie {
@@ -88,8 +90,19 @@
 	mt76 at 0,0 {
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
-		mtd-mac-address = <&uboot 0x1fc00>;
+		nvmem-cells = <&macaddr_uboot_1fc00>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <2>;
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc00: macaddr at 1fc00 {
+		reg = <0x1fc00 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts
index 27fd2e2450..b0522de7d0 100644
--- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts
+++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn530hg4.dts
@@ -97,7 +97,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 
@@ -135,3 +136,13 @@
 
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts
index bfec806c12..ce617198ce 100644
--- a/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts
+++ b/target/linux/ramips/dts/mt7620a_wavlink_wl-wn579x3.dts
@@ -163,7 +163,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 
@@ -209,3 +210,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts
index 11b1aa38d6..49ef40827b 100644
--- a/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts
+++ b/target/linux/ramips/dts/mt7620a_xiaomi_miwifi-mini.dts
@@ -121,7 +121,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -150,3 +151,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi
index db9bacefe8..937a41d54b 100644
--- a/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi
+++ b/target/linux/ramips/dts/mt7620a_youku_yk-l1.dtsi
@@ -105,7 +105,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -125,3 +126,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_yukai_bocco.dts b/target/linux/ramips/dts/mt7620a_yukai_bocco.dts
index 347c246e2e..96ef110bda 100644
--- a/target/linux/ramips/dts/mt7620a_yukai_bocco.dts
+++ b/target/linux/ramips/dts/mt7620a_yukai_bocco.dts
@@ -136,7 +136,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -144,3 +145,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts
index 28ae7c3f98..6fcda971a6 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-ape522ii.dts
@@ -98,7 +98,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -127,3 +128,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi
index 91bbd4a044..cdbdfbd38c 100644
--- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi
+++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026.dtsi
@@ -87,7 +87,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -100,3 +101,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_zte_q7.dts b/target/linux/ramips/dts/mt7620a_zte_q7.dts
index 550f750c5a..c2dc111008 100644
--- a/target/linux/ramips/dts/mt7620a_zte_q7.dts
+++ b/target/linux/ramips/dts/mt7620a_zte_q7.dts
@@ -91,7 +91,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -111,3 +112,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts
index 1a5ff2d0df..a79578aa01 100644
--- a/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts
+++ b/target/linux/ramips/dts/mt7620a_zyxel_keenetic-viva.dts
@@ -137,7 +137,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii2_pins &mdio_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 4 {
 		status = "okay";
@@ -172,3 +173,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts
index 24a8779b27..be1f9ee026 100644
--- a/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts
+++ b/target/linux/ramips/dts/mt7620n_asus_rt-n12p.dts
@@ -106,7 +106,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -121,3 +122,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts
index ce51ff89b3..ee68ebb2d2 100644
--- a/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts
+++ b/target/linux/ramips/dts/mt7620n_asus_rt-n14u.dts
@@ -119,7 +119,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -134,3 +135,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts
index 26803c0c2a..4ecd3204c6 100644
--- a/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts
+++ b/target/linux/ramips/dts/mt7620n_buffalo_wmr-300.dts
@@ -95,7 +95,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -110,3 +111,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts
index c458f8724f..b87e5a3530 100644
--- a/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts
+++ b/target/linux/ramips/dts/mt7620n_comfast_cf-wr800n.dts
@@ -101,7 +101,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -114,3 +115,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts
index 19d2f63694..9d66b191cb 100644
--- a/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts
+++ b/target/linux/ramips/dts/mt7620n_elecom_wrh-300cr.dts
@@ -112,7 +112,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x2e>;
+	nvmem-cells = <&macaddr_factory_2e>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -127,3 +128,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts b/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts
index 7d6d80038c..14e328842b 100644
--- a/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts
+++ b/target/linux/ramips/dts/mt7620n_kimax_u35wf.dts
@@ -96,7 +96,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -109,3 +110,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts b/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts
index 1186b83f06..1e8fe0d833 100644
--- a/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts
+++ b/target/linux/ramips/dts/mt7620n_kingston_mlw221.dts
@@ -107,7 +107,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -122,3 +123,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts b/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts
index eba7fabff6..5a30dee05f 100644
--- a/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts
+++ b/target/linux/ramips/dts/mt7620n_kingston_mlwg2.dts
@@ -107,7 +107,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -122,3 +123,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi b/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi
index 6f5be57ec7..1fe2cbaabc 100644
--- a/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi
+++ b/target/linux/ramips/dts/mt7620n_netgear_n300.dtsi
@@ -66,7 +66,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -81,3 +82,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi b/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi
index 20ff2dbd1c..cd9e6cacce 100644
--- a/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi
+++ b/target/linux/ramips/dts/mt7620n_sunvalley_filehub.dtsi
@@ -123,7 +123,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -136,3 +137,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts b/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts
index 97ed206f56..88a968d33b 100644
--- a/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts
+++ b/target/linux/ramips/dts/mt7620n_vonets_var11n-300.dts
@@ -75,7 +75,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -90,3 +91,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts
index 144591d48a..4ab1b81810 100644
--- a/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts
+++ b/target/linux/ramips/dts/mt7620n_wrtnode_wrtnode.dts
@@ -76,7 +76,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -91,3 +92,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts
index 6d018b9e58..8a3e96ff26 100644
--- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts
+++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-cpe102.dts
@@ -99,7 +99,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -114,3 +115,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts
index b29c034140..69d5474bf6 100644
--- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts
+++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wa05.dts
@@ -107,7 +107,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -122,3 +123,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts
index fe1799885a..7c92f45e7b 100644
--- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts
+++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-we2026.dts
@@ -92,7 +92,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -107,3 +108,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts
index af3ac4b009..2ac2415736 100644
--- a/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts
+++ b/target/linux/ramips/dts/mt7620n_zbtlink_zbt-wr8305rt.dts
@@ -106,7 +106,8 @@
 	pinctrl-names = "default";
 	pinctrl-0 = <&ephy_pins>;
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -121,3 +122,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts
index 4e5c68ef3f..917a1934bd 100644
--- a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts
+++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni-ii.dts
@@ -130,7 +130,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "wllll";
 };
@@ -146,3 +147,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts
index e43f1357dd..9cea6ad667 100644
--- a/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts
+++ b/target/linux/ramips/dts/mt7620n_zyxel_keenetic-omni.dts
@@ -130,7 +130,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	mediatek,portmap = "llllw";
 };
@@ -146,3 +147,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_adslr_g7.dts b/target/linux/ramips/dts/mt7621_adslr_g7.dts
index 84c0d3b282..95f2ac3a20 100644
--- a/target/linux/ramips/dts/mt7621_adslr_g7.dts
+++ b/target/linux/ramips/dts/mt7621_adslr_g7.dts
@@ -101,7 +101,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe00c>;
+	nvmem-cells = <&macaddr_factory_e00c>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -129,7 +130,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe00c>;
+			nvmem-cells = <&macaddr_factory_e00c>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -141,3 +143,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e00c: macaddr at e00c {
+		reg = <0xe00c 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
index 0a4971d06c..2ed9f716ab 100644
--- a/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
+++ b/target/linux/ramips/dts/mt7621_afoundry_ew1200.dts
@@ -106,7 +106,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -134,7 +135,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -146,3 +148,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts
index e457dfcdbe..8c6fdab04f 100644
--- a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts
+++ b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts
@@ -148,7 +148,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -176,7 +177,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -257,3 +259,17 @@
 &uartlite3 {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
index 0e66057fa5..8af4d2cc08 100644
--- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
+++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-001.dts
@@ -17,8 +17,19 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
index 4088b8137d..4900e8db66 100644
--- a/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
+++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621-nv1.dts
@@ -12,7 +12,8 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 
@@ -27,3 +28,13 @@
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi
index b011c7ae2a..bea0b79df5 100644
--- a/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi
+++ b/target/linux/ramips/dts/mt7621_asiarf_ap7621.dtsi
@@ -100,7 +100,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &state_default {
@@ -109,3 +110,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts
index 78f5584b4c..2c6b3f53e6 100644
--- a/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts
+++ b/target/linux/ramips/dts/mt7621_asus_rt-ac57u.dts
@@ -130,7 +130,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -138,7 +139,8 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 1 {
@@ -169,3 +171,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
index b5e8655cb9..0ccc3c7ecc 100644
--- a/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
+++ b/target/linux/ramips/dts/mt7621_asus_rt-acx5p.dtsi
@@ -131,7 +131,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -169,3 +170,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
index b78e594ffd..63ab424b88 100644
--- a/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
+++ b/target/linux/ramips/dts/mt7621_asus_rt-n56u-b1.dts
@@ -140,7 +140,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x8004>;
+	nvmem-cells = <&macaddr_factory_8004>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -168,7 +169,8 @@
 		wan: port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x4>;
+			nvmem-cells = <&macaddr_factory_4>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -179,3 +181,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+
+	macaddr_factory_8004: macaddr at 8004 {
+		reg = <0x8004 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
index 9244c8368b..789edca6df 100644
--- a/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
+++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-2533dhpl.dts
@@ -164,7 +164,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
@@ -229,3 +230,13 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
index 7392b1d7c1..5d20b6e28a 100644
--- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
+++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts
@@ -173,7 +173,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -208,3 +209,13 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts
index e943c04069..3fd67c967a 100644
--- a/target/linux/ramips/dts/mt7621_cudy_wr1300.dts
+++ b/target/linux/ramips/dts/mt7621_cudy_wr1300.dts
@@ -127,7 +127,8 @@
 		compatible = "pci14c3,7603";
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x0000>;
-		mtd-mac-address = <&bdinfo 0xde00>;
+		nvmem-cells = <&macaddr_bdinfo_de00>;
+		nvmem-cell-names = "mac-address";
 		ieee80211-freq-limit = <2400000 2500000>;
 
 		led {
@@ -141,7 +142,8 @@
 		compatible = "pci14c3,7662";
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x8000>;
-		mtd-mac-address = <&bdinfo 0xde00>;
+		nvmem-cells = <&macaddr_bdinfo_de00>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <2>;
 		ieee80211-freq-limit = <5000000 6000000>;
 
@@ -153,7 +155,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&bdinfo 0xde00>;
+	nvmem-cells = <&macaddr_bdinfo_de00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -181,7 +184,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&bdinfo 0xde00>;
+			nvmem-cells = <&macaddr_bdinfo_de00>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -193,3 +197,13 @@
 		function = "gpio";
 	};
 };
+
+&bdinfo {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_bdinfo_de00: macaddr at de00 {
+		reg = <0xde00 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts
index 692c94da55..21d03322a7 100644
--- a/target/linux/ramips/dts/mt7621_cudy_wr2100.dts
+++ b/target/linux/ramips/dts/mt7621_cudy_wr2100.dts
@@ -78,7 +78,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&bdinfo 0xde00>;
+	nvmem-cells = <&macaddr_bdinfo_de00>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie {
@@ -194,8 +195,19 @@
 			status = "okay";
 			label = "wan";
 
-			mtd-mac-address = <&bdinfo 0xde00>;
-			mtd-mac-address-increment = <1>;
+			nvmem-cells = <&macaddr_bdinfo_de00>;
+			nvmem-cell-names = "mac-address";
+			mac-address-increment = <1>;
 		};
 	};
 };
+
+&bdinfo {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_bdinfo_de00: macaddr at de00 {
+		reg = <0xde00 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts
index 5622855f48..c04fe9e245 100644
--- a/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts
+++ b/target/linux/ramips/dts/mt7621_d-team_newifi-d2.dts
@@ -149,7 +149,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -177,7 +178,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -188,3 +190,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts
index 2fcdce5f19..d30e4d1953 100644
--- a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts
+++ b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts
@@ -175,7 +175,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -203,7 +204,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -214,3 +216,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
index fd11768ce6..82ba8cf3f7 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-1960-a1.dts
@@ -17,11 +17,23 @@
 };
 
 &wifi0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &wifi1 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <2>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
index b19f70f7c9..14a79cef51 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-2640-a1.dts
@@ -24,11 +24,23 @@
 };
 
 &wifi0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &wifi1 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <2>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
index a4d72876ab..a90856c0b6 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-2660-a1.dts
@@ -24,11 +24,23 @@
 };
 
 &wifi0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &wifi1 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <2>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
index f843f62801..26f142dcff 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-860l-b1.dts
@@ -109,7 +109,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&radio 0x4>;
+	nvmem-cells = <&macaddr_radio_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -170,3 +171,13 @@
 		function = "gpio";
 	};
 };
+
+&radio {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_radio_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
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 a54b2be4f0..a1550cfb40 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
@@ -152,7 +152,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -180,7 +181,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -191,3 +193,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_edimax_re23s.dts b/target/linux/ramips/dts/mt7621_edimax_re23s.dts
index 9b96573446..1a3181e4e3 100644
--- a/target/linux/ramips/dts/mt7621_edimax_re23s.dts
+++ b/target/linux/ramips/dts/mt7621_edimax_re23s.dts
@@ -137,7 +137,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x8004>;
+	nvmem-cells = <&macaddr_factory_8004>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -159,3 +160,13 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_8004: macaddr at 8004 {
+		reg = <0x8004 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
index 3f3bae43f1..f9a6c375c2 100644
--- a/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
+++ b/target/linux/ramips/dts/mt7621_edimax_rx21s.dtsi
@@ -118,7 +118,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -160,3 +161,13 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
index f8ea5dbbbf..8e87fd06bc 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167ghbk2-s.dts
@@ -67,7 +67,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -75,7 +76,8 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 1 {
@@ -168,7 +170,8 @@
 		compatible = "mediatek,mt76";
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x0>;
-		mtd-mac-address = <&factory 0xe000>;
+		nvmem-cells = <&macaddr_factory_e000>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 	};
 };
@@ -176,3 +179,17 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
index becd2a9f9d..97e0ab2956 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gs2-b.dts
@@ -8,11 +8,13 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xfff4>;
+	nvmem-cells = <&macaddr_factory_fff4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wan {
-	mtd-mac-address = <&factory 0xfffa>;
+	nvmem-cells = <&macaddr_factory_fffa>;
+	nvmem-cell-names = "mac-address";
 };
 
 &partitions {
@@ -48,6 +50,25 @@
 };
 
 &wifi {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+
+	macaddr_factory_fff4: macaddr at fff4 {
+		reg = <0xfff4 0x6>;
+	};
+
+	macaddr_factory_fffa: macaddr at fffa {
+		reg = <0xfffa 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
index 5cc8ff27f6..dfc58c1ff6 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-1167gst2.dts
@@ -8,11 +8,13 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wan {
-	mtd-mac-address = <&factory 0xe006>;
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
 };
 
 &partitions {
@@ -48,6 +50,21 @@
 };
 
 &wifi {
-	mtd-mac-address = <&factory 0xe006>;
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi
index 642724da10..547d1b1641 100644
--- a/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi
+++ b/target/linux/ramips/dts/mt7621_elecom_wrc-gs-2pci.dtsi
@@ -3,11 +3,13 @@
 #include "mt7621_elecom_wrc-gs.dtsi"
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wan {
-	mtd-mac-address = <&factory 0xe006>;
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
 };
 
 &state_default {
@@ -44,3 +46,17 @@
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts
index 9689326570..9da515f017 100644
--- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts
+++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts
@@ -105,7 +105,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -133,7 +134,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -145,3 +147,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
index f0152e8db3..4f652b90bb 100644
--- a/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
+++ b/target/linux/ramips/dts/mt7621_gehua_ghl-r-001.dts
@@ -107,7 +107,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -130,7 +131,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -142,3 +144,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
index 629a9a2439..8c1d2788c1 100644
--- a/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
+++ b/target/linux/ramips/dts/mt7621_glinet_gl-mt1300.dts
@@ -115,7 +115,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4000>;
+	nvmem-cells = <&macaddr_factory_4000>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -134,7 +135,8 @@
 		wan: port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x4000>;
+			nvmem-cells = <&macaddr_factory_4000>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -149,3 +151,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4000: macaddr at 4000 {
+		reg = <0x4000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
index c218521c03..db760381a4 100644
--- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
+++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts
@@ -100,7 +100,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -123,3 +124,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts
index 613524d1da..a3ef3a0104 100644
--- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts
+++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts
@@ -110,7 +110,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -133,3 +134,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
index c549bbb518..cc6446b75c 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr.dts
@@ -128,7 +128,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&iNIC_rf 0x4>;
+	nvmem-cells = <&macaddr_iNIC_rf_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -136,7 +137,8 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x4>;
+			nvmem-cells = <&macaddr_factory_4>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 
@@ -191,3 +193,23 @@
 &xhci {
 	status = "disabled";
 };
+
+&iNIC_rf {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_iNIC_rf_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts
index 055c1abde0..b63b4783b8 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-dx1200gr.dts
@@ -127,7 +127,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x1e000>;
+	nvmem-cells = <&macaddr_factory_1e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -135,7 +136,8 @@
 		wan: port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x1e006>;
+			nvmem-cells = <&macaddr_factory_1e006>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 1 {
@@ -194,3 +196,17 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_1e000: macaddr at 1e000 {
+		reg = <0x1e000 0x6>;
+	};
+
+	macaddr_factory_1e006: macaddr at 1e006 {
+		reg = <0x1e006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
index 91f30f8721..398a84117c 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-gx300gr.dts
@@ -128,7 +128,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -136,7 +137,8 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x4>;
+			nvmem-cells = <&macaddr_factory_4>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 
@@ -183,3 +185,13 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi
index ff9e525ae2..1dd3d77878 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi
+++ b/target/linux/ramips/dts/mt7621_iodata_wn-xx-xr.dtsi
@@ -118,7 +118,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -126,7 +127,8 @@
 		wan: port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 1 {
@@ -165,3 +167,17 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts
index 0e808f6894..6af6bdce7a 100644
--- a/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts
+++ b/target/linux/ramips/dts/mt7621_iodata_wnpr2600g.dts
@@ -120,7 +120,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -184,3 +185,13 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts b/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts
index 4ebd980521..b3efe557e2 100644
--- a/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts
+++ b/target/linux/ramips/dts/mt7621_iptime_a6ns-m.dts
@@ -111,7 +111,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&uboot 0x1fc20>;
+	nvmem-cells = <&macaddr_uboot_1fc20>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -119,7 +120,8 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&uboot 0x1fc40>;
+			nvmem-cells = <&macaddr_uboot_1fc40>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 1 {
@@ -165,3 +167,17 @@
 		ieee80211-freq-limit = <2400000 2500000>;
 	};
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc20: macaddr at 1fc20 {
+		reg = <0x1fc20 0x6>;
+	};
+
+	macaddr_uboot_1fc40: macaddr at 1fc40 {
+		reg = <0x1fc40 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts
index df6aed664e..a00e921a49 100644
--- a/target/linux/ramips/dts/mt7621_iptime_a8004t.dts
+++ b/target/linux/ramips/dts/mt7621_iptime_a8004t.dts
@@ -95,7 +95,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&uboot 0x1fc20>;
+	nvmem-cells = <&macaddr_uboot_1fc20>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -103,7 +104,8 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&uboot 0x1fc40>;
+			nvmem-cells = <&macaddr_uboot_1fc40>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 1 {
@@ -156,3 +158,17 @@
 		function = "gpio";
 	};
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc20: macaddr at 1fc20 {
+		reg = <0x1fc20 0x6>;
+	};
+
+	macaddr_uboot_1fc40: macaddr at 1fc40 {
+		reg = <0x1fc40 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
index ae312fcc52..da832d6df5 100644
--- a/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
+++ b/target/linux/ramips/dts/mt7621_jcg_jhr-ac876m.dts
@@ -129,7 +129,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -156,7 +157,8 @@
 		wan: port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x4>;
+			nvmem-cells = <&macaddr_factory_4>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -167,3 +169,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_jcg_q20.dts b/target/linux/ramips/dts/mt7621_jcg_q20.dts
index f0e829393c..c9bf648a31 100644
--- a/target/linux/ramips/dts/mt7621_jcg_q20.dts
+++ b/target/linux/ramips/dts/mt7621_jcg_q20.dts
@@ -144,7 +144,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x3fff4>;
+	nvmem-cells = <&macaddr_factory_3fff4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -152,7 +153,8 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x3fffa>;
+			nvmem-cells = <&macaddr_factory_3fffa>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 1 {
@@ -173,3 +175,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_3fff4: macaddr at 3fff4 {
+		reg = <0x3fff4 0x6>;
+	};
+
+	macaddr_factory_3fffa: macaddr at 3fffa {
+		reg = <0x3fffa 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_jcg_y2.dts b/target/linux/ramips/dts/mt7621_jcg_y2.dts
index 06d6579aaa..5de6ba6d95 100644
--- a/target/linux/ramips/dts/mt7621_jcg_y2.dts
+++ b/target/linux/ramips/dts/mt7621_jcg_y2.dts
@@ -89,7 +89,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -117,7 +118,8 @@
 		wan: port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -128,3 +130,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
index fa26900720..ddd46befe6 100644
--- a/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
+++ b/target/linux/ramips/dts/mt7621_lenovo_newifi-d1.dts
@@ -132,7 +132,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -150,7 +151,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -161,3 +163,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_linksys_re6500.dts b/target/linux/ramips/dts/mt7621_linksys_re6500.dts
index 319d0d7fb2..680bc863cd 100644
--- a/target/linux/ramips/dts/mt7621_linksys_re6500.dts
+++ b/target/linux/ramips/dts/mt7621_linksys_re6500.dts
@@ -113,7 +113,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x2e>;
+	nvmem-cells = <&macaddr_factory_2e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -143,3 +144,13 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
index ec9be40ce4..73dfbef27f 100644
--- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
+++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts
@@ -113,7 +113,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x5>;
+	nvmem-cells = <&macaddr_factory_5>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -141,7 +142,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x5>;
+			nvmem-cells = <&macaddr_factory_5>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -150,3 +152,13 @@
 &pcie {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_5: macaddr at 5 {
+		reg = <0x5 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts
index 130193c171..cb6310df18 100644
--- a/target/linux/ramips/dts/mt7621_mqmaker_witi.dts
+++ b/target/linux/ramips/dts/mt7621_mqmaker_witi.dts
@@ -80,7 +80,8 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&factory 0xe000>;
+		nvmem-cells = <&macaddr_factory_e000>;
+		nvmem-cell-names = "mac-address";
 	};
 };
 
@@ -89,12 +90,14 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x0000>;
 		ieee80211-freq-limit = <2400000 2500000>;
-		mtd-mac-address = <&factory 0xe000>;
+		nvmem-cells = <&macaddr_factory_e000>;
+		nvmem-cell-names = "mac-address";
 	};
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -122,7 +125,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -134,3 +138,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts
index cfa0e6af24..b1b020b3a8 100644
--- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts
+++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts
@@ -99,7 +99,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -127,7 +128,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x4>;
+			nvmem-cells = <&macaddr_factory_4>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -173,3 +175,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts
index 0da8f6b30c..360bcbb77d 100644
--- a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts
+++ b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts
@@ -228,7 +228,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -246,3 +247,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
index 3ed8bc55e9..2be3f87869 100644
--- a/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_bzv.dtsi
@@ -162,7 +162,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -190,7 +191,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x4>;
+			nvmem-cells = <&macaddr_factory_4>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <2>;
 		};
 	};
@@ -258,3 +260,13 @@
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
index 61cb522dfd..c2dc987871 100644
--- a/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
+++ b/target/linux/ramips/dts/mt7621_netgear_sercomm_chj.dtsi
@@ -96,7 +96,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -124,7 +125,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x4>;
+			nvmem-cells = <&macaddr_factory_4>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <2>;
 		};
 	};
@@ -186,3 +188,13 @@
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_netgear_wac104.dts b/target/linux/ramips/dts/mt7621_netgear_wac104.dts
index fbedeb2645..61ab0574a7 100644
--- a/target/linux/ramips/dts/mt7621_netgear_wac104.dts
+++ b/target/linux/ramips/dts/mt7621_netgear_wac104.dts
@@ -61,7 +61,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &nand {
@@ -164,3 +165,13 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_netis_wf2881.dts b/target/linux/ramips/dts/mt7621_netis_wf2881.dts
index 7dfd133a44..56a2647638 100644
--- a/target/linux/ramips/dts/mt7621_netis_wf2881.dts
+++ b/target/linux/ramips/dts/mt7621_netis_wf2881.dts
@@ -122,7 +122,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -150,7 +151,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -161,3 +163,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts
index ec24c713ea..a5060a1aee 100644
--- a/target/linux/ramips/dts/mt7621_phicomm_k2p.dts
+++ b/target/linux/ramips/dts/mt7621_phicomm_k2p.dts
@@ -103,7 +103,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -131,7 +132,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -142,3 +144,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_planex_vr500.dts b/target/linux/ramips/dts/mt7621_planex_vr500.dts
index 5f8f190a91..fb6a42166f 100644
--- a/target/linux/ramips/dts/mt7621_planex_vr500.dts
+++ b/target/linux/ramips/dts/mt7621_planex_vr500.dts
@@ -75,7 +75,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -103,7 +104,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -114,3 +116,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
index 9561c97b7e..929c2a8f26 100644
--- a/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
+++ b/target/linux/ramips/dts/mt7621_samknows_whitebox-v8.dts
@@ -106,7 +106,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -134,7 +135,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -145,3 +147,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502.dts b/target/linux/ramips/dts/mt7621_sercomm_na502.dts
index af55d1058f..ee77e30362 100644
--- a/target/linux/ramips/dts/mt7621_sercomm_na502.dts
+++ b/target/linux/ramips/dts/mt7621_sercomm_na502.dts
@@ -96,7 +96,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &nand {
@@ -170,8 +171,9 @@
 		compatible = "mediatek,mt76";
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x8000>;
-		mtd-mac-address = <&factory 0xe000>;
-		mtd-mac-address-increment = <1>;
+		nvmem-cells = <&macaddr_factory_e000>;
+		nvmem-cell-names = "mac-address";
+		mac-address-increment = <1>;
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
@@ -181,8 +183,9 @@
 		compatible = "mediatek,mt76";
 		reg = <0x0 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x0000>;
-		mtd-mac-address = <&factory 0xe000>;
-		mtd-mac-address-increment = <2>;
+		nvmem-cells = <&macaddr_factory_e000>;
+		nvmem-cell-names = "mac-address";
+		mac-address-increment = <2>;
 		ieee80211-freq-limit = <2400000 2500000>;
 	};
 };
@@ -210,3 +213,13 @@
 &uartlite3 {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
index 6ecf71895c..19eb11111d 100644
--- a/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
+++ b/target/linux/ramips/dts/mt7621_storylink_sap-g3200u3.dts
@@ -102,7 +102,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe006>;
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -130,7 +131,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -142,3 +144,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts
index 0386a3cdd2..51c1d868cb 100644
--- a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts
+++ b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts
@@ -121,7 +121,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe006>;
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -149,7 +150,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -186,3 +188,13 @@
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
index ef0d48b8c4..6e5f5772be 100644
--- a/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
+++ b/target/linux/ramips/dts/mt7621_tenbay_t-mb5eu-v01.dts
@@ -109,7 +109,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -117,7 +118,8 @@
 		wan_port: port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x28>;
+			nvmem-cells = <&macaddr_factory_28>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 1 {
@@ -194,3 +196,17 @@
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts
index fe11f4f487..917a6beb51 100644
--- a/target/linux/ramips/dts/mt7621_thunder_timecloud.dts
+++ b/target/linux/ramips/dts/mt7621_thunder_timecloud.dts
@@ -94,7 +94,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -112,3 +113,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts
index 4b53e60cd5..e817278728 100644
--- a/target/linux/ramips/dts/mt7621_totolink_a7000r.dts
+++ b/target/linux/ramips/dts/mt7621_totolink_a7000r.dts
@@ -100,7 +100,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -128,7 +129,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -140,3 +142,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts
index ef491087ef..8066340c5d 100644
--- a/target/linux/ramips/dts/mt7621_totolink_x5000r.dts
+++ b/target/linux/ramips/dts/mt7621_totolink_x5000r.dts
@@ -97,7 +97,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -125,7 +126,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -136,3 +138,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
index 7d38b7b096..93ceeb08f4 100644
--- a/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_archer-c6u-v1.dts
@@ -145,7 +145,8 @@
 		compatible = "mediatek,mt76";
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x0>;
-		mtd-mac-address = <&config 0x8>;
+		nvmem-cells = <&macaddr_config_8>;
+		nvmem-cell-names = "mac-address";
 		ieee80211-freq-limit = <2400000 2500000>;
 	};
 };
@@ -155,8 +156,9 @@
 		compatible = "mediatek,mt76";
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
-		mtd-mac-address = <&config 0x8>;
-		mtd-mac-address-increment = <(-1)>;
+		nvmem-cells = <&macaddr_config_8>;
+		nvmem-cell-names = "mac-address";
+		mac-address-increment = <(-1)>;
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
@@ -167,7 +169,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&config 0x8>;
+	nvmem-cells = <&macaddr_config_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -175,8 +178,9 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&config 0x8>;
-			mtd-mac-address-increment = <1>;
+			nvmem-cells = <&macaddr_config_8>;
+			nvmem-cell-names = "mac-address";
+			mac-address-increment = <1>;
 		};
 
 		port at 1 {
@@ -211,3 +215,13 @@
 &xhci {
 	vbus-supply = <&reg_usb_vbus>;
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi
index 76d9908fb9..3cc738530c 100644
--- a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi
+++ b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi
@@ -134,8 +134,9 @@
 		compatible = "mediatek,mt76";
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x0>;
-		mtd-mac-address = <&config 0x8>;
-		mtd-mac-address-increment = <1>;
+		nvmem-cells = <&macaddr_config_8>;
+		nvmem-cell-names = "mac-address";
+		mac-address-increment = <1>;
 		ieee80211-freq-limit = <2400000 2500000>;
 	};
 };
@@ -145,14 +146,16 @@
 		compatible = "mediatek,mt76";
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
-		mtd-mac-address = <&config 0x8>;
-		mtd-mac-address-increment = <2>;
+		nvmem-cells = <&macaddr_config_8>;
+		nvmem-cell-names = "mac-address";
+		mac-address-increment = <2>;
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
 
 &gmac0 {
-	mtd-mac-address = <&config 0x8>;
+	nvmem-cells = <&macaddr_config_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -183,3 +186,13 @@
 		};
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
index cf63e6b989..b40448791a 100644
--- a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
@@ -137,7 +137,8 @@
 	wifi at 0,0 {
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x0>;
-		mtd-mac-address = <&info 0x8>;
+		nvmem-cells = <&macaddr_info_8>;
+		nvmem-cell-names = "mac-address";
 	};
 };
 
@@ -146,13 +147,15 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&info 0x8>;
+		nvmem-cells = <&macaddr_info_8>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 	};
 };
 
 &gmac0 {
-	mtd-mac-address = <&info 0x8>;
+	nvmem-cells = <&macaddr_info_8>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -178,3 +181,13 @@
 		};
 	};
 };
+
+&info {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_info_8: macaddr at 8 {
+		reg = <0x8 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts
index 0a810b0195..3df4bc5d64 100644
--- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts
@@ -130,7 +130,8 @@
 	mt76 at 0,0 {
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x0>;
-		mtd-mac-address = <&config 0x10008>;
+		nvmem-cells = <&macaddr_config_10008>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 	};
 };
@@ -140,13 +141,15 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&config 0x10008>;
+		nvmem-cells = <&macaddr_config_10008>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <2>;
 	};
 };
 
 &gmac0 {
-	mtd-mac-address = <&config 0x10008>;
+	nvmem-cells = <&macaddr_config_10008>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -164,3 +167,13 @@
 		function = "gpio";
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_10008: macaddr at 10008 {
+		reg = <0x10008 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi
index 0ec83fa389..6cb6c0e460 100644
--- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi
+++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi
@@ -148,7 +148,8 @@
 		compatible = "mediatek,mt76";
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x0>;
-		mtd-mac-address = <&config 0x10008>;
+		nvmem-cells = <&macaddr_config_10008>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 		ieee80211-freq-limit = <2400000 2500000>;
 	};
@@ -159,14 +160,16 @@
 		compatible = "mediatek,mt76";
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
-		mtd-mac-address = <&config 0x10008>;
+		nvmem-cells = <&macaddr_config_10008>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <2>;
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
 
 &gmac0 {
-	mtd-mac-address = <&config 0x10008>;
+	nvmem-cells = <&macaddr_config_10008>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -177,3 +180,13 @@
 		};
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_10008: macaddr at 10008 {
+		reg = <0x10008 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
index 536180be10..8f97ba3353 100644
--- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
+++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x-sfp.dts
@@ -66,8 +66,19 @@
 			label = "eth5";
 			phy-handle = <&ephy7>;
 			phy-mode = "rgmii-rxid";
-			mtd-mac-address = <&factory 0x22>;
+			nvmem-cells = <&macaddr_factory_22>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <5>;
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_22: macaddr at 22 {
+		reg = <0x22 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
index b92dc8f3f0..e968c4e685 100644
--- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
+++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi
@@ -20,7 +20,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x22>;
+	nvmem-cells = <&macaddr_factory_22>;
+	nvmem-cell-names = "mac-address";
 	label = "dsa";
 };
 
@@ -34,28 +35,32 @@
 		port at 1 {
 			status = "okay";
 			label = "eth1";
-			mtd-mac-address = <&factory 0x22>;
+			nvmem-cells = <&macaddr_factory_22>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 
 		port at 2 {
 			status = "okay";
 			label = "eth2";
-			mtd-mac-address = <&factory 0x22>;
+			nvmem-cells = <&macaddr_factory_22>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <2>;
 		};
 
 		port at 3 {
 			status = "okay";
 			label = "eth3";
-			mtd-mac-address = <&factory 0x22>;
+			nvmem-cells = <&macaddr_factory_22>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <3>;
 		};
 
 		port at 4 {
 			status = "okay";
 			label = "eth4";
-			mtd-mac-address = <&factory 0x22>;
+			nvmem-cells = <&macaddr_factory_22>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <4>;
 		};
 	};
@@ -141,3 +146,13 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_22: macaddr at 22 {
+		reg = <0x22 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts
index d374fd3dde..1265a92123 100644
--- a/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts
+++ b/target/linux/ramips/dts/mt7621_ubnt_unifi-6-lite.dts
@@ -74,11 +74,27 @@
 };
 
 &wlan_2g {
-	mtd-mac-address = <&eeprom 0x0>;
+	nvmem-cells = <&macaddr_eeprom_0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wlan_5g {
 	mediatek,mtd-eeprom = <&factory 0x20000>;
-	mtd-mac-address = <&eeprom 0x6>;
+	nvmem-cells = <&macaddr_eeprom_6>;
+	nvmem-cell-names = "mac-address";
 	ieee80211-freq-limit = <5000000 6000000>;
 };
+
+&eeprom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_eeprom_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_eeprom_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts
index 04f656d0f6..252ade4854 100644
--- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts
+++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts
@@ -138,7 +138,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -166,7 +167,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -181,3 +183,17 @@
 &uartlite2 {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi
index ffa86a4810..06b301ba0b 100644
--- a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi
+++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi
@@ -98,7 +98,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -125,7 +126,8 @@
 		wan: port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x2e>;
+			nvmem-cells = <&macaddr_factory_2e>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -136,3 +138,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts
index 803bf5cf24..af6181b6d0 100644
--- a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts
+++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts
@@ -119,7 +119,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -127,7 +128,8 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 1 {
@@ -147,3 +149,17 @@
 &xhci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
index e8f3a50dbe..e9bd6e1cab 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3-pro.dts
@@ -176,7 +176,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe006>;
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -199,7 +200,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -210,3 +212,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts
index 40ea6625d4..1a19579208 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-3g.dts
@@ -86,7 +86,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe006>;
+	nvmem-cells = <&macaddr_factory_e006>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -94,7 +95,8 @@
 		port at 1 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 2 {
@@ -115,3 +117,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts
index 18cbe0c013..67a44dad11 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4.dts
@@ -65,7 +65,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -83,7 +84,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -94,3 +96,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi
index cc5abf09b6..4c469a2836 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi
+++ b/target/linux/ramips/dts/mt7621_xiaomi_mi-router-4a-3g-v2.dtsi
@@ -131,7 +131,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -149,7 +150,8 @@
 		wan: port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -160,3 +162,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi
index 7e6b3afcdf..7faf9b3e89 100644
--- a/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi
+++ b/target/linux/ramips/dts/mt7621_xiaomi_router-ac2100.dtsi
@@ -25,7 +25,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -33,7 +34,8 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 2 {
@@ -59,3 +61,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
index ee1a452fa9..c1f10ac55e 100644
--- a/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
+++ b/target/linux/ramips/dts/mt7621_xiaoyu_xy-c5.dts
@@ -85,7 +85,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -113,7 +114,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0x4>;
+			nvmem-cells = <&macaddr_factory_4>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -125,3 +127,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
index afee235ac7..6e04f9a493 100644
--- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
+++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts
@@ -153,7 +153,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -181,7 +182,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -193,3 +195,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts
index a77d13c71c..6813a2cf05 100644
--- a/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts
+++ b/target/linux/ramips/dts/mt7621_youhua_wr1200js.dts
@@ -125,7 +125,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -133,7 +134,8 @@
 		port at 0 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 
 		port at 1 {
@@ -164,3 +166,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts
index 627188873d..19ba7c08de 100644
--- a/target/linux/ramips/dts/mt7621_youku_yk-l2.dts
+++ b/target/linux/ramips/dts/mt7621_youku_yk-l2.dts
@@ -133,7 +133,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -161,7 +162,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -172,3 +174,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
index cd71166f4d..80166158b2 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts
@@ -74,7 +74,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -102,7 +103,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -130,3 +132,17 @@
 &sdhci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts
index 10e08cd3d0..b156b12fc8 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts
@@ -96,7 +96,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -124,7 +125,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe006>;
+			nvmem-cells = <&macaddr_factory_e006>;
+			nvmem-cell-names = "mac-address";
 		};
 	};
 };
@@ -135,3 +137,17 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+
+	macaddr_factory_e006: macaddr at e006 {
+		reg = <0xe006 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts
index b1fbf53931..e33fac8db1 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts
@@ -107,7 +107,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -135,7 +136,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -147,3 +149,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
index 2fe855abd5..87f9e2243c 100644
--- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
+++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi
@@ -111,7 +111,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -139,7 +140,8 @@
 		port at 4 {
 			status = "okay";
 			label = "wan";
-			mtd-mac-address = <&factory 0xe000>;
+			nvmem-cells = <&macaddr_factory_e000>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <1>;
 		};
 	};
@@ -151,3 +153,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts
index ef3306caa7..2a0bc6f8fd 100644
--- a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts
+++ b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts
@@ -144,7 +144,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &switch0 {
@@ -162,3 +163,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts
index 0596dc71d6..a467236640 100644
--- a/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts
+++ b/target/linux/ramips/dts/mt7621_zyxel_wap6805.dts
@@ -128,7 +128,8 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&factory 0xe000>;
+	nvmem-cells = <&macaddr_factory_e000>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gmac1 {
@@ -171,3 +172,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_e000: macaddr at e000 {
+		reg = <0xe000 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts
index d4f6a093d4..2e01b974a8 100644
--- a/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts
+++ b/target/linux/ramips/dts/mt7628an_alfa-network_awusfree1.dts
@@ -58,7 +58,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x2e>;
+	nvmem-cells = <&macaddr_factory_2e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ohci {
@@ -130,3 +131,13 @@
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi
index 239bb08230..3a2de12f6a 100644
--- a/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi
+++ b/target/linux/ramips/dts/mt7628an_asus_rt-n1x.dtsi
@@ -90,7 +90,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -119,3 +120,13 @@
 &ohci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
index adc9988600..5a2962a315 100644
--- a/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
+++ b/target/linux/ramips/dts/mt7628an_cudy_wr1000.dts
@@ -134,9 +134,20 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
 	mediatek,portmap = <0x2f>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts b/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts
index e5c52322b6..5a0aeaf5f2 100644
--- a/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts
+++ b/target/linux/ramips/dts/mt7628an_d-team_pbr-d1.dts
@@ -152,10 +152,21 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &sdhci {
 	status = "okay";
 	mediatek,cd-high;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_duzun_dm06.dts b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts
index f0d3dcb62a..b9a105b0e3 100644
--- a/target/linux/ramips/dts/mt7628an_duzun_dm06.dts
+++ b/target/linux/ramips/dts/mt7628an_duzun_dm06.dts
@@ -66,7 +66,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -129,3 +130,13 @@
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts
index aa60b8a2c6..e4b5f31ada 100644
--- a/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts
+++ b/target/linux/ramips/dts/mt7628an_elecom_wrc-1167fs.dts
@@ -132,7 +132,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ohci {
@@ -162,3 +163,13 @@
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts
index c5e0c2e02b..e0445c61dd 100644
--- a/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts
+++ b/target/linux/ramips/dts/mt7628an_glinet_gl-mt300n-v2.dts
@@ -81,7 +81,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -131,3 +132,13 @@
 &uart1 {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi
index 738968d1f9..6e3f64632d 100644
--- a/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi
+++ b/target/linux/ramips/dts/mt7628an_glinet_vixmini_microuter.dtsi
@@ -53,7 +53,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -102,3 +103,13 @@
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts b/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts
index 2ef0422925..945f680618 100644
--- a/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts
+++ b/target/linux/ramips/dts/mt7628an_hak5_wifi-pineapple-mk7.dts
@@ -116,9 +116,20 @@
 &ethernet {
 	status = "okay";
 
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts
index 87dff72c40..97acb3ff3f 100644
--- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts
+++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7628n.dts
@@ -82,9 +82,20 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts
index 969488e416..8e07dff0f1 100644
--- a/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts
+++ b/target/linux/ramips/dts/mt7628an_hilink_hlk-7688a.dts
@@ -103,7 +103,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -113,3 +114,13 @@
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts
index 326c412b0e..08bdcd73ad 100644
--- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts
+++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5861b.dts
@@ -43,7 +43,8 @@
 	wifi at 0,0 {
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x8000>;
-		mtd-mac-address = <&factory 0x2e>;
+		nvmem-cells = <&macaddr_factory_2e>;
+		nvmem-cell-names = "mac-address";
 		ieee80211-freq-limit = <5000000 6000000>;
 
 		led {
@@ -52,3 +53,13 @@
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi
index 7bd394c346..dcdf0cddc7 100644
--- a/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi
+++ b/target/linux/ramips/dts/mt7628an_hiwifi_hc5x61a.dtsi
@@ -90,9 +90,20 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_iptime.dtsi b/target/linux/ramips/dts/mt7628an_iptime.dtsi
index 8a33c37f7a..bc8965ca27 100644
--- a/target/linux/ramips/dts/mt7628an_iptime.dtsi
+++ b/target/linux/ramips/dts/mt7628an_iptime.dtsi
@@ -85,7 +85,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&uboot 0x1fc20>;
+	nvmem-cells = <&macaddr_uboot_1fc20>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie {
@@ -104,3 +105,13 @@
 &wmac {
 	status = "okay";
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_1fc20: macaddr at 1fc20 {
+		reg = <0x1fc20 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi
index 3fd173914e..8e73767dc2 100644
--- a/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi
+++ b/target/linux/ramips/dts/mt7628an_jotale_js76x8.dtsi
@@ -112,7 +112,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &sdhci {
@@ -123,3 +124,13 @@
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts
index cbec8c9d40..7beda75806 100644
--- a/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts
+++ b/target/linux/ramips/dts/mt7628an_mediatek_linkit-smart-7688.dts
@@ -147,7 +147,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x2e>;
+	nvmem-cells = <&macaddr_factory_2e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &sdhci {
@@ -158,3 +159,13 @@
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts
index 7aa678a1ad..f79d2d2641 100644
--- a/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts
+++ b/target/linux/ramips/dts/mt7628an_mercury_mac1200r-v2.dts
@@ -75,7 +75,8 @@
 
 &ethernet {
 	pinctrl-names = "default";
-	mtd-mac-address = <&factory 0xd>;
+	nvmem-cells = <&macaddr_factory_d>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -98,3 +99,13 @@
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_d: macaddr at d {
+		reg = <0xd 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts
index 12cf47f5a7..e741d2182c 100644
--- a/target/linux/ramips/dts/mt7628an_minew_g1-c.dts
+++ b/target/linux/ramips/dts/mt7628an_minew_g1-c.dts
@@ -125,7 +125,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -140,3 +141,13 @@
 	status = "okay";
 	mediatek,cd-high;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6120.dts b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts
index c70db4989b..02a22b7495 100644
--- a/target/linux/ramips/dts/mt7628an_netgear_r6120.dts
+++ b/target/linux/ramips/dts/mt7628an_netgear_r6120.dts
@@ -44,6 +44,17 @@
 };
 
 &wifi5 {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(2)>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi
index c3d7da2f09..f811466c16 100644
--- a/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi
+++ b/target/linux/ramips/dts/mt7628an_netgear_r6xxx.dtsi
@@ -99,7 +99,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pcie {
@@ -113,3 +114,13 @@
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
index b6d2df4756..d4de7fe6a4 100644
--- a/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
+++ b/target/linux/ramips/dts/mt7628an_onion_omega2.dtsi
@@ -152,7 +152,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x2e>;
+	nvmem-cells = <&macaddr_factory_2e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &sdhci {
@@ -163,3 +164,13 @@
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts
index 63c4901ec2..bf5fbcc64e 100644
--- a/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts
+++ b/target/linux/ramips/dts/mt7628an_rakwireless_rak633.dts
@@ -87,9 +87,20 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
index 859568b1c1..4775f8f076 100644
--- a/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
+++ b/target/linux/ramips/dts/mt7628an_ravpower_rp-wd009.dts
@@ -185,5 +185,16 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts
index 6e1cb396b8..4ceccde06d 100644
--- a/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts
+++ b/target/linux/ramips/dts/mt7628an_skylab_skw92a.dts
@@ -47,7 +47,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
@@ -97,3 +98,13 @@
 &uart1 {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_tama_w06.dts b/target/linux/ramips/dts/mt7628an_tama_w06.dts
index 2be5f3fc88..def722832d 100644
--- a/target/linux/ramips/dts/mt7628an_tama_w06.dts
+++ b/target/linux/ramips/dts/mt7628an_tama_w06.dts
@@ -38,7 +38,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &state_default {
@@ -97,3 +98,13 @@
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts
index ab5fdd3246..ef60f01002 100644
--- a/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts
+++ b/target/linux/ramips/dts/mt7628an_totolink_lr1200.dts
@@ -110,7 +110,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &spi0 {
@@ -152,3 +153,13 @@
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi b/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi
index b6ce7b1f56..bbd66e113c 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi
+++ b/target/linux/ramips/dts/mt7628an_tplink_8m-split-uboot.dtsi
@@ -74,14 +74,26 @@
 
 &wmac {
 	status = "okay";
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 	mediatek,mtd-eeprom = <&radio 0x0>;
 };
 
 &ethernet {
-	mtd-mac-address = <&rom 0xf100>;
+	nvmem-cells = <&macaddr_rom_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
 	mediatek,portmap = <0x3e>;
 };
+
+&rom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_rom_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi
index 2faf8a87fe..8372f057cd 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi
+++ b/target/linux/ramips/dts/mt7628an_tplink_8m.dtsi
@@ -55,10 +55,22 @@
 
 &wmac {
 	status = "okay";
-	mtd-mac-address = <&factory 0xf100>;
+	nvmem-cells = <&macaddr_factory_f100>;
+	nvmem-cell-names = "mac-address";
 	mediatek,mtd-eeprom = <&factory 0x20000>;
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0xf100>;
+	nvmem-cells = <&macaddr_factory_f100>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts
index 55f39db680..c2c6e922b7 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v4.dts
@@ -101,7 +101,18 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x28000>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&factory 0xf100>;
+		nvmem-cells = <&macaddr_factory_f100>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(-1)>;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts
index 38879d70e6..4f5faf2ee0 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c20-v5.dts
@@ -96,7 +96,18 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&rom 0xf100>;
+		nvmem-cells = <&macaddr_rom_f100>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(-1)>;
 	};
 };
+
+&rom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_rom_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts
index bb13bac8c8..8fc2334ae2 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v3.dts
@@ -96,7 +96,18 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x28000>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&factory 0xf100>;
+		nvmem-cells = <&macaddr_factory_f100>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(-1)>;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts
index 34170547a4..2a6963ab1c 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_archer-c50-v4.dts
@@ -94,7 +94,18 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&rom 0xf100>;
+		nvmem-cells = <&macaddr_rom_f100>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(-1)>;
 	};
 };
+
+&rom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_rom_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
index 633950f287..d221a5c7c8 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
+++ b/target/linux/ramips/dts/mt7628an_tplink_re200.dtsi
@@ -130,14 +130,16 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&config 0x2008>;
+	nvmem-cells = <&macaddr_config_2008>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	status = "okay";
 
 	mediatek,mtd-eeprom = <&radio 0x0>;
-	mtd-mac-address = <&config 0x2008>;
+	nvmem-cells = <&macaddr_config_2008>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -150,7 +152,18 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&config 0x2008>;
+		nvmem-cells = <&macaddr_config_2008>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <2>;
 	};
 };
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_2008: macaddr at 2008 {
+		reg = <0x2008 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts
index 300ea3bb29..6ac3730194 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_re305-v1.dts
@@ -127,7 +127,8 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&radio 0x8000>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&config 0x10008>;
+		nvmem-cells = <&macaddr_config_10008>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <2>;
 	};
 };
@@ -136,10 +137,22 @@
 	status = "okay";
 
 	mediatek,mtd-eeprom = <&radio 0x0>;
-	mtd-mac-address = <&config 0x10008>;
+	nvmem-cells = <&macaddr_config_10008>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
 &ethernet {
-	mtd-mac-address = <&config 0x10008>;
+	nvmem-cells = <&macaddr_config_10008>;
+	nvmem-cell-names = "mac-address";
+};
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_10008: macaddr at 10008 {
+		reg = <0x10008 0x6>;
+	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts
index 5bc12758d4..496f8db2ca 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr3020-v3.dts
@@ -123,10 +123,22 @@
 
 &wmac {
 	status = "okay";
-	mtd-mac-address = <&factory 0xf100>;
+	nvmem-cells = <&macaddr_factory_f100>;
+	nvmem-cell-names = "mac-address";
 	mediatek,mtd-eeprom = <&factory 0x20000>;
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0xf100>;
+	nvmem-cells = <&macaddr_factory_f100>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts
index a142be7870..1dfb89d528 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v4.dts
@@ -83,9 +83,21 @@
 };
 
 &wmac {
-	mtd-mac-address = <&factory 0x1f100>;
+	nvmem-cells = <&macaddr_factory_1f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x1f100>;
+	nvmem-cells = <&macaddr_factory_1f100>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_1f100: macaddr at 1f100 {
+		reg = <0x1f100 0x6>;
+	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts
index 7ab19632e8..408f12aeae 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-mr6400-v5.dts
@@ -83,9 +83,21 @@
 };
 
 &wmac {
-	mtd-mac-address = <&factory 0x1f100>;
+	nvmem-cells = <&macaddr_factory_1f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x1f100>;
+	nvmem-cells = <&macaddr_factory_1f100>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_1f100: macaddr at 1f100 {
+		reg = <0x1f100 0x6>;
+	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts
index bce34045c6..2141abc442 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr802n-v4.dts
@@ -49,5 +49,16 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0xf100>;
+	nvmem-cells = <&macaddr_factory_f100>;
+	nvmem-cell-names = "mac-address";
+};
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
 };
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts
index 1f8f7f4bab..ad65152a95 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr840n-v5.dts
@@ -88,11 +88,13 @@
 
 &wmac {
 	status = "okay";
-	mtd-mac-address = <&factory 0xf100>;
+	nvmem-cells = <&macaddr_factory_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0xf100>;
+	nvmem-cells = <&macaddr_factory_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -105,3 +107,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts
index a1a83bf237..9f1d667070 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr841n-v14.dts
@@ -100,11 +100,13 @@
 &wmac {
 	status = "okay";
 
-	mtd-mac-address = <&factory 0xf100>;
+	nvmem-cells = <&macaddr_factory_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0xf100>;
+	nvmem-cells = <&macaddr_factory_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -125,3 +127,13 @@
 		output-high;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts
index d3558547b8..fe10600cb9 100644
--- a/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts
+++ b/target/linux/ramips/dts/mt7628an_tplink_tl-wr902ac-v3.dts
@@ -92,7 +92,18 @@
 		reg = <0x0000 0 0 0 0>;
 		mediatek,mtd-eeprom = <&factory 0x28000>;
 		ieee80211-freq-limit = <5000000 6000000>;
-		mtd-mac-address = <&factory 0xf100>;
+		nvmem-cells = <&macaddr_factory_f100>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <(-1)>;
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts
index 9cea8b43f3..eb74c2ae51 100644
--- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts
+++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn570ha1.dts
@@ -117,9 +117,20 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x2e>;
+	nvmem-cells = <&macaddr_factory_2e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
 	mediatek,portmap = <0x2f>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts
index d6d418f1b9..b12e1f7106 100644
--- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts
+++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn575a3.dts
@@ -112,9 +112,20 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
 	mediatek,portmap = <0x2f>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts
index b5f8ff03a8..5e19e331c8 100644
--- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts
+++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn577a2.dts
@@ -116,7 +116,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -134,3 +135,13 @@
 &ohci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts
index d7238e17c6..96633c062e 100644
--- a/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts
+++ b/target/linux/ramips/dts/mt7628an_wavlink_wl-wn578a2.dts
@@ -146,7 +146,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -164,3 +165,13 @@
 &ohci {
 	status = "disabled";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts
index 1246651204..a25f4d8d28 100644
--- a/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts
+++ b/target/linux/ramips/dts/mt7628an_wiznet_wizfi630s.dts
@@ -143,7 +143,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x2e>;
+	nvmem-cells = <&macaddr_factory_2e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -159,3 +160,13 @@
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi
index a3330fb2eb..7158101ab7 100644
--- a/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi
+++ b/target/linux/ramips/dts/mt7628an_wrtnode_wrtnode2.dtsi
@@ -70,7 +70,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -88,3 +89,13 @@
 &wmac {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts
index ff562cbff4..626b36366d 100644
--- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4a-100m.dts
@@ -35,7 +35,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-1)>;
 };
 
@@ -43,3 +44,13 @@
 	mediatek,portmap = <0x3e>;
 	mediatek,portdisable = <0x2a>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts
index 4389a9daf4..e3aae273a9 100644
--- a/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_mi-router-4c.dts
@@ -38,10 +38,21 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
 	mediatek,portmap = <0x3d>;
 	mediatek,portdisable = <0x29>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
index ae6a72ebc3..37f409eee9 100644
--- a/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
+++ b/target/linux/ramips/dts/mt7628an_xiaomi_miwifi-nano.dts
@@ -74,7 +74,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &spi0 {
@@ -115,3 +116,13 @@
 		};
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts
index ac2a01eaba..fef199ac34 100644
--- a/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts
+++ b/target/linux/ramips/dts/mt7628an_zbtlink_zbt-we1226.dts
@@ -105,9 +105,20 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x2e>;
+	nvmem-cells = <&macaddr_factory_2e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
 	mediatek,portmap = <0x2f>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts
index 5e92cd2126..f3650dc6ae 100644
--- a/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts
+++ b/target/linux/ramips/dts/mt7628an_zyxel_keenetic-extra-ii.dts
@@ -168,7 +168,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -197,3 +198,13 @@
 		function = "gpio";
 	};
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts
index 9d78ca142c..52d5646610 100644
--- a/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts
+++ b/target/linux/ramips/dts/rt2880_airlink101_ar670w.dts
@@ -85,7 +85,8 @@
 
 &ethernet {
 	status = "okay";
-	mtd-mac-address = <&factory 0x2004>;
+	nvmem-cells = <&macaddr_factory_2004>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		phy-handle = <&phy0>;
@@ -106,3 +107,13 @@
 	status = "okay";
 	ralink,mtd-eeprom = <&factory 0x2000>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2004: macaddr at 2004 {
+		reg = <0x2004 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts
index 7038fc6590..bb3795aafa 100644
--- a/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts
+++ b/target/linux/ramips/dts/rt2880_airlink101_ar725w.dts
@@ -95,7 +95,8 @@
 
 &ethernet {
 	status = "okay";
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		phy-handle = <&phy0>;
@@ -116,3 +117,13 @@
 	status = "okay";
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt2880_asus_rt-n15.dts b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts
index 4b832faaf1..3bf3e21a47 100644
--- a/target/linux/ramips/dts/rt2880_asus_rt-n15.dts
+++ b/target/linux/ramips/dts/rt2880_asus_rt-n15.dts
@@ -95,7 +95,8 @@
 
 &ethernet {
 	status = "okay";
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		mediatek,fixed-link = <1000 1 1 1>;
@@ -114,3 +115,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts b/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts
index cbaa3e832f..59cc965f23 100644
--- a/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts
+++ b/target/linux/ramips/dts/rt2880_belkin_f5d8235-v1.dts
@@ -196,7 +196,8 @@
 
 &ethernet {
 	status = "okay";
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		mediatek,fixed-link = <1000 1 1 1>;
@@ -235,3 +236,13 @@
 	status = "okay";
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts b/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts
index a1f10ae45d..1bab37fc5e 100644
--- a/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts
+++ b/target/linux/ramips/dts/rt2880_buffalo_wli-tx4-ag300n.dts
@@ -98,7 +98,8 @@
 
 &ethernet {
 	status = "okay";
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		mediatek,fixed-link = <100 1 1 1>;
@@ -117,3 +118,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts b/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts
index cd9e918404..b3ada11220 100644
--- a/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts
+++ b/target/linux/ramips/dts/rt2880_buffalo_wzr-agl300nh.dts
@@ -116,7 +116,8 @@
 
 &ethernet {
 	status = "okay";
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		mediatek,fixed-link = <1000 1 1 1>;
@@ -139,3 +140,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts b/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts
index 3de9dc755c..ff714d1273 100644
--- a/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts
+++ b/target/linux/ramips/dts/rt2880_dlink_dap-1522-a1.dts
@@ -120,7 +120,8 @@
 
 &ethernet {
 	status = "okay";
-	mtd-mac-address = <&factory 0x2004>;
+	nvmem-cells = <&macaddr_factory_2004>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		mediatek,fixed-link = <1000 1 1 1>;
@@ -139,3 +140,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x2000>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2004: macaddr at 2004 {
+		reg = <0x2004 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_8devices_carambola.dts b/target/linux/ramips/dts/rt3050_8devices_carambola.dts
index 4ad23ff26d..820bbd3e99 100644
--- a/target/linux/ramips/dts/rt3050_8devices_carambola.dts
+++ b/target/linux/ramips/dts/rt3050_8devices_carambola.dts
@@ -63,7 +63,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -77,3 +78,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts b/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts
index 44b2ad4185..036d310561 100644
--- a/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts
+++ b/target/linux/ramips/dts/rt3050_arcwireless_freestation5.dts
@@ -94,7 +94,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -108,3 +109,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts b/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts
index 0baa2feac9..0d4d8f4cfd 100644
--- a/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts
+++ b/target/linux/ramips/dts/rt3050_asus_rt-g32-b1.dts
@@ -73,7 +73,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&devconf 0x4>;
+	nvmem-cells = <&macaddr_devconf_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -83,3 +84,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&devconf 0x0>;
 };
+
+&devconf {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_devconf_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts b/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts
index 5c1975595f..af6ebf0062 100644
--- a/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts
+++ b/target/linux/ramips/dts/rt3050_asus_rt-n10-plus.dts
@@ -79,7 +79,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&devconf 0x4>;
+	nvmem-cells = <&macaddr_devconf_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -89,3 +90,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&devconf 0x0>;
 };
+
+&devconf {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_devconf_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts
index cc6cd38246..2202cf3127 100644
--- a/target/linux/ramips/dts/rt3050_asus_wl-330n.dts
+++ b/target/linux/ramips/dts/rt3050_asus_wl-330n.dts
@@ -94,7 +94,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -104,3 +105,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts
index c2513c5dd5..4b9add1fda 100644
--- a/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts
+++ b/target/linux/ramips/dts/rt3050_asus_wl-330n3g.dts
@@ -99,7 +99,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -113,3 +114,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts
index ff01fe2709..6620b1e858 100644
--- a/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts
+++ b/target/linux/ramips/dts/rt3050_dlink_dcs-930.dts
@@ -96,7 +96,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -110,3 +111,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts
index 7699dcaabb..e1397d92f9 100644
--- a/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts
+++ b/target/linux/ramips/dts/rt3050_dlink_dir-300-b1.dts
@@ -106,7 +106,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&devdata 0x4004>;
+	nvmem-cells = <&macaddr_devdata_4004>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -116,3 +117,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&devdata 0x4000>;
 };
+
+&devdata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_devdata_4004: macaddr at 4004 {
+		reg = <0x4004 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts
index 21f0a73212..b0f734e4e0 100644
--- a/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts
+++ b/target/linux/ramips/dts/rt3050_dlink_dir-600-b1.dts
@@ -106,7 +106,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&devdata 0x4004>;
+	nvmem-cells = <&macaddr_devdata_4004>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -116,3 +117,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&devdata 0x4000>;
 };
+
+&devdata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_devdata_4004: macaddr at 4004 {
+		reg = <0x4004 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts b/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts
index c134803f67..4580a07063 100644
--- a/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts
+++ b/target/linux/ramips/dts/rt3050_dlink_dir-620-a1.dts
@@ -111,7 +111,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -125,3 +126,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts
index 07ff8bc9bc..c8f3951384 100644
--- a/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts
+++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200n.dts
@@ -107,7 +107,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -121,3 +122,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts
index f339b7ebe8..3767afb452 100644
--- a/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts
+++ b/target/linux/ramips/dts/rt3050_edimax_3g-6200nl.dts
@@ -94,7 +94,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -108,3 +109,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_huawei_d105.dts b/target/linux/ramips/dts/rt3050_huawei_d105.dts
index 2784b0c580..05d3847e71 100644
--- a/target/linux/ramips/dts/rt3050_huawei_d105.dts
+++ b/target/linux/ramips/dts/rt3050_huawei_d105.dts
@@ -87,7 +87,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -101,3 +102,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts b/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts
index 581edc6dfc..f449b0d0f8 100644
--- a/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts
+++ b/target/linux/ramips/dts/rt3050_jcg_jhr-n805r.dts
@@ -83,7 +83,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x2e>;
+	nvmem-cells = <&macaddr_factory_2e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -93,3 +94,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_netcore_nw718.dts b/target/linux/ramips/dts/rt3050_netcore_nw718.dts
index 124a2ba13c..f9fda94ec0 100644
--- a/target/linux/ramips/dts/rt3050_netcore_nw718.dts
+++ b/target/linux/ramips/dts/rt3050_netcore_nw718.dts
@@ -101,7 +101,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -115,3 +116,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts
index e457491906..c00feb4288 100644
--- a/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts
+++ b/target/linux/ramips/dts/rt3050_sparklan_wcr-150gn.dts
@@ -93,7 +93,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -107,3 +108,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts
index 742edbb11d..cfdb4d6b4b 100644
--- a/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts
+++ b/target/linux/ramips/dts/rt3050_teltonika_rut5xx.dts
@@ -83,7 +83,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -97,3 +98,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_tenda_w150m.dts b/target/linux/ramips/dts/rt3050_tenda_w150m.dts
index 2826993a9a..b921b7d178 100644
--- a/target/linux/ramips/dts/rt3050_tenda_w150m.dts
+++ b/target/linux/ramips/dts/rt3050_tenda_w150m.dts
@@ -111,7 +111,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -121,3 +122,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts b/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts
index 7df592bebd..36171ae591 100644
--- a/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts
+++ b/target/linux/ramips/dts/rt3050_trendnet_tew-638apb-v2.dts
@@ -91,7 +91,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -101,3 +102,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_accton_wr6202.dts b/target/linux/ramips/dts/rt3052_accton_wr6202.dts
index fac721cd76..a1c179c286 100644
--- a/target/linux/ramips/dts/rt3052_accton_wr6202.dts
+++ b/target/linux/ramips/dts/rt3052_accton_wr6202.dts
@@ -99,7 +99,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -113,3 +114,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts
index d88df8ca25..97b37706fb 100644
--- a/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts
+++ b/target/linux/ramips/dts/rt3052_alfa-network_w502u.dts
@@ -97,7 +97,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -111,3 +112,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_argus_atp-52b.dts b/target/linux/ramips/dts/rt3052_argus_atp-52b.dts
index 39afaa582e..dffa5beefa 100644
--- a/target/linux/ramips/dts/rt3052_argus_atp-52b.dts
+++ b/target/linux/ramips/dts/rt3052_argus_atp-52b.dts
@@ -89,7 +89,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -103,3 +104,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts
index a67a839dcc..cbd586232e 100644
--- a/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts
+++ b/target/linux/ramips/dts/rt3052_asus_rt-n13u.dts
@@ -91,7 +91,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -105,3 +106,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts
index 2d5f07746f..ada957fc52 100644
--- a/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts
+++ b/target/linux/ramips/dts/rt3052_aximcom_mr-102n.dts
@@ -108,7 +108,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -123,3 +124,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts
index f58a519b11..c547c9df69 100644
--- a/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts
+++ b/target/linux/ramips/dts/rt3052_aztech_hw550-3g.dts
@@ -109,7 +109,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -123,3 +124,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts b/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts
index a9db2882f3..444a5af4f5 100644
--- a/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts
+++ b/target/linux/ramips/dts/rt3052_belkin_f5d8235-v2.dts
@@ -115,7 +115,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&uboot 0x40004>;
+	nvmem-cells = <&macaddr_uboot_40004>;
+	nvmem-cell-names = "mac-address";
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii_pins>;
 };
@@ -140,3 +141,13 @@
 &otg {
 	status = "okay";
 };
+
+&uboot {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_uboot_40004: macaddr at 40004 {
+		reg = <0x40004 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts b/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts
index ca6259d303..5d61c75775 100644
--- a/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts
+++ b/target/linux/ramips/dts/rt3052_buffalo_whr-g300n.dts
@@ -113,7 +113,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -123,3 +124,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts
index a2584e005e..e33a7ef5b5 100644
--- a/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts
+++ b/target/linux/ramips/dts/rt3052_dlink_dap-1350.dts
@@ -118,7 +118,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&devdata 0x2e>;
+	nvmem-cells = <&macaddr_devdata_2e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -132,3 +133,13 @@
 &otg {
 	status = "okay";
 };
+
+&devdata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_devdata_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts
index 4566e7a166..4501a44c41 100644
--- a/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts
+++ b/target/linux/ramips/dts/rt3052_engenius_esr-9753.dts
@@ -91,7 +91,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -101,3 +102,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts
index 9d89c6e2f9..b9fb232aa1 100644
--- a/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts
+++ b/target/linux/ramips/dts/rt3052_fon_fonera-20n.dts
@@ -99,7 +99,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -151,3 +152,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts b/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts
index 6734f5b336..9d5d4ceb1e 100644
--- a/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts
+++ b/target/linux/ramips/dts/rt3052_hauppauge_broadway.dts
@@ -80,7 +80,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -94,3 +95,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_huawei_hg255d.dts b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts
index 92ea59bc4c..1cb19d0184 100644
--- a/target/linux/ramips/dts/rt3052_huawei_hg255d.dts
+++ b/target/linux/ramips/dts/rt3052_huawei_hg255d.dts
@@ -125,7 +125,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -139,3 +140,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts
index 7b71af402f..0641a4e796 100644
--- a/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts
+++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n825r.dts
@@ -78,7 +78,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x2e>;
+	nvmem-cells = <&macaddr_factory_2e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -88,3 +89,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts
index 543144394f..6573159985 100644
--- a/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts
+++ b/target/linux/ramips/dts/rt3052_jcg_jhr-n926r.dts
@@ -124,7 +124,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x2e>;
+	nvmem-cells = <&macaddr_factory_2e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -134,3 +135,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_2e: macaddr at 2e {
+		reg = <0x2e 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts
index e5d70bd803..c65fc100d8 100644
--- a/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts
+++ b/target/linux/ramips/dts/rt3052_netgear_wnce2001.dts
@@ -137,9 +137,20 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_nexaira_bc2.dts b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts
index d3d5afe64b..c72d9372a5 100644
--- a/target/linux/ramips/dts/rt3052_nexaira_bc2.dts
+++ b/target/linux/ramips/dts/rt3052_nexaira_bc2.dts
@@ -75,7 +75,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -89,3 +90,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts
index bc3dd5ee56..4399467b29 100644
--- a/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts
+++ b/target/linux/ramips/dts/rt3052_omnima_miniembwifi.dts
@@ -85,7 +85,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -99,3 +100,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts
index b17097cb45..ec46584381 100644
--- a/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts
+++ b/target/linux/ramips/dts/rt3052_petatel_psr-680w.dts
@@ -84,7 +84,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -98,3 +99,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts
index ff199f890b..779443e70e 100644
--- a/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts
+++ b/target/linux/ramips/dts/rt3052_planex_mzk-w300nh2.dts
@@ -108,7 +108,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -118,3 +119,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts b/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts
index 7f660d61d5..7e6d47cc02 100644
--- a/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts
+++ b/target/linux/ramips/dts/rt3052_planex_mzk-wdpr.dts
@@ -73,7 +73,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -87,3 +88,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_poray_ip2202.dts b/target/linux/ramips/dts/rt3052_poray_ip2202.dts
index f3dab80073..2f340c4c31 100644
--- a/target/linux/ramips/dts/rt3052_poray_ip2202.dts
+++ b/target/linux/ramips/dts/rt3052_poray_ip2202.dts
@@ -85,7 +85,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -95,3 +96,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts
index f4aa24ec5a..13f1ae4e59 100644
--- a/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts
+++ b/target/linux/ramips/dts/rt3052_sitecom_wl-351.dts
@@ -102,7 +102,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii_pins>;
 };
@@ -127,3 +128,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts b/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts
index 89e6c9ed71..c897aac7c4 100644
--- a/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts
+++ b/target/linux/ramips/dts/rt3052_skyline_sl-r7205.dts
@@ -86,7 +86,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -100,3 +101,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_tenda_3g300m.dts b/target/linux/ramips/dts/rt3052_tenda_3g300m.dts
index dcebe64af4..4ae42d71a5 100644
--- a/target/linux/ramips/dts/rt3052_tenda_3g300m.dts
+++ b/target/linux/ramips/dts/rt3052_tenda_3g300m.dts
@@ -116,7 +116,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -130,3 +131,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts
index f6c1b2d2b5..8a60184959 100644
--- a/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts
+++ b/target/linux/ramips/dts/rt3052_tenda_w306r-v2.dts
@@ -85,7 +85,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -95,3 +96,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts
index d94da95029..1067e5cf8b 100644
--- a/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts
+++ b/target/linux/ramips/dts/rt3052_unbranded_xdx-rn502j.dts
@@ -85,7 +85,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -99,3 +100,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts
index fc71437b48..211db1cbab 100644
--- a/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts
+++ b/target/linux/ramips/dts/rt3052_upvel_ur-326n4g.dts
@@ -106,7 +106,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4004>;
+	nvmem-cells = <&macaddr_factory_4004>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -120,3 +121,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4004: macaddr at 4004 {
+		reg = <0x4004 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts
index 2c00ca8945..735f59f067 100644
--- a/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts
+++ b/target/linux/ramips/dts/rt3052_upvel_ur-336un.dts
@@ -106,7 +106,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4004>;
+	nvmem-cells = <&macaddr_factory_4004>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -120,3 +121,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4004: macaddr at 4004 {
+		reg = <0x4004 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts
index 6c65d34f16..c2f44ee565 100644
--- a/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts
+++ b/target/linux/ramips/dts/rt3052_zyxel_keenetic.dts
@@ -105,7 +105,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -119,3 +120,13 @@
 &otg {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts
index db4f8d4a31..c5990977dc 100644
--- a/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts
+++ b/target/linux/ramips/dts/rt3052_zyxel_nbg-419n.dts
@@ -91,7 +91,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -101,3 +102,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3352_allnet_all5002.dts b/target/linux/ramips/dts/rt3352_allnet_all5002.dts
index 3aa132a727..28c677041a 100644
--- a/target/linux/ramips/dts/rt3352_allnet_all5002.dts
+++ b/target/linux/ramips/dts/rt3352_allnet_all5002.dts
@@ -91,7 +91,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -109,3 +110,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts b/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts
index 2233c9018c..01393c2383 100644
--- a/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts
+++ b/target/linux/ramips/dts/rt3352_dlink_dir-615-h1.dts
@@ -111,7 +111,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii_pins &mdio_pins>;
 };
@@ -123,3 +124,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts b/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts
index 50b762ce5a..bb36279016 100644
--- a/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts
+++ b/target/linux/ramips/dts/rt3352_dlink_dir-620-d1.dts
@@ -88,7 +88,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii_pins &mdio_pins>;
 };
@@ -108,3 +109,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3352_zte_mf283plus.dts b/target/linux/ramips/dts/rt3352_zte_mf283plus.dts
index a91d0e6ea9..b733d68586 100644
--- a/target/linux/ramips/dts/rt3352_zte_mf283plus.dts
+++ b/target/linux/ramips/dts/rt3352_zte_mf283plus.dts
@@ -111,7 +111,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -129,3 +130,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts b/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts
index 84bb645c5a..8b7c47e88b 100644
--- a/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts
+++ b/target/linux/ramips/dts/rt3352_zyxel_nbg-419n-v2.dts
@@ -105,7 +105,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -123,3 +124,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts
index 98426b86f0..38191d2643 100644
--- a/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts
+++ b/target/linux/ramips/dts/rt3662_asus_rt-n56u.dts
@@ -111,7 +111,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		mediatek,fixed-link = <1000 1 1 1>;
@@ -145,3 +146,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3662_dlink_dir-645.dts b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts
index 23313759c7..b02c6b692a 100644
--- a/target/linux/ramips/dts/rt3662_dlink_dir-645.dts
+++ b/target/linux/ramips/dts/rt3662_dlink_dir-645.dts
@@ -127,7 +127,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		mediatek,fixed-link = <1000 1 1 0>;
@@ -146,3 +147,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts
index 56d9dc0894..fc3a5549f2 100644
--- a/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts
+++ b/target/linux/ramips/dts/rt3662_edimax_br-6475nd.dts
@@ -139,7 +139,8 @@
 
 &ethernet {
 	status = "okay";
-	mtd-mac-address = <&devdata 0xd>;
+	nvmem-cells = <&macaddr_devdata_d>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		mediatek,fixed-link = <1000 1 1 1>;
@@ -173,3 +174,13 @@
 &ohci {
 	status = "okay";
 };
+
+&devdata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_devdata_d: macaddr at d {
+		reg = <0xd 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3662_omnima_hpm.dts b/target/linux/ramips/dts/rt3662_omnima_hpm.dts
index c0f30ec6c7..84ca468e3d 100644
--- a/target/linux/ramips/dts/rt3662_omnima_hpm.dts
+++ b/target/linux/ramips/dts/rt3662_omnima_hpm.dts
@@ -134,7 +134,8 @@
 &ethernet {
 	phy-handle = <&phy0>;
 	phy-mode = "rgmii";
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 
 	mdio-bus {
 		status = "okay";
@@ -156,3 +157,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts
index 6bed6f57bc..fc437c1f62 100644
--- a/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts
+++ b/target/linux/ramips/dts/rt3883_sitecom_wlr-6000.dts
@@ -64,7 +64,8 @@
 
 &ethernet {
 	status = "okay";
-	mtd-mac-address = <&factory 0x8004>;
+	nvmem-cells = <&macaddr_factory_8004>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 
 	port at 0 {
@@ -180,3 +181,13 @@
 &ohci {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_8004: macaddr at 8004 {
+		reg = <0x8004 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts
index b5cae66732..fe503289a3 100644
--- a/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts
+++ b/target/linux/ramips/dts/rt3883_trendnet_tew-691gr.dts
@@ -95,7 +95,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		phy-handle = <&phy0>;
@@ -116,6 +117,17 @@
 	status = "okay";
 	ralink,mtd-eeprom = <&factory 0x0>;
 	ralink,5ghz = <0>;
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts
index 39fb3d1c78..26c8dfe2f2 100644
--- a/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts
+++ b/target/linux/ramips/dts/rt3883_trendnet_tew-692gr.dts
@@ -95,7 +95,8 @@
 
 &ethernet {
 	status = "okay";
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 
 	port at 0 {
 		phy-handle = <&phy0>;
@@ -142,6 +143,17 @@
 	status = "okay";
 	ralink,mtd-eeprom = <&factory 0x0>;
 	ralink,5ghz = <0>;
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <3>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_airlive_air3gii.dts b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts
index 0a62c755e6..0082af958d 100644
--- a/target/linux/ramips/dts/rt5350_airlive_air3gii.dts
+++ b/target/linux/ramips/dts/rt5350_airlive_air3gii.dts
@@ -83,7 +83,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -93,3 +94,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_allnet_all5003.dts b/target/linux/ramips/dts/rt5350_allnet_all5003.dts
index 96dde0fbf1..e4e0ef1b62 100644
--- a/target/linux/ramips/dts/rt5350_allnet_all5003.dts
+++ b/target/linux/ramips/dts/rt5350_allnet_all5003.dts
@@ -91,7 +91,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -101,3 +102,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts b/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts
index 58a8407301..5b504bea65 100644
--- a/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts
+++ b/target/linux/ramips/dts/rt5350_dlink_dcs-930l-b1.dts
@@ -94,7 +94,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -104,3 +105,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts b/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts
index bcc02f3cda..62c68a3fc2 100644
--- a/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts
+++ b/target/linux/ramips/dts/rt5350_dlink_dir-300-b7.dts
@@ -94,7 +94,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -107,3 +108,13 @@
 	ralink,led-polarity = <1>;
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts b/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts
index 7d9bb0e359..5c5517ccb2 100644
--- a/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts
+++ b/target/linux/ramips/dts/rt5350_dlink_dir-320-b1.dts
@@ -116,7 +116,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -127,3 +128,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts b/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts
index 5bd87190a5..261346ce86 100644
--- a/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts
+++ b/target/linux/ramips/dts/rt5350_dlink_dir-610-a1.dts
@@ -94,7 +94,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&devdata 0x4004>;
+	nvmem-cells = <&macaddr_devdata_4004>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -108,3 +109,13 @@
 	ralink,led-polarity = <1>;
 	ralink,mtd-eeprom = <&devdata 0x4000>;
 };
+
+&devdata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_devdata_4004: macaddr at 4004 {
+		reg = <0x4004 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts
index 48fb1d4ffd..a7fc4765b7 100644
--- a/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts
+++ b/target/linux/ramips/dts/rt5350_dlink_dwr-512-b.dts
@@ -135,11 +135,23 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&config 0xe07e>;
+	nvmem-cells = <&macaddr_config_e07e>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	ralink,mtd-eeprom = <&config 0xe08a>;
 	ralink,led-polarity = <1>;
-	mtd-mac-address = <&config 0xe07e>;
+	nvmem-cells = <&macaddr_config_e07e>;
+	nvmem-cell-names = "mac-address";
+};
+
+&config {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_config_e07e: macaddr at e07e {
+		reg = <0xe07e 0x6>;
+	};
 };
diff --git a/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts b/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts
index 3b1fdd4a8e..1b80382f68 100644
--- a/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts
+++ b/target/linux/ramips/dts/rt5350_easyacc_wizard-8800.dts
@@ -53,7 +53,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -63,3 +64,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts
index 1386ec920b..a246c22c21 100644
--- a/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts
+++ b/target/linux/ramips/dts/rt5350_hame_mpr-a1.dts
@@ -105,7 +105,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -115,3 +116,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts
index f9365d5700..710fd2d6be 100644
--- a/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts
+++ b/target/linux/ramips/dts/rt5350_hame_mpr-a2.dts
@@ -105,7 +105,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -116,3 +117,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts b/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts
index 83b1fb2a6d..7dc56673a0 100644
--- a/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts
+++ b/target/linux/ramips/dts/rt5350_hilink_hlk-rm04.dts
@@ -103,9 +103,20 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts
index 543fda74b7..387e4adfdc 100644
--- a/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts
+++ b/target/linux/ramips/dts/rt5350_hootoo_ht-tm02.dts
@@ -95,7 +95,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -106,3 +107,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_intenso_memory2move.dts b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts
index 8ab2a87304..8df91594b7 100644
--- a/target/linux/ramips/dts/rt5350_intenso_memory2move.dts
+++ b/target/linux/ramips/dts/rt5350_intenso_memory2move.dts
@@ -98,7 +98,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -108,3 +109,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi
index 8a8e5a92e1..2d5d86ee1b 100644
--- a/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi
+++ b/target/linux/ramips/dts/rt5350_olimex_rt5350f-olinuxino.dtsi
@@ -60,7 +60,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -80,3 +81,13 @@
 &uart {
 	status = "okay";
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts
index 499b555da4..0e69cf8919 100644
--- a/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts
+++ b/target/linux/ramips/dts/rt5350_omnima_miniembplug.dts
@@ -101,7 +101,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -111,3 +112,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts
index d3d1ebe26f..89a774a060 100644
--- a/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts
+++ b/target/linux/ramips/dts/rt5350_planex_mzk-dp150n.dts
@@ -91,7 +91,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -102,3 +103,13 @@
 	ralink,mtd-eeprom = <&factory 0x0>;
 	ralink,led-polarity = <1>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_poray_m3.dts b/target/linux/ramips/dts/rt5350_poray_m3.dts
index b6bad0ab77..f02e7b024d 100644
--- a/target/linux/ramips/dts/rt5350_poray_m3.dts
+++ b/target/linux/ramips/dts/rt5350_poray_m3.dts
@@ -90,7 +90,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -102,3 +103,13 @@
 	ralink,mtd-eeprom = <&factory 0x0>;
 	ralink,led-polarity = <1>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_poray_x5.dts b/target/linux/ramips/dts/rt5350_poray_x5.dts
index 9c00da82ed..20e2a5257f 100644
--- a/target/linux/ramips/dts/rt5350_poray_x5.dts
+++ b/target/linux/ramips/dts/rt5350_poray_x5.dts
@@ -122,7 +122,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -134,3 +135,13 @@
 	ralink,mtd-eeprom = <&factory 0x0>;
 	ralink,led-polarity = <1>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_poray_x8.dts b/target/linux/ramips/dts/rt5350_poray_x8.dts
index b60bb99ee9..e84f28f783 100644
--- a/target/linux/ramips/dts/rt5350_poray_x8.dts
+++ b/target/linux/ramips/dts/rt5350_poray_x8.dts
@@ -83,7 +83,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -95,3 +96,13 @@
 	ralink,mtd-eeprom = <&factory 0x0>;
 	ralink,led-polarity = <1>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_tenda_3g150b.dts b/target/linux/ramips/dts/rt5350_tenda_3g150b.dts
index 35ccee1584..19b6d78009 100644
--- a/target/linux/ramips/dts/rt5350_tenda_3g150b.dts
+++ b/target/linux/ramips/dts/rt5350_tenda_3g150b.dts
@@ -101,7 +101,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -112,3 +113,13 @@
 	ralink,mtd-eeprom = <&factory 0x0>;
 	ralink,led-polarity = <1>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts
index 13d1a16741..a03f33f3fc 100644
--- a/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts
+++ b/target/linux/ramips/dts/rt5350_trendnet_tew-714tru.dts
@@ -104,7 +104,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -115,3 +116,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts
index 089b85629b..502ac60211 100644
--- a/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts
+++ b/target/linux/ramips/dts/rt5350_unbranded_a5-v11.dts
@@ -106,7 +106,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -117,3 +118,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts b/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts
index adb4034e8a..911e3e44ed 100644
--- a/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts
+++ b/target/linux/ramips/dts/rt5350_wansview_ncs601w.dts
@@ -53,7 +53,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -63,3 +64,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts b/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts
index 2cb6101184..12d41e305e 100644
--- a/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts
+++ b/target/linux/ramips/dts/rt5350_wiznet_wizfi630a.dts
@@ -130,7 +130,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -140,3 +141,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts
index 0879c11206..4ff2d57f72 100644
--- a/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts
+++ b/target/linux/ramips/dts/rt5350_zorlik_zl5900v2.dts
@@ -88,7 +88,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x4>;
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -98,3 +99,13 @@
 &wmac {
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_4: macaddr at 4 {
+		reg = <0x4 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts
index bc16e2c5c1..d044be395a 100644
--- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts
+++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-lite-b.dts
@@ -95,7 +95,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -107,3 +108,13 @@
 	ralink,led-polarity = <1>;
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};
diff --git a/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts
index eb7d7ed46b..69a1759f36 100644
--- a/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts
+++ b/target/linux/ramips/dts/rt5350_zyxel_keenetic-start.dts
@@ -97,7 +97,8 @@
 };
 
 &ethernet {
-	mtd-mac-address = <&factory 0x28>;
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
 };
 
 &esw {
@@ -110,3 +111,13 @@
 	ralink,led-polarity = <1>;
 	ralink,mtd-eeprom = <&factory 0x0>;
 };
+
+&factory {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_factory_28: macaddr at 28 {
+		reg = <0x28 0x6>;
+	};
+};


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:46 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:46 -0400
Subject: [openwrt/openwrt] lantiq: convert mtd-mac-address to nvmem
 implementation
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8545.1626699119.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/939c0030dba2742e17e18b68999e23317796ace8

commit 939c0030dba2742e17e18b68999e23317796ace8
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 2 23:40:10 2021 +0200

    lantiq: convert mtd-mac-address to nvmem implementation
    
    Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
    The conversion is done with an automated script.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 .../arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts      | 13 ++++++++++++-
 .../arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts      | 13 ++++++++++++-
 .../mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts   | 13 ++++++++++++-
 .../boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi    | 13 ++++++++++++-
 .../mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts   | 13 ++++++++++++-
 .../mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts   | 13 ++++++++++++-
 .../mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts   | 13 ++++++++++++-
 .../mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts   | 13 ++++++++++++-
 .../mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts | 16 ++++++++++++++--
 .../mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts | 13 ++++++++++++-
 .../mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts   | 16 ++++++++++++++--
 .../mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts   | 13 ++++++++++++-
 .../mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts   | 13 ++++++++++++-
 .../mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts   | 16 ++++++++++++++--
 .../mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts | 16 ++++++++++++++--
 .../mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts | 16 ++++++++++++++--
 .../mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts    | 13 ++++++++++++-
 .../mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi   | 16 ++++++++++++++--
 .../arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi  | 16 ++++++++++++++--
 .../arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi    | 16 ++++++++++++++--
 .../arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi      | 16 ++++++++++++++--
 21 files changed, 270 insertions(+), 30 deletions(-)

diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
index 19cb54db6b..8d3d686f46 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7312.dts
@@ -96,7 +96,8 @@
 &gsw {
 	phy-mode = "rmii";
 	phy-handle = <&phy0>;
-	mtd-mac-address = <&ath9k_cal 0xa91>;
+	nvmem-cells = <&macaddr_ath9k_cal_a91>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-2)>;
 
 	mdio-bus {
@@ -166,3 +167,13 @@
 		qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
 	};
 };
+
+&ath9k_cal {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_ath9k_cal_a91: macaddr at a91 {
+		reg = <0xa91 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
index 4d7986f0a5..f3b4e5e4f5 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_avm_fritz7320.dts
@@ -97,7 +97,8 @@
 
 &gsw {
 	phy-mode = "mii";
-	mtd-mac-address = <&ath9k_cal 0xa91>;
+	nvmem-cells = <&macaddr_ath9k_cal_a91>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <(-2)>;
 };
 
@@ -193,3 +194,13 @@
 	status = "okay";
 	vbus-supply = <&usb1_vbus>;
 };
+
+&ath9k_cal {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_ath9k_cal_a91: macaddr at a91 {
+		reg = <0xa91 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts
index e240f0c576..8eaf566b26 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_buffalo_wbmr-hp-g300h.dts
@@ -135,7 +135,8 @@
 
 &gsw {
 	phy-mode = "rgmii";
-	mtd-mac-address = <&boardconfig 0x10024>;
+	nvmem-cells = <&macaddr_boardconfig_10024>;
+	nvmem-cell-names = "mac-address";
 };
 
 &pci0 {
@@ -193,3 +194,13 @@
 	status = "okay";
 	vbus-supply = <&usb_vbus>;
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_10024: macaddr at 10024 {
+		reg = <0x10024 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi
index 48fe88fea8..b5e4537838 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4518pwr01.dtsi
@@ -124,7 +124,8 @@
 
 &gsw {
 	phy-mode = "mii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -198,3 +199,13 @@
 	status = "okay";
 	gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts
index 18a2bfbe83..35caf647a7 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4519pw.dts
@@ -132,7 +132,8 @@
 
 &gsw {
 	phy-mode = "mii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -201,3 +202,13 @@
 	status = "okay";
 	gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts
index 4c76350bdc..9a1c8b1bcb 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4520pw.dts
@@ -144,7 +144,8 @@
 &gsw {
 	/* gpiomm 10 - switch */
 	phy-mode = "rmii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -218,3 +219,13 @@
 	gpios = <&gpio 31 GPIO_ACTIVE_HIGH
 		&gpiomm 7 GPIO_ACTIVE_HIGH>;
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts
index df44abf92f..650c8872c9 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv4525pw.dts
@@ -93,7 +93,8 @@
 /* #define ARV4525PW_PHYRESET	13 */
 &gsw {
 	phy-mode = "mii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -147,3 +148,13 @@
 	status = "okay";
 	gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts
index bc04677d46..dddf904af4 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv452cqw.dts
@@ -162,7 +162,8 @@
 */
 &gsw {
 	phy-mode = "rmii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -236,3 +237,13 @@
 	gpios = <&gpio 31 GPIO_ACTIVE_HIGH
 		&gpiomm 7 GPIO_ACTIVE_HIGH>;
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts
index f0b288c6ba..bb82da0870 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7506pw11.dts
@@ -100,7 +100,8 @@
 /* GPIO 19: switch reset */
 &gsw {
 	phy-mode = "rmii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -154,7 +155,18 @@
 		reg = <0x7000 0 0 0 0>;
 		ralink,mtd-eeprom = <&boardconfig 0x410>;
 		ralink,mtd-eeprom-swap;
-		mtd-mac-address = <&boardconfig 0x16>;
+		nvmem-cells = <&macaddr_boardconfig_16>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 	};
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts
index 120dca1834..9d5595b607 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7510pw22.dts
@@ -117,7 +117,8 @@
 &gsw {
 	/* Switch reset 19 */
 	phy-mode = "mii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -194,3 +195,13 @@
 	status = "okay";
 	gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
index ca0cf107dd..a327635c33 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7518pw.dts
@@ -149,7 +149,8 @@
 */
 &gsw {
 	phy-mode = "mii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -212,7 +213,8 @@
 		compatible = "pci168c,0029";
 		reg = <0x7000 0 0 0 0>;
 		qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
-		mtd-mac-address = <&boardconfig 0x16>;
+		nvmem-cells = <&macaddr_boardconfig_16>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 	};
 };
@@ -229,3 +231,13 @@
 &vmmc {
 	status = "okay";
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts
index 839af43773..c48c9c0e7b 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7519pw.dts
@@ -144,7 +144,8 @@
 
 &gsw {
 	phy-mode = "mii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -213,3 +214,13 @@
 &vmmc {
 	status = "okay";
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts
index 1f1adc4738..12de92ec53 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv7525pw.dts
@@ -86,7 +86,8 @@
 
 &gsw {
 	phy-mode = "mii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -145,3 +146,13 @@
 	status = "okay";
 	gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts
index d0f5c38b39..e91c291e9a 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw.dts
@@ -156,7 +156,8 @@
 
 &gsw {
 	phy-mode = "rmii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -220,7 +221,8 @@
 	wifi0: wifi at 1814,0601 {
 		compatible = "pci1814,0601";
 		reg = <0x7000 0 0 0 0>;
-		mtd-mac-address = <&boardconfig 0x16>;
+		nvmem-cells = <&macaddr_boardconfig_16>;
+		nvmem-cell-names = "mac-address";
 		ralink,mtd-eeprom = <&boardconfig 0x410>;
 		ralink,mtd-eeprom-swap;
 	};
@@ -239,3 +241,13 @@
 	status = "okay";
 	gpios = <&gpiomm 1 GPIO_ACTIVE_HIGH>;
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts
index 00ac016a42..ea932d44b6 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv752dpw22.dts
@@ -171,7 +171,8 @@
 
 &gsw {
 	phy-mode = "mii";
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -242,7 +243,8 @@
 		reg = <0x7000 0 0 0 0>;
 		ralink,mtd-eeprom = <&boardconfig 0x410>;
 		ralink,mtd-eeprom-swap;
-		mtd-mac-address = <&boardconfig 0x16>;
+		nvmem-cells = <&macaddr_boardconfig_16>;
+		nvmem-cell-names = "mac-address";
 	};
 
 	usb at 0f,0 {
@@ -283,3 +285,13 @@
 	status = "okay";
 	gpios = <&gpiomm 1 GPIO_ACTIVE_HIGH>;
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts
index 3b9f6c2461..83a303b9e8 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/danube_arcadyan_arv8539pw22.dts
@@ -107,7 +107,8 @@
 
 &gsw {
 	phy-mode = "mii";
-	mtd-mac-address = <&art 0x16>;
+	nvmem-cells = <&macaddr_art_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &localbus {
@@ -159,7 +160,8 @@
 		compatible = "pci168c,0029";
 		reg = <0x7000 0 0 0 0>;
 		qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
-		mtd-mac-address = <&art 0x16>;
+		nvmem-cells = <&macaddr_art_16>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 	};
 };
@@ -177,3 +179,13 @@
 	status = "okay";
 	gpios = <&gpio 31 GPIO_ACTIVE_HIGH>;
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts
index 4b7343207e..343f3533d8 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_arv7519rw22.dts
@@ -94,7 +94,8 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gphy0 {
@@ -233,3 +234,13 @@
 	status = "okay";
 	vbus-supply = <&usb_vbus>;
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi
index 7a277892bb..1158aa371e 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7510kw22.dtsi
@@ -107,7 +107,8 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gphy0 {
@@ -219,7 +220,8 @@
 		reg = <0x7000 0 0 0 0>;
 		ralink,mtd-eeprom = <&boardconfig 0x410>;
 		ralink,mtd-eeprom-swap;
-		mtd-mac-address = <&boardconfig 0x16>;
+		nvmem-cells = <&macaddr_boardconfig_16>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 	};
 };
@@ -243,3 +245,13 @@
 			 &gpio 31 GPIO_ACTIVE_HIGH  //still unknown
 			 &gpio 3  GPIO_ACTIVE_HIGH>; //reset_slic?
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi
index c8dd817b6c..381c3fc27e 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_arcadyan_vgv7519.dtsi
@@ -127,7 +127,8 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&boardconfig 0x16>;
+	nvmem-cells = <&macaddr_boardconfig_16>;
+	nvmem-cell-names = "mac-address";
 	mac-address-increment = <1>;
 };
 
@@ -238,7 +239,8 @@
 		reg = <0x7000 0 0 0 0>;
 		ralink,mtd-eeprom = <&boardconfig 0x410>;
 		ralink,mtd-eeprom-swap;
-		mtd-mac-address = <&boardconfig 0x16>;
+		nvmem-cells = <&macaddr_boardconfig_16>;
+		nvmem-cell-names = "mac-address";
 		mac-address-increment = <1>;
 	};
 };
@@ -278,3 +280,13 @@
 		 &gpio 31 GPIO_ACTIVE_HIGH  //still unknown
 		 &gpio 3  GPIO_ACTIVE_HIGH>; //reset_slic?
 };
+
+&boardconfig {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_boardconfig_16: macaddr at 16 {
+		reg = <0x16 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
index 7749410816..bdf98fe98e 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_tdw89x0.dtsi
@@ -110,7 +110,8 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&ath9k_cal 0xf100>;
+	nvmem-cells = <&macaddr_ath9k_cal_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gphy0 {
@@ -203,7 +204,8 @@
 			gpio-controller;
 			qca,no-eeprom;
 			qca,disable-5ghz;
-			mtd-mac-address = <&ath9k_cal 0xf100>;
+			nvmem-cells = <&macaddr_ath9k_cal_f100>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <2>;
 		};
 	};
@@ -266,3 +268,13 @@
 	status = "okay";
 	vbus-supply = <&usb_vbus>;
 };
+
+&ath9k_cal {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_ath9k_cal_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi
index 67edc01d90..e37f1ab37c 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_tplink_vr200.dtsi
@@ -100,7 +100,8 @@
 };
 
 &eth0 {
-	mtd-mac-address = <&romfile 0xf100>;
+	nvmem-cells = <&macaddr_romfile_f100>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gphy0 {
@@ -191,7 +192,8 @@
 			mediatek,mtd-eeprom = <&radio 0x0000>;
 			big-endian;
 			ieee80211-freq-limit = <5000000 6000000>;
-			mtd-mac-address = <&romfile 0xf100>;
+			nvmem-cells = <&macaddr_romfile_f100>;
+			nvmem-cell-names = "mac-address";
 			mac-address-increment = <2>;
 		};
 	};
@@ -277,3 +279,13 @@
 	status = "okay";
 	vbus-supply = <&usb_vbus>;
 };
+
+&romfile {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_romfile_f100: macaddr at f100 {
+		reg = <0xf100 0x6>;
+	};
+};


From lede-commits at lists.infradead.org  Mon Jul 19 06:16:34 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 09:16:34 -0400
Subject: [openwrt/openwrt]  dnsmasq: add /tmp/hosts/ to jail_mount
In-Reply-To: <162670059470.12404.13730484694152129868@git-01.infra.openwrt.org>
References: <162670059470.12404.13730484694152129868@git-01.infra.openwrt.org>
Message-ID: <mailman.8546.1626700599.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/88c8d0a2193bd3dd2cf00bc875def6155f2e34db

commit 88c8d0a2193bd3dd2cf00bc875def6155f2e34db
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Sun Jul 18 15:32:44 2021 +0200

    dnsmasq: add /tmp/hosts/ to jail_mount
    
    Programs like the olsr-name-plugin write hostname files to "/tmp/hosts/".
    If you don't add this to the jail_mount, dnsmasq can't read it anymore.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
    (cherry picked from commit 3a94c2ca5cf7c11ca150fa3ae884e7be8d07a281)
---
 package/network/services/dnsmasq/files/dnsmasq.init | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 680e72f9e7..e5f67a95de 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -1106,7 +1106,7 @@ dnsmasq_start()
 	procd_set_param respawn
 
 	procd_add_jail dnsmasq ubus log
-	procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT
+	procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT /tmp/hosts/
 	procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
 
 	procd_close_instance


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:54 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:54 -0400
Subject: [openwrt/openwrt] bmips: convert mtd-mac-address to nvmem
 implementation
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8549.1626700905.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/32adbfc789f6113fa6a297de71d36df32fcb8324

commit 32adbfc789f6113fa6a297de71d36df32fcb8324
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Sun Jul 18 19:37:39 2021 +0200

    bmips: convert mtd-mac-address to nvmem implementation
    
    Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
    The conversion is done with an automated script.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts  | 13 ++++++++++++-
 target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts   | 18 +++++++++++++++---
 target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts  | 18 +++++++++++++++---
 target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts     | 15 +++++++++++++--
 target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts | 13 ++++++++++++-
 target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts   | 18 +++++++++++++++---
 6 files changed, 82 insertions(+), 13 deletions(-)

diff --git a/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts b/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts
index 094dca1585..95fda0843c 100644
--- a/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts
+++ b/target/linux/bmips/dts/bcm63168-comtrend-vr-3032u.dts
@@ -44,7 +44,8 @@
 &ethernet {
 	status = "okay";
 
-	mtd-mac-address = <&cferom 0x6a0>;
+	nvmem-cells = <&macaddr_cferom_6a0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &leds {
@@ -224,3 +225,13 @@
 &usbh {
 	status = "okay";
 };
+
+&cferom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_cferom_6a0: macaddr at 6a0 {
+		reg = <0x6a0 0x6>;
+	};
+};
diff --git a/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts b/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts
index 0a53ece140..a54d632770 100644
--- a/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts
+++ b/target/linux/bmips/dts/bcm6318-comtrend-ar-5315u.dts
@@ -42,8 +42,9 @@
 		pci-bus = <1>;
 		pci-dev = <0>;
 
-		mtd-mac-address = <&cfe 0x6a0>;
-		mtd-mac-address-increment = <1>;
+		nvmem-cells = <&macaddr_cfe_6a0>;
+		nvmem-cell-names = "mac-address";
+		mac-address-increment = <1>;
 
 		brcm,sprom-fixups = <6 0x1c00>,
 				    <65 0x1255>,
@@ -66,7 +67,8 @@
 &ethernet {
 	status = "okay";
 
-	mtd-mac-address = <&cfe 0x6a0>;
+	nvmem-cells = <&macaddr_cfe_6a0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &hsspi {
@@ -243,3 +245,13 @@
 &usbh {
 	status = "okay";
 };
+
+&cfe {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_cfe_6a0: macaddr at 6a0 {
+		reg = <0x6a0 0x6>;
+	};
+};
diff --git a/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts b/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts
index 06fe1f9009..47db0809e1 100644
--- a/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts
+++ b/target/linux/bmips/dts/bcm6328-comtrend-ar-5387un.dts
@@ -34,8 +34,9 @@
 		pci-bus = <1>;
 		pci-dev = <0>;
 
-		mtd-mac-address = <&cfe 0x6a0>;
-		mtd-mac-address-increment = <1>;
+		nvmem-cells = <&macaddr_cfe_6a0>;
+		nvmem-cell-names = "mac-address";
+		mac-address-increment = <1>;
 
 		brcm,sprom-fixups = <2 0x05bb>,
 				    <65 0x1204>,
@@ -71,7 +72,8 @@
 &ethernet {
 	status = "okay";
 
-	mtd-mac-address = <&cfe 0x6a0>;
+	nvmem-cells = <&macaddr_cfe_6a0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &hsspi {
@@ -200,3 +202,13 @@
 &usbh {
 	status = "okay";
 };
+
+&cfe {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_cfe_6a0: macaddr at 6a0 {
+		reg = <0x6a0 0x6>;
+	};
+};
diff --git a/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts b/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts
index 1ec5a71515..6c8b093edf 100644
--- a/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts
+++ b/target/linux/bmips/dts/bcm6358-huawei-hg556a-b.dts
@@ -125,8 +125,9 @@
 
 		pci-dev = <1>;
 
-		mtd-mac-address = <&cfe 0x6a0>;
-		mtd-mac-address-increment = <1>;
+		nvmem-cells = <&macaddr_cfe_6a0>;
+		nvmem-cell-names = "mac-address";
+		mac-address-increment = <1>;
 
 		ath,eeprom = <&cal_data 0x1e000>;
 		ath,endian-check;
@@ -187,3 +188,13 @@
 &usbh {
 	status = "okay";
 };
+
+&cfe {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_cfe_6a0: macaddr at 6a0 {
+		reg = <0x6a0 0x6>;
+	};
+};
diff --git a/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts b/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts
index 9e5b1610dc..b99fecaaa6 100644
--- a/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts
+++ b/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts
@@ -67,7 +67,8 @@
 &ethernet {
 	status = "okay";
 
-	mtd-mac-address = <&cferom 0x6a0>;
+	nvmem-cells = <&macaddr_cferom_6a0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &leds {
@@ -245,3 +246,13 @@
 &usbh {
 	status = "okay";
 };
+
+&cferom {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_cferom_6a0: macaddr at 6a0 {
+		reg = <0x6a0 0x6>;
+	};
+};
diff --git a/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts b/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts
index b4d2047cd8..29d8dfd56e 100644
--- a/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts
+++ b/target/linux/bmips/dts/bcm6368-comtrend-vr-3025u.dts
@@ -63,8 +63,9 @@
 		pci-bus = <0>;
 		pci-dev = <1>;
 
-		mtd-mac-address = <&cfe 0x6a0>;
-		mtd-mac-address-increment = <1>;
+		nvmem-cells = <&macaddr_cfe_6a0>;
+		nvmem-cell-names = "mac-address";
+		mac-address-increment = <1>;
 
 		brcm,sprom-fixups = <97 0xfeb3>,
 				    <98 0x1618>,
@@ -82,7 +83,8 @@
 &ethernet {
 	status = "okay";
 
-	mtd-mac-address = <&cfe 0x6a0>;
+	nvmem-cells = <&macaddr_cfe_6a0>;
+	nvmem-cell-names = "mac-address";
 };
 
 &ohci {
@@ -165,3 +167,13 @@
 &usbh {
 	status = "okay";
 };
+
+&cfe {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_cfe_6a0: macaddr at 6a0 {
+		reg = <0x6a0 0x6>;
+	};
+};


From lede-commits at lists.infradead.org  Mon Jul 19 05:51:53 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 08:51:53 -0400
Subject: [openwrt/openwrt] ipq40xx: convert mtd-mac-address to nvmem
 implementation
In-Reply-To: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
References: <162669910327.13167.17925657399526232402@git-01.infra.openwrt.org>
Message-ID: <mailman.8552.1626701215.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/821b6640994df32d20a087a01b7c368187a93c24

commit 821b6640994df32d20a087a01b7c368187a93c24
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 2 23:53:52 2021 +0200

    ipq40xx: convert mtd-mac-address to nvmem implementation
    
    Define nvmem-cells and convert mtd-mac-address to nvmem implementation.
    The conversion is done with an automated script.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 .../arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts     | 20 ++++++++++++++++++--
 .../arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts   | 16 ++++++++++++++--
 2 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
index 167094d4a2..6c97cede7b 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
@@ -197,11 +197,13 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&art 0x1006>;
+	nvmem-cells = <&macaddr_art_1006>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gmac1 {
-	mtd-mac-address = <&art 0x5006>;
+	nvmem-cells = <&macaddr_art_5006>;
+	nvmem-cell-names = "mac-address";
 };
 
 &nand {
@@ -352,3 +354,17 @@
 	status = "okay";
 	qcom,ath10k-calibration-variant = "CM520-79F";
 };
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_1006: macaddr at 1006 {
+		reg = <0x1006 0x6>;
+	};
+
+	macaddr_art_5006: macaddr at 5006 {
+		reg = <0x5006 0x6>;
+	};
+};
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts
index cdf0cfe644..fb0cec59f7 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts
@@ -403,11 +403,13 @@
 };
 
 &gmac0 {
-	mtd-mac-address = <&orgdata 0x20>;
+	nvmem-cells = <&macaddr_orgdata_20>;
+	nvmem-cell-names = "mac-address";
 };
 
 &gmac1 {
-	mtd-mac-address = <&orgdata 0x20>;
+	nvmem-cells = <&macaddr_orgdata_20>;
+	nvmem-cell-names = "mac-address";
 };
 
 &usb3_ss_phy {
@@ -417,3 +419,13 @@
 &usb3_hs_phy {
 	status = "okay";
 };
+
+&orgdata {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_orgdata_20: macaddr at 20 {
+		reg = <0x20 0x6>;
+	};
+};


From lede-commits at lists.infradead.org  Mon Jul 19 10:10:35 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 13:10:35 -0400
Subject: [openwrt/openwrt] ath10k: fix compilation error with CONFIG_OF not
 available
In-Reply-To: <162671463538.3689.16396465618866846966@git-01.infra.openwrt.org>
References: <162671463538.3689.16396465618866846966@git-01.infra.openwrt.org>
Message-ID: <mailman.8622.1626714640.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/853e8465a7af2a13fa2ebf0354cce091ab63d44b

commit 853e8465a7af2a13fa2ebf0354cce091ab63d44b
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Mon Jul 19 17:58:00 2021 +0200

    ath10k: fix compilation error with CONFIG_OF not available
    
    of_platform_device_create require CONFIG_OF selected.
    Add an ifdef and register to the of platform only if of is available.
    
    Fixes: 985954ccbd11 ("kernel: add ath10k support for of_get_mac_address")
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 .../patches/203-ath10k-Try-to-get-mac-address-from-dts.patch          | 4 +++-
 .../patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch      | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch b/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch
index dbaef20b98..b5c53baf67 100644
--- a/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch
+++ b/package/kernel/ath10k-ct/patches/203-ath10k-Try-to-get-mac-address-from-dts.patch
@@ -30,15 +30,17 @@ index 5f4e12196..9ed7b9883 100644
  #include <linux/property.h>
  #include <linux/dmi.h>
  #include <linux/ctype.h>
-@@ -2961,8 +2963,12 @@ EXPORT_SYMBOL(ath10k_core_stop);
+@@ -2961,8 +2963,14 @@ EXPORT_SYMBOL(ath10k_core_stop);
  static int ath10k_core_probe_fw(struct ath10k *ar)
  {
  	struct bmi_target_info target_info;
 +	const char *mac;
  	int ret = 0;
  
++#ifdef CONFIG_OF
 +	/* register the platform to be found by the of api */
 +	of_platform_device_create(ar->dev->of_node, NULL, NULL);
++#endif
 +
  	ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL);
  	if (ret) {
diff --git a/package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch b/package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch
index 94eac3fa4a..d0eb43fdea 100644
--- a/package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch
+++ b/package/kernel/mac80211/patches/ath/984-ath10k-Try-to-get-mac-address-from-dts.patch
@@ -30,15 +30,17 @@ index 5f4e12196..9ed7b9883 100644
  #include <linux/property.h>
  #include <linux/dmi.h>
  #include <linux/ctype.h>
-@@ -2961,8 +2963,12 @@ EXPORT_SYMBOL(ath10k_core_stop);
+@@ -2961,8 +2963,14 @@ EXPORT_SYMBOL(ath10k_core_stop);
  static int ath10k_core_probe_fw(struct ath10k *ar)
  {
  	struct bmi_target_info target_info;
 +	const char *mac;
  	int ret = 0;
  
++#ifdef CONFIG_OF
 +	/* register the platform to be found by the of api */
 +	of_platform_device_create(ar->dev->of_node, NULL, NULL);
++#endif
 +
  	ret = ath10k_hif_power_up(ar, ATH10K_FIRMWARE_MODE_NORMAL);
  	if (ret) {


From lede-commits at lists.infradead.org  Mon Jul 19 13:57:57 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 16:57:57 -0400
Subject: [openwrt/openwrt]  glibc: update to latest 2.33 HEAD (bug 28011)
In-Reply-To: <162672827400.20618.11021713862212816918@git-01.infra.openwrt.org>
References: <162672827400.20618.11021713862212816918@git-01.infra.openwrt.org>
Message-ID: <mailman.8664.1626728280.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/60fad8f82bd163761ae0e51ff131ba23f753ef83

commit 60fad8f82bd163761ae0e51ff131ba23f753ef83
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Tue Jul 13 21:21:33 2021 +0200

    glibc: update to latest 2.33 HEAD (bug 28011)
    
    b5711025bc x86_64: Remove unneeded static PIE check for undefined weak diagnostic
    edfd11197e wordexp: handle overflow in positional parameter number (bug 28011)
    
    Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
    (cherry picked from commit 9d2dcc83128a035262bf15b8bbd1f57622465b42)
---
 toolchain/glibc/common.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk
index ec0621494f..48f2aa26a4 100644
--- a/toolchain/glibc/common.mk
+++ b/toolchain/glibc/common.mk
@@ -12,8 +12,8 @@ PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=58b90461ae100c95e0bc53d29d2187bad290ecaf
-PKG_MIRROR_HASH:=33fc6ec88cbf9235b151bea67db8922ef6f42dd5c1f4ff462077224fa3916be4
+PKG_SOURCE_VERSION:=b5711025bc138c0c94d90b2015d57eda404decbe
+PKG_MIRROR_HASH:=6910af6ca27ea80e600c59fad25d88c51618928316f3bfcc78ad2f0c1794da16
 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
 


From lede-commits at lists.infradead.org  Mon Jul 19 13:57:56 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 16:57:56 -0400
Subject: [openwrt/openwrt]  glibc: update to latest 2.33 HEAD (BZ #27646,
 bug 27896, BZ #15271)
In-Reply-To: <162672827400.20618.11021713862212816918@git-01.infra.openwrt.org>
References: <162672827400.20618.11021713862212816918@git-01.infra.openwrt.org>
Message-ID: <mailman.8665.1626728280.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/c58afca1aa0688b12b010e069d9bedd4bb2e3529

commit c58afca1aa0688b12b010e069d9bedd4bb2e3529
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Sun Jun 27 15:29:25 2021 +0200

    glibc: update to latest 2.33 HEAD (BZ #27646, bug 27896, BZ #15271)
    
    58b90461ae elf: Use _dl_catch_error from base namespace in dl-libc.c [BZ #27646]
    8c06748c51 Fix use of __pthread_attr_copy in mq_notify (bug 27896)
    4b6be914bd Use __pthread_attr_copy in mq_notify (bug 27896)
    f4cba6ca1e dlfcn: Failures after dlmopen should not terminate process [BZ #15271]
    
    Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
    (cherry picked from commit f033d5ad1c28e07eb6de2ce3ea8650dc7080d6d0)
---
 toolchain/glibc/common.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk
index b88a456ce7..ec0621494f 100644
--- a/toolchain/glibc/common.mk
+++ b/toolchain/glibc/common.mk
@@ -12,8 +12,8 @@ PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=0ef0e6de7fdfa18328b09ba2afb4f0112d4bdab4
-PKG_MIRROR_HASH:=1f2cfa8bd69f6286f2449317758e3ef29fc55cd420dfe8cd9327f149b0e9ac62
+PKG_SOURCE_VERSION:=58b90461ae100c95e0bc53d29d2187bad290ecaf
+PKG_MIRROR_HASH:=33fc6ec88cbf9235b151bea67db8922ef6f42dd5c1f4ff462077224fa3916be4
 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
 


From lede-commits at lists.infradead.org  Mon Jul 19 13:57:55 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 16:57:55 -0400
Subject: [openwrt/openwrt] dnsmasq: distinct Ubus names for multiple instances
In-Reply-To: <162672827400.20618.11021713862212816918@git-01.infra.openwrt.org>
References: <162672827400.20618.11021713862212816918@git-01.infra.openwrt.org>
Message-ID: <mailman.8666.1626728283.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/249aeaa9d8bb74443d5e9c4e72de3464a62b540f

commit 249aeaa9d8bb74443d5e9c4e72de3464a62b540f
Author: Etan Kissling <etan.kissling at gmail.com>
AuthorDate: Sun Jun 27 22:02:46 2021 +0000

    dnsmasq: distinct Ubus names for multiple instances
    
    Currently, when using multiple dnsmasq instances they are all assigned
    to the same Ubus instance name. This does not work, as only a single
    instance can register with Ubus at a time. In the log, this leads to
    `Cannot add object to UBus: Invalid argument` error messages.
    Furthermore, upstream 3c93e8eb41952a9c91699386132d6fe83050e9be changes
    behaviour so that instead of the log, dnsmasq exits at start instead.
    
    With this patch, all dnsmasq instances are assigned unique names so that
    they can register with Ubus concurrently. One of the enabled instances
    is always assigned the previous default name "dnsmasq" to avoid breaking
    backwards compatibility with other software relying on that default.
    Previously, a random instance got assigned that name (while the others
    produced error logs). Now, the first unnamed dnsmasq config section is
    assigned the default name. If there are no unnamed dnsmasq sections the
    first encountered named dnsmasq config section is assigned instead.
    
    A similar issue exists for Dbus and was similarly addressed.
    
    Signed-off-by: Etan Kissling <etan.kissling at gmail.com>
    [tweaked commit message] dnsmasq was not crashing it is exiting
    Signed-off-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
    (cherry picked from commit ba5bd8e556b2e7573d27b16e005ba287e066f795)
---
 .../network/services/dnsmasq/files/dnsmasq.init    | 32 ++++++++++++++++++++--
 1 file changed, 29 insertions(+), 3 deletions(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index e5f67a95de..2620821638 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -161,7 +161,7 @@ append_server() {
 }
 
 append_rev_server() {
-        xappend "--rev-server=$1"
+	xappend "--rev-server=$1"
 }
 
 append_address() {
@@ -878,8 +878,16 @@ dnsmasq_start()
 	append_bool "$cfg" noresolv "--no-resolv"
 	append_bool "$cfg" localise_queries "--localise-queries"
 	append_bool "$cfg" readethers "--read-ethers"
-	append_bool "$cfg" dbus "--enable-dbus"
-	append_bool "$cfg" ubus "--enable-ubus"	1
+
+	local instance_name="dnsmasq.$cfg"
+	if [ "$cfg" = "$DEFAULT_INSTANCE" ]; then
+		instance_name="dnsmasq"
+	fi
+	config_get_bool dbus "$cfg" "dbus" 0
+	[ $dbus -gt 0 ] && xappend "--enable-dbus=uk.org.thekelleys.$instance_name"
+	config_get_bool ubus "$cfg" "ubus" 1
+	[ $ubus -gt 0 ] && xappend "--enable-ubus=$instance_name"
+
 	append_bool "$cfg" expandhosts "--expand-hosts"
 	config_get tftp_root "$cfg" "tftp_root"
 	[ -n "$tftp_root" ] && mkdir -p "$tftp_root" && append_bool "$cfg" enable_tftp "--enable-tftp"
@@ -1155,6 +1163,7 @@ boot()
 start_service() {
 	local instance="$1"
 	local instance_found=0
+	local first_instance=""
 
 	. /lib/functions/network.sh
 
@@ -1165,10 +1174,27 @@ start_service() {
 			if [ -n "$instance" ] && [ "$instance" = "$name" ]; then
 				instance_found=1
 			fi
+			if [ -z "$DEFAULT_INSTANCE" ]; then
+				local disabled
+				config_get_bool disabled "$name" disabled 0
+				if [ "$disabled" -eq 0 ]; then
+					# First enabled section will be assigned default instance name.
+					# Unnamed sections get precedence over named sections.
+					if expr "$cfg" : 'cfg[0-9a-f]*$' >/dev/null = "9"; then # See uci_fixup_section.
+						DEFAULT_INSTANCE="$name" # Unnamed config section.
+					elif [ -z "$first_instance" ]; then
+						first_instance="$name"
+					fi
+				fi
+			fi
 		fi
 	}
 
+	DEFAULT_INSTANCE=""
 	config_load dhcp
+	if [ -z "$DEFAULT_INSTANCE" ]; then
+		DEFAULT_INSTANCE="$first_instance" # No unnamed config section was found.
+	fi
 
 	if [ -n "$instance" ]; then
 		[ "$instance_found" -gt 0 ] || return


From lede-commits at lists.infradead.org  Mon Jul 19 13:57:54 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 16:57:54 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.4 to 5.4.132
In-Reply-To: <162672827400.20618.11021713862212816918@git-01.infra.openwrt.org>
References: <162672827400.20618.11021713862212816918@git-01.infra.openwrt.org>
Message-ID: <mailman.8667.1626728286.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/a1d50e7b45080f60a0066e9ca88ad756480dd1f8

commit a1d50e7b45080f60a0066e9ca88ad756480dd1f8
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Jul 18 23:51:48 2021 +0200

    kernel: bump 5.4 to 5.4.132
    
    Manually rebased
      layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch
    
    All others updated automatically.
    
    Compile-tested on: ramips/mt7621
    Runtime-tested on: ramips/mt7621
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-version.mk                          |  4 +-
 .../patches-5.4/140-redboot_boardconfig.patch      |  8 +-
 .../patches-5.4/141-redboot_partition_scan.patch   |  6 +-
 .../142-redboot_various_erase_size_fix.patch       | 10 +--
 ...03-leds-add-reset-controller-based-driver.patch |  2 +-
 .../408-mtd-redboot_partition_scan.patch           |  6 +-
 .../patches-5.4/910-unaligned_access_hacks.patch   |  2 +-
 .../ath79/patches-5.4/920-mikrotik-rb4xx.patch     |  2 +-
 ...950-0043-MMC-added-alternative-MMC-driver.patch |  6 +-
 ...743-fix-connected-active-CSI-2-lane-repor.patch |  2 +-
 ...58743-Add-support-for-972Mbit-s-link-freq.patch |  2 +-
 ...tc358743-Check-I2C-succeeded-during-probe.patch |  4 +-
 ...Use-more-event-ring-segment-table-entries.patch |  4 +-
 ...0297-arch-arm-Add-model-string-to-cpuinfo.patch |  4 +-
 ...ing-treat-dev-bus_dma_mask-as-a-DMA-limit.patch |  2 +-
 ...orce-CS_HIGH-if-GPIO-descriptors-are-used.patch |  4 +-
 ...-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch |  2 +-
 ...edia-i2c-tc358743-Fix-fallthrough-warning.patch |  2 +-
 ...ng-fbtft-Add-support-for-display-variants.patch |  6 +-
 .../patches-5.4/400-bcm963xx_flashmap.patch        |  6 +-
 .../linux/generic/hack-5.4/204-module_strip.patch  |  6 +-
 .../generic/hack-5.4/221-module_exports.patch      |  2 +-
 .../hack-5.4/661-use_fq_codel_by_default.patch     |  2 +-
 .../pending-5.4/203-kallsyms_uncompressed.patch    |  2 +-
 .../pending-5.4/205-backtrace_module_info.patch    |  4 +-
 ...edboot-add-of_match_table-with-DT-binding.patch |  2 +-
 .../pending-5.4/420-mtd-redboot_space.patch        |  2 +-
 .../pending-5.4/630-packet_socket_type.patch       |  4 +-
 .../generic/pending-5.4/920-mangle_bootargs.patch  |  2 +-
 ...ved_mem-Ensure-cma-reserved-region-not-cr.patch |  6 +-
 ...p-prepare-common-code-for-cdns-and-rk-dpi.patch | 88 +++++++++++-----------
 ...3-drm-bridge-add-Cadence-MHDP-HDMI-DP-API.patch | 30 ++++----
 ...-0009-drm-rockchip-Fix-build-failed-issue.patch |  2 +-
 ...p-change-base-address-name-from-regs-to-r.patch |  2 +-
 ...cdns-dp-Remove-link-rate-lanes-set-by-dev.patch |  8 +-
 ...-spi-fspi-enable-fspi-on-imx8qxp-and-imx8.patch |  2 +-
 ...0-2-spi-fspi-dynamically-alloc-AHB-memory.patch |  4 +-
 ...dwc3-Add-cache-type-configuration-support.patch |  2 +-
 ...vert-usb-dwc3-Add-cache-type-configuratio.patch |  2 +-
 ...b-dwc3-Add-cache-type-configuration-suppo.patch |  2 +-
 .../patches-5.4/0900-bt-mtk-serial-fix.patch       |  2 +-
 .../patches-5.4/1021-ubnt-ledbar-driver.patch      |  2 +-
 42 files changed, 131 insertions(+), 131 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 8835604d6d..782e07e0da 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .128
+LINUX_VERSION-5.4 = .132
 
-LINUX_KERNEL_HASH-5.4.128 = 3b54aebb816b9e628cb9ba3055a6aca58ce0ddeec49366c0da86ced9a7be39ab
+LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/ath25/patches-5.4/140-redboot_boardconfig.patch b/target/linux/ath25/patches-5.4/140-redboot_boardconfig.patch
index 0ffa12eec0..81b23e863e 100644
--- a/target/linux/ath25/patches-5.4/140-redboot_boardconfig.patch
+++ b/target/linux/ath25/patches-5.4/140-redboot_boardconfig.patch
@@ -9,7 +9,7 @@
  struct fis_image_desc {
      unsigned char name[16];      // Null terminated name
      uint32_t	  flash_base;    // Address within FLASH of image
-@@ -67,6 +69,7 @@ static int parse_redboot_partitions(stru
+@@ -72,6 +74,7 @@ static int parse_redboot_partitions(stru
  				    const struct mtd_partition **pparts,
  				    struct mtd_part_parser_data *data)
  {
@@ -17,7 +17,7 @@
  	int nrparts = 0;
  	struct fis_image_desc *buf;
  	struct mtd_partition *parts;
-@@ -234,14 +237,15 @@ static int parse_redboot_partitions(stru
+@@ -239,14 +242,15 @@ static int parse_redboot_partitions(stru
  		}
  	}
  #endif
@@ -35,7 +35,7 @@
  #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
  	if (nulllen > 0) {
  		strcpy(nullname, nullstring);
-@@ -260,6 +264,8 @@ static int parse_redboot_partitions(stru
+@@ -265,6 +269,8 @@ static int parse_redboot_partitions(stru
  	}
  #endif
  	for ( ; i<nrparts; i++) {
@@ -44,7 +44,7 @@
  		parts[i].size = fl->img->size;
  		parts[i].offset = fl->img->flash_base;
  		parts[i].name = names;
-@@ -293,6 +299,13 @@ static int parse_redboot_partitions(stru
+@@ -298,6 +304,13 @@ static int parse_redboot_partitions(stru
  		fl = fl->next;
  		kfree(tmp_fl);
  	}
diff --git a/target/linux/ath25/patches-5.4/141-redboot_partition_scan.patch b/target/linux/ath25/patches-5.4/141-redboot_partition_scan.patch
index 3302d6d247..343eedc075 100644
--- a/target/linux/ath25/patches-5.4/141-redboot_partition_scan.patch
+++ b/target/linux/ath25/patches-5.4/141-redboot_partition_scan.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -88,12 +88,18 @@ static int parse_redboot_partitions(stru
+@@ -93,12 +93,18 @@ static int parse_redboot_partitions(stru
  
  	parse_redboot_of(master);
  
@@ -19,7 +19,7 @@
  				return -EIO;
  			}
  			offset -= master->erasesize;
-@@ -106,10 +112,6 @@ static int parse_redboot_partitions(stru
+@@ -111,10 +117,6 @@ static int parse_redboot_partitions(stru
  				goto nogood;
  		}
  	}
@@ -30,7 +30,7 @@
  
  	printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
  	       master->name, offset);
-@@ -182,6 +184,11 @@ static int parse_redboot_partitions(stru
+@@ -187,6 +189,11 @@ static int parse_redboot_partitions(stru
  	}
  	if (i == numslots) {
  		/* Didn't find it */
diff --git a/target/linux/ath25/patches-5.4/142-redboot_various_erase_size_fix.patch b/target/linux/ath25/patches-5.4/142-redboot_various_erase_size_fix.patch
index 2ac0eb92bf..55cf84eeff 100644
--- a/target/linux/ath25/patches-5.4/142-redboot_various_erase_size_fix.patch
+++ b/target/linux/ath25/patches-5.4/142-redboot_various_erase_size_fix.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -65,6 +65,22 @@ static void parse_redboot_of(struct mtd_
+@@ -70,6 +70,22 @@ static void parse_redboot_of(struct mtd_
  	directory = dirblock;
  }
  
@@ -23,7 +23,7 @@
  static int parse_redboot_partitions(struct mtd_info *master,
  				    const struct mtd_partition **pparts,
  				    struct mtd_part_parser_data *data)
-@@ -81,6 +97,7 @@ static int parse_redboot_partitions(stru
+@@ -86,6 +102,7 @@ static int parse_redboot_partitions(stru
  	int namelen = 0;
  	int nulllen = 0;
  	int numslots;
@@ -31,7 +31,7 @@
  	unsigned long offset;
  #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
  	static char nullstring[] = "unallocated";
-@@ -195,7 +212,10 @@ static int parse_redboot_partitions(stru
+@@ -200,7 +217,10 @@ static int parse_redboot_partitions(stru
  		goto out;
  	}
  
@@ -43,7 +43,7 @@
  		struct fis_list *new_fl, **prev;
  
  		if (buf[i].name[0] == 0xff) {
-@@ -271,12 +291,13 @@ static int parse_redboot_partitions(stru
+@@ -276,12 +296,13 @@ static int parse_redboot_partitions(stru
  	}
  #endif
  	for ( ; i<nrparts; i++) {
@@ -59,7 +59,7 @@
  		strcpy(names, fl->img->name);
  #ifdef CONFIG_MTD_REDBOOT_PARTS_READONLY
  		if (!memcmp(names, "RedBoot", 8) ||
-@@ -306,7 +327,9 @@ static int parse_redboot_partitions(stru
+@@ -311,7 +332,9 @@ static int parse_redboot_partitions(stru
  		fl = fl->next;
  		kfree(tmp_fl);
  	}
diff --git a/target/linux/ath79/patches-5.4/0003-leds-add-reset-controller-based-driver.patch b/target/linux/ath79/patches-5.4/0003-leds-add-reset-controller-based-driver.patch
index 3249e1e82b..32a122fabe 100644
--- a/target/linux/ath79/patches-5.4/0003-leds-add-reset-controller-based-driver.patch
+++ b/target/linux/ath79/patches-5.4/0003-leds-add-reset-controller-based-driver.patch
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/drivers/leds/Kconfig
 +++ b/drivers/leds/Kconfig
-@@ -823,6 +823,17 @@ config LEDS_LM36274
+@@ -824,6 +824,17 @@ config LEDS_LM36274
  	  Say Y to enable the LM36274 LED driver for TI LMU devices.
  	  This supports the LED device LM36274.
  
diff --git a/target/linux/ath79/patches-5.4/408-mtd-redboot_partition_scan.patch b/target/linux/ath79/patches-5.4/408-mtd-redboot_partition_scan.patch
index 8f3ee32f57..e5b06e14a5 100644
--- a/target/linux/ath79/patches-5.4/408-mtd-redboot_partition_scan.patch
+++ b/target/linux/ath79/patches-5.4/408-mtd-redboot_partition_scan.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -85,12 +85,18 @@ static int parse_redboot_partitions(stru
+@@ -90,12 +90,18 @@ static int parse_redboot_partitions(stru
  
  	parse_redboot_of(master);
  
@@ -19,7 +19,7 @@
  				return -EIO;
  			}
  			offset -= master->erasesize;
-@@ -103,10 +109,6 @@ static int parse_redboot_partitions(stru
+@@ -108,10 +114,6 @@ static int parse_redboot_partitions(stru
  				goto nogood;
  		}
  	}
@@ -30,7 +30,7 @@
  
  	printk(KERN_NOTICE "Searching for RedBoot partition table in %s at offset 0x%lx\n",
  	       master->name, offset);
-@@ -179,6 +181,11 @@ static int parse_redboot_partitions(stru
+@@ -184,6 +186,11 @@ static int parse_redboot_partitions(stru
  	}
  	if (i == numslots) {
  		/* Didn't find it */
diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
index 2440fbbb73..99520863d3 100644
--- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
@@ -267,7 +267,7 @@
  		case IPV6_2292HOPOPTS:
 --- a/net/ipv6/exthdrs.c
 +++ b/net/ipv6/exthdrs.c
-@@ -752,7 +752,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
+@@ -751,7 +751,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
  		goto drop;
  	}
  
diff --git a/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch b/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch
index 5540b8ae3a..60f8bdff79 100644
--- a/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch
+++ b/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch
@@ -23,7 +23,7 @@
 +obj-$(CONFIG_MFD_RB4XX_CPLD)	+= rb4xx-cpld.o
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1406,6 +1406,12 @@ config GPIO_SODAVILLE
+@@ -1408,6 +1408,12 @@ config GPIO_SODAVILLE
  	help
  	  Say Y here to support Intel Sodaville GPIO.
  
diff --git a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
index a9f99add60..f70887855b 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
@@ -222,7 +222,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);
  
-@@ -2884,6 +2891,7 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2892,6 +2899,7 @@ static int mmc_blk_probe(struct mmc_card
  {
  	struct mmc_blk_data *md, *part_md;
  	char cap_str[10];
@@ -230,7 +230,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros at gmail.com>
  
  	/*
  	 * Check that the card supports the command class(es) we need.
-@@ -2891,7 +2899,16 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2899,7 +2907,16 @@ static int mmc_blk_probe(struct mmc_card
  	if (!(card->csd.cmdclass & CCC_BLOCK_READ))
  		return -ENODEV;
  
@@ -248,7 +248,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros at gmail.com>
  
  	card->complete_wq = alloc_workqueue("mmc_complete",
  					WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
-@@ -2906,9 +2923,14 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2914,9 +2931,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.4/950-0153-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch b/target/linux/bcm27xx/patches-5.4/950-0153-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch
index 2357c878d7..ef2193f4de 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0153-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0153-media-tc358743-fix-connected-active-CSI-2-lane-repor.patch
@@ -47,7 +47,7 @@ Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
  
  	switch (state->csi_lanes_in_use) {
  	case 1:
-@@ -2054,6 +2063,7 @@ static int tc358743_probe(struct i2c_cli
+@@ -2055,6 +2064,7 @@ static int tc358743_probe(struct i2c_cli
  	if (pdata) {
  		state->pdata = *pdata;
  		state->bus.flags = V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
diff --git a/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch b/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch
index 18ee169b1c..7166232c40 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0154-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch
@@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	 */
  	bps_pr_lane = 2 * endpoint.link_frequencies[0];
  	if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) {
-@@ -1990,23 +1991,41 @@ static int tc358743_probe_of(struct tc35
+@@ -1991,23 +1992,41 @@ static int tc358743_probe_of(struct tc35
  			       state->pdata.refclk_hz * state->pdata.pll_prd;
  
  	/*
diff --git a/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Check-I2C-succeeded-during-probe.patch b/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Check-I2C-succeeded-during-probe.patch
index 653602b306..1a26997c36 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Check-I2C-succeeded-during-probe.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0155-media-tc358743-Check-I2C-succeeded-during-probe.patch
@@ -78,7 +78,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val)
  {
  	i2c_wrreg(sd, reg, val, 2);
-@@ -2064,6 +2081,7 @@ static int tc358743_probe(struct i2c_cli
+@@ -2065,6 +2082,7 @@ static int tc358743_probe(struct i2c_cli
  	struct tc358743_platform_data *pdata = client->dev.platform_data;
  	struct v4l2_subdev *sd;
  	u16 irq_mask = MASK_HDMI_MSK | MASK_CSI_MSK;
@@ -86,7 +86,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	int err;
  
  	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-@@ -2096,7 +2114,8 @@ static int tc358743_probe(struct i2c_cli
+@@ -2097,7 +2115,8 @@ static int tc358743_probe(struct i2c_cli
  	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
  
  	/* i2c access */
diff --git a/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch
index 20bab47514..25c23a8257 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0293-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
-@@ -2512,9 +2512,11 @@ int xhci_mem_init(struct xhci_hcd *xhci,
+@@ -2513,9 +2513,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)
-@@ -2527,7 +2529,7 @@ int xhci_mem_init(struct xhci_hcd *xhci,
+@@ -2528,7 +2530,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;
diff --git a/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch b/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch
index 4e9598a54e..e3cf7bb9e1 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0297-arch-arm-Add-model-string-to-cpuinfo.patch
@@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
 
 --- a/arch/arm/kernel/setup.c
 +++ b/arch/arm/kernel/setup.c
-@@ -1249,6 +1249,8 @@ static int c_show(struct seq_file *m, vo
+@@ -1251,6 +1251,8 @@ static int c_show(struct seq_file *m, vo
  {
  	int i, j;
  	u32 cpuid;
@@ -19,7 +19,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
  
  	for_each_online_cpu(i) {
  		/*
-@@ -1308,6 +1310,14 @@ static int c_show(struct seq_file *m, vo
+@@ -1310,6 +1312,14 @@ static int c_show(struct seq_file *m, vo
  	seq_printf(m, "Revision\t: %04x\n", system_rev);
  	seq_printf(m, "Serial\t\t: %s\n", system_serial);
  
diff --git a/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch b/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch
index d968e93153..344e1ee37e 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0445-dma-mapping-treat-dev-bus_dma_mask-as-a-DMA-limit.patch
@@ -198,7 +198,7 @@ Signed-off-by: Christoph Hellwig <hch at lst.de>
  		return 0;
 --- a/drivers/iommu/dma-iommu.c
 +++ b/drivers/iommu/dma-iommu.c
-@@ -404,8 +404,7 @@ static dma_addr_t iommu_dma_alloc_iova(s
+@@ -406,8 +406,7 @@ static dma_addr_t iommu_dma_alloc_iova(s
  	if (iova_len < (1 << (IOVA_RANGE_CACHE_MAX_SIZE - 1)))
  		iova_len = roundup_pow_of_two(iova_len);
  
diff --git a/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch b/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch
index 05fa9f8f2e..8e85d6e29f 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0646-spi-Force-CS_HIGH-if-GPIO-descriptors-are-used.patch
@@ -23,7 +23,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/spi/spi.c
 +++ b/drivers/spi/spi.c
-@@ -3116,6 +3116,7 @@ static int __spi_validate_bits_per_word(
+@@ -3117,6 +3117,7 @@ static int __spi_validate_bits_per_word(
   */
  int spi_setup(struct spi_device *spi)
  {
@@ -31,7 +31,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	unsigned	bad_bits, ugly_bits;
  	int		status;
  
-@@ -3133,6 +3134,14 @@ int spi_setup(struct spi_device *spi)
+@@ -3134,6 +3135,14 @@ int spi_setup(struct spi_device *spi)
  		(SPI_TX_DUAL | SPI_TX_QUAD | SPI_TX_OCTAL |
  		 SPI_RX_DUAL | SPI_RX_QUAD | SPI_RX_OCTAL)))
  		return -EINVAL;
diff --git a/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch b/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch
index b821afb08b..641d768890 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0690-SQUASH-spi-Demote-SPI_CS_HIGH-warning-to-KERN_DEBUG.patch
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/spi/spi.c
 +++ b/drivers/spi/spi.c
-@@ -3128,8 +3128,8 @@ int spi_setup(struct spi_device *spi)
+@@ -3129,8 +3129,8 @@ int spi_setup(struct spi_device *spi)
  
  	if (ctlr->use_gpio_descriptors && ctlr->cs_gpiods &&
  	    ctlr->cs_gpiods[spi->chip_select] && !(spi->mode & SPI_CS_HIGH)) {
diff --git a/target/linux/bcm27xx/patches-5.4/950-0698-media-i2c-tc358743-Fix-fallthrough-warning.patch b/target/linux/bcm27xx/patches-5.4/950-0698-media-i2c-tc358743-Fix-fallthrough-warning.patch
index 26c1f95bf2..1a892b7d3c 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0698-media-i2c-tc358743-Fix-fallthrough-warning.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0698-media-i2c-tc358743-Fix-fallthrough-warning.patch
@@ -10,7 +10,7 @@ Signed-off-by: Jacko Dirks <jdirks.linuxdev at gmail.com>
 
 --- a/drivers/media/i2c/tc358743.c
 +++ b/drivers/media/i2c/tc358743.c
-@@ -2004,6 +2004,7 @@ static int tc358743_probe_of(struct tc35
+@@ -2005,6 +2005,7 @@ static int tc358743_probe_of(struct tc35
  	switch (bps_pr_lane) {
  	default:
  		dev_warn(dev, "untested bps per lane: %u bps\n", bps_pr_lane);
diff --git a/target/linux/bcm27xx/patches-5.4/950-0960-staging-fbtft-Add-support-for-display-variants.patch b/target/linux/bcm27xx/patches-5.4/950-0960-staging-fbtft-Add-support-for-display-variants.patch
index 185e8eb493..7206bad51d 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0960-staging-fbtft-Add-support-for-display-variants.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0960-staging-fbtft-Add-support-for-display-variants.patch
@@ -94,7 +94,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  #include <video/mipi_display.h>
  
  #include "fbtft.h"
-@@ -1200,6 +1201,7 @@ static struct fbtft_platform_data *fbtft
+@@ -1199,6 +1200,7 @@ static struct fbtft_platform_data *fbtft
   * @display: Display properties
   * @sdev: SPI device
   * @pdev: Platform device
@@ -102,7 +102,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
   *
   * Allocates, initializes and registers a framebuffer
   *
-@@ -1209,12 +1211,15 @@ static struct fbtft_platform_data *fbtft
+@@ -1208,12 +1210,15 @@ static struct fbtft_platform_data *fbtft
   */
  int fbtft_probe_common(struct fbtft_display *display,
  		       struct spi_device *sdev,
@@ -119,7 +119,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	int ret;
  
  	if (sdev)
-@@ -1230,6 +1235,14 @@ int fbtft_probe_common(struct fbtft_disp
+@@ -1229,6 +1234,14 @@ int fbtft_probe_common(struct fbtft_disp
  		pdata = fbtft_probe_dt(dev);
  		if (IS_ERR(pdata))
  			return PTR_ERR(pdata);
diff --git a/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch b/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch
index f57950b44a..5a9532c321 100644
--- a/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch
+++ b/target/linux/bcm63xx/patches-5.4/400-bcm963xx_flashmap.patch
@@ -23,7 +23,7 @@ Signed-off-by: Axel Gembe <ago at bastart.eu.org>
  	.width			= 2,
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -79,6 +79,7 @@ static int parse_redboot_partitions(stru
+@@ -84,6 +84,7 @@ static int parse_redboot_partitions(stru
  	int nulllen = 0;
  	int numslots;
  	unsigned long offset;
@@ -31,7 +31,7 @@ Signed-off-by: Axel Gembe <ago at bastart.eu.org>
  #ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
  	static char nullstring[] = "unallocated";
  #endif
-@@ -185,6 +186,16 @@ static int parse_redboot_partitions(stru
+@@ -190,6 +191,16 @@ static int parse_redboot_partitions(stru
  		goto out;
  	}
  
@@ -48,7 +48,7 @@ Signed-off-by: Axel Gembe <ago at bastart.eu.org>
  	for (i = 0; i < numslots; i++) {
  		struct fis_list *new_fl, **prev;
  
-@@ -205,10 +216,10 @@ static int parse_redboot_partitions(stru
+@@ -210,10 +221,10 @@ static int parse_redboot_partitions(stru
  			goto out;
  		}
  		new_fl->img = &buf[i];
diff --git a/target/linux/generic/hack-5.4/204-module_strip.patch b/target/linux/generic/hack-5.4/204-module_strip.patch
index 22bb1ac33a..c6420739c0 100644
--- a/target/linux/generic/hack-5.4/204-module_strip.patch
+++ b/target/linux/generic/hack-5.4/204-module_strip.patch
@@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -2195,6 +2195,13 @@ config TRIM_UNUSED_KSYMS
+@@ -2198,6 +2198,13 @@ config TRIM_UNUSED_KSYMS
  
  	  If unsure, or if you need to build out-of-tree modules, say N.
  
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  config MODULES_TREE_LOOKUP
 --- a/kernel/module.c
 +++ b/kernel/module.c
-@@ -3252,9 +3252,11 @@ static int setup_load_info(struct load_i
+@@ -3256,9 +3256,11 @@ static int setup_load_info(struct load_i
  
  static int check_modinfo(struct module *mod, struct load_info *info, int flags)
  {
@@ -125,7 +125,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (flags & MODULE_INIT_IGNORE_VERMAGIC)
  		modmagic = NULL;
  
-@@ -3275,6 +3277,7 @@ static int check_modinfo(struct module *
+@@ -3279,6 +3281,7 @@ static int check_modinfo(struct module *
  				mod->name);
  		add_taint_module(mod, TAINT_OOT_MODULE, LOCKDEP_STILL_OK);
  	}
diff --git a/target/linux/generic/hack-5.4/221-module_exports.patch b/target/linux/generic/hack-5.4/221-module_exports.patch
index ef6e980892..0f7840b8d8 100644
--- a/target/linux/generic/hack-5.4/221-module_exports.patch
+++ b/target/linux/generic/hack-5.4/221-module_exports.patch
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/scripts/Makefile.build
 +++ b/scripts/Makefile.build
-@@ -349,7 +349,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
+@@ -350,7 +350,7 @@ targets += $(extra-y) $(MAKECMDGOALS) $(
  # Linker scripts preprocessor (.lds.S -> .lds)
  # ---------------------------------------------------------------------------
  quiet_cmd_cpp_lds_S = LDS     $@
diff --git a/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch b/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch
index 6d0a54c01d..cdeac45f86 100644
--- a/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch
+++ b/target/linux/generic/hack-5.4/661-use_fq_codel_by_default.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/net/sch_generic.h
 +++ b/include/net/sch_generic.h
-@@ -603,12 +603,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
+@@ -615,12 +615,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
  extern struct Qdisc_ops pfifo_fast_ops;
  extern struct Qdisc_ops mq_qdisc_ops;
  extern struct Qdisc_ops noqueue_qdisc_ops;
diff --git a/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch b/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch
index c4c13b9695..68a2d4d88f 100644
--- a/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch
+++ b/target/linux/generic/pending-5.4/203-kallsyms_uncompressed.patch
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -1277,6 +1277,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
+@@ -1280,6 +1280,17 @@ config SYSCTL_ARCH_UNALIGN_ALLOW
  	  the unaligned access emulation.
  	  see arch/parisc/kernel/unaligned.c for reference
  
diff --git a/target/linux/generic/pending-5.4/205-backtrace_module_info.patch b/target/linux/generic/pending-5.4/205-backtrace_module_info.patch
index 39a4365113..6048c25957 100644
--- a/target/linux/generic/pending-5.4/205-backtrace_module_info.patch
+++ b/target/linux/generic/pending-5.4/205-backtrace_module_info.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/lib/vsprintf.c
 +++ b/lib/vsprintf.c
-@@ -914,8 +914,10 @@ char *symbol_string(char *buf, char *end
+@@ -940,8 +940,10 @@ char *symbol_string(char *buf, char *end
  		    struct printf_spec spec, const char *fmt)
  {
  	unsigned long value;
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #endif
  
  	if (fmt[1] == 'R')
-@@ -932,8 +934,14 @@ char *symbol_string(char *buf, char *end
+@@ -958,8 +960,14 @@ char *symbol_string(char *buf, char *end
  
  	return string_nocheck(buf, end, sym, spec);
  #else
diff --git a/target/linux/generic/pending-5.4/419-mtd-redboot-add-of_match_table-with-DT-binding.patch b/target/linux/generic/pending-5.4/419-mtd-redboot-add-of_match_table-with-DT-binding.patch
index 8358a307cd..7692f484ae 100644
--- a/target/linux/generic/pending-5.4/419-mtd-redboot-add-of_match_table-with-DT-binding.patch
+++ b/target/linux/generic/pending-5.4/419-mtd-redboot-add-of_match_table-with-DT-binding.patch
@@ -12,7 +12,7 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
 
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -300,6 +300,7 @@ static int parse_redboot_partitions(stru
+@@ -305,6 +305,7 @@ static int parse_redboot_partitions(stru
  
  static const struct of_device_id mtd_parser_redboot_of_match_table[] = {
  	{ .compatible = "redboot-fis" },
diff --git a/target/linux/generic/pending-5.4/420-mtd-redboot_space.patch b/target/linux/generic/pending-5.4/420-mtd-redboot_space.patch
index a2cf838989..a3cd4ecf1f 100644
--- a/target/linux/generic/pending-5.4/420-mtd-redboot_space.patch
+++ b/target/linux/generic/pending-5.4/420-mtd-redboot_space.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/mtd/parsers/redboot.c
 +++ b/drivers/mtd/parsers/redboot.c
-@@ -274,14 +274,21 @@ static int parse_redboot_partitions(stru
+@@ -279,14 +279,21 @@ static int parse_redboot_partitions(stru
  #endif
  		names += strlen(names)+1;
  
diff --git a/target/linux/generic/pending-5.4/630-packet_socket_type.patch b/target/linux/generic/pending-5.4/630-packet_socket_type.patch
index a137fb5a6d..d9bfda1303 100644
--- a/target/linux/generic/pending-5.4/630-packet_socket_type.patch
+++ b/target/linux/generic/pending-5.4/630-packet_socket_type.patch
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3922,6 +3925,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3924,6 +3927,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3978,6 +3991,13 @@ static int packet_getsockopt(struct sock
+@@ -3980,6 +3993,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;
diff --git a/target/linux/generic/pending-5.4/920-mangle_bootargs.patch b/target/linux/generic/pending-5.4/920-mangle_bootargs.patch
index 7523b396ba..83db92609b 100644
--- a/target/linux/generic/pending-5.4/920-mangle_bootargs.patch
+++ b/target/linux/generic/pending-5.4/920-mangle_bootargs.patch
@@ -13,7 +13,7 @@ Signed-off-by: Imre Kaloz <kaloz at openwrt.org>
 
 --- a/init/Kconfig
 +++ b/init/Kconfig
-@@ -1662,6 +1662,15 @@ config EMBEDDED
+@@ -1665,6 +1665,15 @@ config EMBEDDED
  	  an embedded system so certain expert options are available
  	  for configuration.
  
diff --git a/target/linux/layerscape/patches-5.4/303-core-0007-of-of_reserved_mem-Ensure-cma-reserved-region-not-cr.patch b/target/linux/layerscape/patches-5.4/303-core-0007-of-of_reserved_mem-Ensure-cma-reserved-region-not-cr.patch
index 7c385ea525..d95d1f0d53 100644
--- a/target/linux/layerscape/patches-5.4/303-core-0007-of-of_reserved_mem-Ensure-cma-reserved-region-not-cr.patch
+++ b/target/linux/layerscape/patches-5.4/303-core-0007-of-of_reserved_mem-Ensure-cma-reserved-region-not-cr.patch
@@ -70,7 +70,7 @@ Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel at mentor.com>
 +			ret = early_init_dt_alloc_reserved_memory_arch(node,
 +					size, align, start, end, nomap, &base);
  			if (ret == 0) {
- 				pr_debug("allocated memory for '%s' node: base %pa, size %ld MiB\n",
+ 				pr_debug("allocated memory for '%s' node: base %pa, size %lu MiB\n",
  					uname, &base,
 @@ -143,8 +162,8 @@ static int __init __reserved_mem_alloc_s
  		}
@@ -81,5 +81,5 @@ Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel at mentor.com>
 +		ret = early_init_dt_alloc_reserved_memory_arch(node,
 +					size, align, 0, 0, nomap, &base);
  		if (ret == 0)
- 			pr_debug("allocated memory for '%s' node: base %pa, size %ld MiB\n",
- 				uname, &base, (unsigned long)size / SZ_1M);
+ 			pr_debug("allocated memory for '%s' node: base %pa, size %lu MiB\n",
+ 				uname, &base, (unsigned long)(size / SZ_1M));
diff --git a/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch b/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch
index aff53595b0..8ce4380664 100644
--- a/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch
+++ b/target/linux/layerscape/patches-5.4/805-display-0002-drm-rockchip-prepare-common-code-for-cdns-and-rk-dpi.patch
@@ -56,10 +56,10 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (ret) {
 -		DRM_DEV_ERROR(dp->dev, "Could not write to GRF: %d\n", ret);
 +		DRM_DEV_ERROR(dev, "Could not write to GRF: %d\n", ret);
+ 		clk_disable_unprepare(dp->grf_clk);
  		return ret;
  	}
- 
-@@ -82,24 +82,25 @@ static int cdn_dp_grf_write(struct cdn_d
+@@ -83,24 +83,25 @@ static int cdn_dp_grf_write(struct cdn_d
  
  static int cdn_dp_clk_enable(struct cdn_dp_device *dp)
  {
@@ -89,7 +89,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		goto err_pm_runtime_get;
  	}
  
-@@ -112,18 +113,18 @@ static int cdn_dp_clk_enable(struct cdn_
+@@ -113,18 +114,18 @@ static int cdn_dp_clk_enable(struct cdn_
  
  	rate = clk_get_rate(dp->core_clk);
  	if (!rate) {
@@ -112,7 +112,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  err_pm_runtime_get:
  	clk_disable_unprepare(dp->core_clk);
  err_core_clk:
-@@ -134,7 +135,7 @@ err_pclk:
+@@ -135,7 +136,7 @@ err_pclk:
  
  static void cdn_dp_clk_disable(struct cdn_dp_device *dp)
  {
@@ -121,7 +121,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	clk_disable_unprepare(dp->pclk);
  	clk_disable_unprepare(dp->core_clk);
  }
-@@ -167,7 +168,7 @@ static int cdn_dp_get_sink_count(struct
+@@ -168,7 +169,7 @@ static int cdn_dp_get_sink_count(struct
  	u8 value;
  
  	*sink_count = 0;
@@ -130,7 +130,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (ret)
  		return ret;
  
-@@ -191,12 +192,13 @@ static struct cdn_dp_port *cdn_dp_connec
+@@ -192,12 +193,13 @@ static struct cdn_dp_port *cdn_dp_connec
  
  static bool cdn_dp_check_sink_connection(struct cdn_dp_device *dp)
  {
@@ -145,7 +145,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		return false;
  	}
  
-@@ -218,7 +220,7 @@ static bool cdn_dp_check_sink_connection
+@@ -219,7 +221,7 @@ static bool cdn_dp_check_sink_connection
  		usleep_range(5000, 10000);
  	}
  
@@ -154,7 +154,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	return false;
  }
  
-@@ -260,7 +262,8 @@ static int cdn_dp_connector_get_modes(st
+@@ -261,7 +263,8 @@ static int cdn_dp_connector_get_modes(st
  	mutex_lock(&dp->lock);
  	edid = dp->edid;
  	if (edid) {
@@ -164,7 +164,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				  edid->width_cm, edid->height_cm);
  
  		dp->sink_has_audio = drm_detect_monitor_audio(edid);
-@@ -278,7 +281,8 @@ static int cdn_dp_connector_mode_valid(s
+@@ -279,7 +282,8 @@ static int cdn_dp_connector_mode_valid(s
  				       struct drm_display_mode *mode)
  {
  	struct cdn_dp_device *dp = connector_to_dp(connector);
@@ -174,7 +174,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	u32 requested, actual, rate, sink_max, source_max = 0;
  	u8 lanes, bpc;
  
-@@ -304,7 +308,7 @@ static int cdn_dp_connector_mode_valid(s
+@@ -305,7 +309,7 @@ static int cdn_dp_connector_mode_valid(s
  	sink_max = drm_dp_max_lane_count(dp->dpcd);
  	lanes = min(source_max, sink_max);
  
@@ -183,7 +183,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	sink_max = drm_dp_max_link_rate(dp->dpcd);
  	rate = min(source_max, sink_max);
  
-@@ -314,7 +318,7 @@ static int cdn_dp_connector_mode_valid(s
+@@ -315,7 +319,7 @@ static int cdn_dp_connector_mode_valid(s
  	actual = actual * 8 / 10;
  
  	if (requested > actual) {
@@ -192,7 +192,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				  "requested=%d, actual=%d, clock=%d\n",
  				  requested, actual, mode->clock);
  		return MODE_CLOCK_HIGH;
-@@ -334,28 +338,29 @@ static int cdn_dp_firmware_init(struct c
+@@ -335,28 +339,29 @@ static int cdn_dp_firmware_init(struct c
  	const u32 *iram_data, *dram_data;
  	const struct firmware *fw = dp->fw;
  	const struct cdn_firmware_header *hdr;
@@ -228,7 +228,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  }
  
  static int cdn_dp_get_sink_capability(struct cdn_dp_device *dp)
-@@ -365,28 +370,29 @@ static int cdn_dp_get_sink_capability(st
+@@ -366,28 +371,29 @@ static int cdn_dp_get_sink_capability(st
  	if (!cdn_dp_check_sink_connection(dp))
  		return -ENODEV;
  
@@ -264,7 +264,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				      ret);
  			goto err_phy;
  		}
-@@ -396,28 +402,28 @@ static int cdn_dp_enable_phy(struct cdn_
+@@ -397,28 +403,28 @@ static int cdn_dp_enable_phy(struct cdn_
  	ret = cdn_dp_grf_write(dp, GRF_SOC_CON26,
  			       DPTX_HPD_SEL_MASK | DPTX_HPD_SEL);
  	if (ret) {
@@ -299,7 +299,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  			      ret);
  		goto err_power_on;
  	}
-@@ -427,7 +433,7 @@ static int cdn_dp_enable_phy(struct cdn_
+@@ -428,7 +434,7 @@ static int cdn_dp_enable_phy(struct cdn_
  
  err_power_on:
  	if (phy_power_off(port->phy))
@@ -308,7 +308,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	else
  		port->phy_enabled = false;
  
-@@ -445,7 +451,8 @@ static int cdn_dp_disable_phy(struct cdn
+@@ -446,7 +452,8 @@ static int cdn_dp_disable_phy(struct cdn
  	if (port->phy_enabled) {
  		ret = phy_power_off(port->phy);
  		if (ret) {
@@ -318,7 +318,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  			return ret;
  		}
  	}
-@@ -469,16 +476,16 @@ static int cdn_dp_disable(struct cdn_dp_
+@@ -470,16 +477,16 @@ static int cdn_dp_disable(struct cdn_dp_
  	ret = cdn_dp_grf_write(dp, GRF_SOC_CON26,
  			       DPTX_HPD_SEL_MASK | DPTX_HPD_DEL);
  	if (ret) {
@@ -339,7 +339,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (!dp->connected) {
  		kfree(dp->edid);
  		dp->edid = NULL;
-@@ -491,11 +498,11 @@ static int cdn_dp_enable(struct cdn_dp_d
+@@ -492,11 +499,11 @@ static int cdn_dp_enable(struct cdn_dp_d
  {
  	int ret, i, lanes;
  	struct cdn_dp_port *port;
@@ -353,7 +353,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		return -ENODEV;
  	}
  
-@@ -508,7 +515,7 @@ static int cdn_dp_enable(struct cdn_dp_d
+@@ -509,7 +516,7 @@ static int cdn_dp_enable(struct cdn_dp_d
  
  	ret = cdn_dp_firmware_init(dp);
  	if (ret) {
@@ -362,7 +362,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		goto err_clk_disable;
  	}
  
-@@ -542,8 +549,9 @@ static void cdn_dp_encoder_mode_set(stru
+@@ -543,8 +550,9 @@ static void cdn_dp_encoder_mode_set(stru
  				    struct drm_display_mode *adjusted)
  {
  	struct cdn_dp_device *dp = encoder_to_dp(encoder);
@@ -374,7 +374,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	switch (display_info->bpc) {
  	case 10:
-@@ -561,7 +569,7 @@ static void cdn_dp_encoder_mode_set(stru
+@@ -562,7 +570,7 @@ static void cdn_dp_encoder_mode_set(stru
  	video->v_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NVSYNC);
  	video->h_sync_polarity = !!(mode->flags & DRM_MODE_FLAG_NHSYNC);
  
@@ -383,7 +383,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  }
  
  static bool cdn_dp_check_link_status(struct cdn_dp_device *dp)
-@@ -570,11 +578,11 @@ static bool cdn_dp_check_link_status(str
+@@ -571,11 +579,11 @@ static bool cdn_dp_check_link_status(str
  	struct cdn_dp_port *port = cdn_dp_connected_port(dp);
  	u8 sink_lanes = drm_dp_max_lane_count(dp->dpcd);
  
@@ -398,7 +398,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		DRM_ERROR("Failed to get link status\n");
  		return false;
  	}
-@@ -586,15 +594,16 @@ static bool cdn_dp_check_link_status(str
+@@ -587,15 +595,16 @@ static bool cdn_dp_check_link_status(str
  static void cdn_dp_encoder_enable(struct drm_encoder *encoder)
  {
  	struct cdn_dp_device *dp = encoder_to_dp(encoder);
@@ -418,7 +418,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  			  (ret) ? "LIT" : "BIG");
  	if (ret)
  		val = DP_SEL_VOP_LIT | (DP_SEL_VOP_LIT << 16);
-@@ -609,33 +618,33 @@ static void cdn_dp_encoder_enable(struct
+@@ -610,33 +619,33 @@ static void cdn_dp_encoder_enable(struct
  
  	ret = cdn_dp_enable(dp);
  	if (ret) {
@@ -461,7 +461,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		goto out;
  	}
  out:
-@@ -651,7 +660,8 @@ static void cdn_dp_encoder_disable(struc
+@@ -652,7 +661,8 @@ static void cdn_dp_encoder_disable(struc
  	if (dp->active) {
  		ret = cdn_dp_disable(dp);
  		if (ret) {
@@ -471,7 +471,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				      ret);
  		}
  	}
-@@ -695,7 +705,7 @@ static const struct drm_encoder_funcs cd
+@@ -696,7 +706,7 @@ static const struct drm_encoder_funcs cd
  
  static int cdn_dp_parse_dt(struct cdn_dp_device *dp)
  {
@@ -480,7 +480,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	struct device_node *np = dev->of_node;
  	struct platform_device *pdev = to_platform_device(dev);
  	struct resource *res;
-@@ -707,10 +717,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
+@@ -708,10 +718,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
  	}
  
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
@@ -494,7 +494,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	}
  
  	dp->core_clk = devm_clk_get(dev, "core-clk");
-@@ -725,10 +735,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
+@@ -726,10 +736,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
  		return PTR_ERR(dp->pclk);
  	}
  
@@ -508,7 +508,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	}
  
  	dp->grf_clk = devm_clk_get(dev, "grf");
-@@ -737,10 +747,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
+@@ -738,10 +748,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
  		return PTR_ERR(dp->grf_clk);
  	}
  
@@ -522,7 +522,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	}
  
  	dp->dptx_rst = devm_reset_control_get(dev, "dptx");
-@@ -795,7 +805,7 @@ static int cdn_dp_audio_hw_params(struct
+@@ -796,7 +806,7 @@ static int cdn_dp_audio_hw_params(struct
  		goto out;
  	}
  
@@ -531,7 +531,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (!ret)
  		dp->audio_info = audio;
  
-@@ -813,7 +823,7 @@ static void cdn_dp_audio_shutdown(struct
+@@ -814,7 +824,7 @@ static void cdn_dp_audio_shutdown(struct
  	if (!dp->active)
  		goto out;
  
@@ -540,7 +540,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (!ret)
  		dp->audio_info.format = AFMT_UNUSED;
  out:
-@@ -832,7 +842,7 @@ static int cdn_dp_audio_digital_mute(str
+@@ -833,7 +843,7 @@ static int cdn_dp_audio_digital_mute(str
  		goto out;
  	}
  
@@ -549,7 +549,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  out:
  	mutex_unlock(&dp->lock);
-@@ -844,7 +854,8 @@ static int cdn_dp_audio_get_eld(struct d
+@@ -845,7 +855,8 @@ static int cdn_dp_audio_get_eld(struct d
  {
  	struct cdn_dp_device *dp = dev_get_drvdata(dev);
  
@@ -559,7 +559,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	return 0;
  }
-@@ -878,6 +889,7 @@ static int cdn_dp_request_firmware(struc
+@@ -879,6 +890,7 @@ static int cdn_dp_request_firmware(struc
  	int ret;
  	unsigned long timeout = jiffies + msecs_to_jiffies(CDN_FW_TIMEOUT_MS);
  	unsigned long sleep = 1000;
@@ -567,7 +567,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	WARN_ON(!mutex_is_locked(&dp->lock));
  
-@@ -888,13 +900,13 @@ static int cdn_dp_request_firmware(struc
+@@ -889,13 +901,13 @@ static int cdn_dp_request_firmware(struc
  	mutex_unlock(&dp->lock);
  
  	while (time_before(jiffies, timeout)) {
@@ -583,7 +583,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				      "failed to request firmware: %d\n", ret);
  			goto out;
  		}
-@@ -904,7 +916,7 @@ static int cdn_dp_request_firmware(struc
+@@ -905,7 +917,7 @@ static int cdn_dp_request_firmware(struc
  		goto out;
  	}
  
@@ -592,7 +592,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	ret = -ETIMEDOUT;
  out:
  	mutex_lock(&dp->lock);
-@@ -915,8 +927,9 @@ static void cdn_dp_pd_event_work(struct
+@@ -916,8 +928,9 @@ static void cdn_dp_pd_event_work(struct
  {
  	struct cdn_dp_device *dp = container_of(work, struct cdn_dp_device,
  						event_work);
@@ -603,7 +603,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	int ret;
  
-@@ -933,44 +946,45 @@ static void cdn_dp_pd_event_work(struct
+@@ -934,44 +947,45 @@ static void cdn_dp_pd_event_work(struct
  
  	/* Not connected, notify userspace to disable the block */
  	if (!cdn_dp_connected_port(dp)) {
@@ -662,7 +662,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  					      "Failed to config video %d\n",
  					      ret);
  			}
-@@ -1039,7 +1053,7 @@ static int cdn_dp_bind(struct device *de
+@@ -1040,7 +1054,7 @@ static int cdn_dp_bind(struct device *de
  
  	drm_encoder_helper_add(encoder, &cdn_dp_encoder_helper_funcs);
  
@@ -671,7 +671,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	connector->polled = DRM_CONNECTOR_POLL_HPD;
  	connector->dpms = DRM_MODE_DPMS_OFF;
  
-@@ -1063,7 +1077,7 @@ static int cdn_dp_bind(struct device *de
+@@ -1064,7 +1078,7 @@ static int cdn_dp_bind(struct device *de
  		port = dp->port[i];
  
  		port->event_nb.notifier_call = cdn_dp_pd_event;
@@ -680,7 +680,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  						    EXTCON_DISP_DP,
  						    &port->event_nb);
  		if (ret) {
-@@ -1090,7 +1104,7 @@ static void cdn_dp_unbind(struct device
+@@ -1091,7 +1105,7 @@ static void cdn_dp_unbind(struct device
  {
  	struct cdn_dp_device *dp = dev_get_drvdata(dev);
  	struct drm_encoder *encoder = &dp->encoder;
@@ -689,7 +689,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	cancel_work_sync(&dp->event_work);
  	cdn_dp_encoder_disable(encoder);
-@@ -1150,7 +1164,7 @@ static int cdn_dp_probe(struct platform_
+@@ -1151,7 +1165,7 @@ static int cdn_dp_probe(struct platform_
  	dp = devm_kzalloc(dev, sizeof(*dp), GFP_KERNEL);
  	if (!dp)
  		return -ENOMEM;
@@ -698,7 +698,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	match = of_match_node(cdn_dp_dt_ids, pdev->dev.of_node);
  	dp_data = (struct cdn_dp_data *)match->data;
-@@ -1195,7 +1209,7 @@ static int cdn_dp_remove(struct platform
+@@ -1196,7 +1210,7 @@ static int cdn_dp_remove(struct platform
  	struct cdn_dp_device *dp = platform_get_drvdata(pdev);
  
  	platform_device_unregister(dp->audio_pdev);
@@ -707,7 +707,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	component_del(&pdev->dev, &cdn_dp_component_ops);
  
  	return 0;
-@@ -1205,7 +1219,7 @@ static void cdn_dp_shutdown(struct platf
+@@ -1206,7 +1220,7 @@ static void cdn_dp_shutdown(struct platf
  {
  	struct cdn_dp_device *dp = platform_get_drvdata(pdev);
  
diff --git a/target/linux/layerscape/patches-5.4/805-display-0003-drm-bridge-add-Cadence-MHDP-HDMI-DP-API.patch b/target/linux/layerscape/patches-5.4/805-display-0003-drm-bridge-add-Cadence-MHDP-HDMI-DP-API.patch
index 19e762618a..14089a7b36 100644
--- a/target/linux/layerscape/patches-5.4/805-display-0003-drm-bridge-add-Cadence-MHDP-HDMI-DP-API.patch
+++ b/target/linux/layerscape/patches-5.4/805-display-0003-drm-bridge-add-Cadence-MHDP-HDMI-DP-API.patch
@@ -1794,7 +1794,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  #define encoder_to_dp(c) \
  		container_of(c, struct cdn_dp_device, encoder)
-@@ -282,7 +282,7 @@ static int cdn_dp_connector_mode_valid(s
+@@ -283,7 +283,7 @@ static int cdn_dp_connector_mode_valid(s
  {
  	struct cdn_dp_device *dp = connector_to_dp(connector);
  	struct drm_display_info *display_info =
@@ -1803,7 +1803,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	u32 requested, actual, rate, sink_max, source_max = 0;
  	u8 lanes, bpc;
  
-@@ -378,7 +378,7 @@ static int cdn_dp_get_sink_capability(st
+@@ -379,7 +379,7 @@ static int cdn_dp_get_sink_capability(st
  	}
  
  	kfree(dp->edid);
@@ -1812,7 +1812,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  				   cdns_mhdp_get_edid_block, &dp->mhdp);
  	return 0;
  }
-@@ -484,8 +484,8 @@ static int cdn_dp_disable(struct cdn_dp_
+@@ -485,8 +485,8 @@ static int cdn_dp_disable(struct cdn_dp_
  	cdns_mhdp_set_firmware_active(&dp->mhdp, false);
  	cdn_dp_clk_disable(dp);
  	dp->active = false;
@@ -1823,7 +1823,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (!dp->connected) {
  		kfree(dp->edid);
  		dp->edid = NULL;
-@@ -550,7 +550,7 @@ static void cdn_dp_encoder_mode_set(stru
+@@ -551,7 +551,7 @@ static void cdn_dp_encoder_mode_set(stru
  {
  	struct cdn_dp_device *dp = encoder_to_dp(encoder);
  	struct drm_display_info *display_info =
@@ -1832,7 +1832,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	struct video_info *video = &dp->mhdp.video_info;
  
  	switch (display_info->bpc) {
-@@ -578,7 +578,7 @@ static bool cdn_dp_check_link_status(str
+@@ -579,7 +579,7 @@ static bool cdn_dp_check_link_status(str
  	struct cdn_dp_port *port = cdn_dp_connected_port(dp);
  	u8 sink_lanes = drm_dp_max_lane_count(dp->dpcd);
  
@@ -1841,7 +1841,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		return false;
  
  	if (cdns_mhdp_dpcd_read(&dp->mhdp, DP_LANE0_1_STATUS, link_status,
-@@ -807,7 +807,7 @@ static int cdn_dp_audio_hw_params(struct
+@@ -808,7 +808,7 @@ static int cdn_dp_audio_hw_params(struct
  
  	ret = cdns_mhdp_audio_config(&dp->mhdp, &audio);
  	if (!ret)
@@ -1850,7 +1850,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  out:
  	mutex_unlock(&dp->lock);
-@@ -823,9 +823,9 @@ static void cdn_dp_audio_shutdown(struct
+@@ -824,9 +824,9 @@ static void cdn_dp_audio_shutdown(struct
  	if (!dp->active)
  		goto out;
  
@@ -1862,7 +1862,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  out:
  	mutex_unlock(&dp->lock);
  }
-@@ -854,8 +854,8 @@ static int cdn_dp_audio_get_eld(struct d
+@@ -855,8 +855,8 @@ static int cdn_dp_audio_get_eld(struct d
  {
  	struct cdn_dp_device *dp = dev_get_drvdata(dev);
  
@@ -1873,7 +1873,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	return 0;
  }
-@@ -877,11 +877,11 @@ static int cdn_dp_audio_codec_init(struc
+@@ -878,11 +878,11 @@ static int cdn_dp_audio_codec_init(struc
  		.max_i2s_channels = 8,
  	};
  
@@ -1889,7 +1889,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  }
  
  static int cdn_dp_request_firmware(struct cdn_dp_device *dp)
-@@ -927,7 +927,7 @@ static void cdn_dp_pd_event_work(struct
+@@ -928,7 +928,7 @@ static void cdn_dp_pd_event_work(struct
  {
  	struct cdn_dp_device *dp = container_of(work, struct cdn_dp_device,
  						event_work);
@@ -1898,7 +1898,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	enum drm_connector_status old_status;
  	struct device *dev = dp->mhdp.dev;
  
-@@ -965,8 +965,8 @@ static void cdn_dp_pd_event_work(struct
+@@ -966,8 +966,8 @@ static void cdn_dp_pd_event_work(struct
  
  	/* Enabled and connected with a sink, re-train if requested */
  	} else if (!cdn_dp_check_link_status(dp)) {
@@ -1909,7 +1909,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  		struct drm_display_mode *mode = &dp->mhdp.mode;
  
  		DRM_DEV_INFO(dev, "Connected with sink. Re-train link\n");
-@@ -979,8 +979,8 @@ static void cdn_dp_pd_event_work(struct
+@@ -980,8 +980,8 @@ static void cdn_dp_pd_event_work(struct
  
  		/* If training result is changed, update the video config */
  		if (mode->clock &&
@@ -1920,7 +1920,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  			ret = cdns_mhdp_config_video(&dp->mhdp);
  			if (ret) {
  				dp->connected = false;
-@@ -1053,7 +1053,7 @@ static int cdn_dp_bind(struct device *de
+@@ -1054,7 +1054,7 @@ static int cdn_dp_bind(struct device *de
  
  	drm_encoder_helper_add(encoder, &cdn_dp_encoder_helper_funcs);
  
@@ -1929,7 +1929,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	connector->polled = DRM_CONNECTOR_POLL_HPD;
  	connector->dpms = DRM_MODE_DPMS_OFF;
  
-@@ -1104,7 +1104,7 @@ static void cdn_dp_unbind(struct device
+@@ -1105,7 +1105,7 @@ static void cdn_dp_unbind(struct device
  {
  	struct cdn_dp_device *dp = dev_get_drvdata(dev);
  	struct drm_encoder *encoder = &dp->encoder;
@@ -1938,7 +1938,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	cancel_work_sync(&dp->event_work);
  	cdn_dp_encoder_disable(encoder);
-@@ -1208,7 +1208,7 @@ static int cdn_dp_remove(struct platform
+@@ -1209,7 +1209,7 @@ static int cdn_dp_remove(struct platform
  {
  	struct cdn_dp_device *dp = platform_get_drvdata(pdev);
  
diff --git a/target/linux/layerscape/patches-5.4/805-display-0009-drm-rockchip-Fix-build-failed-issue.patch b/target/linux/layerscape/patches-5.4/805-display-0009-drm-rockchip-Fix-build-failed-issue.patch
index 106c1f7285..6f44ce2219 100644
--- a/target/linux/layerscape/patches-5.4/805-display-0009-drm-rockchip-Fix-build-failed-issue.patch
+++ b/target/linux/layerscape/patches-5.4/805-display-0009-drm-rockchip-Fix-build-failed-issue.patch
@@ -13,7 +13,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
 
 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
 +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
-@@ -797,7 +797,7 @@ static int cdn_dp_audio_hw_params(struct
+@@ -798,7 +798,7 @@ static int cdn_dp_audio_hw_params(struct
  		audio.format = AFMT_I2S;
  		break;
  	case HDMI_SPDIF:
diff --git a/target/linux/layerscape/patches-5.4/805-display-0012-drm-rockchip-change-base-address-name-from-regs-to-r.patch b/target/linux/layerscape/patches-5.4/805-display-0012-drm-rockchip-change-base-address-name-from-regs-to-r.patch
index 2ba999050d..bb87fbcfbd 100644
--- a/target/linux/layerscape/patches-5.4/805-display-0012-drm-rockchip-change-base-address-name-from-regs-to-r.patch
+++ b/target/linux/layerscape/patches-5.4/805-display-0012-drm-rockchip-change-base-address-name-from-regs-to-r.patch
@@ -13,7 +13,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
 
 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
 +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
-@@ -717,10 +717,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
+@@ -718,10 +718,10 @@ static int cdn_dp_parse_dt(struct cdn_dp
  	}
  
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
diff --git a/target/linux/layerscape/patches-5.4/805-display-0018-drm-bridge-cdns-dp-Remove-link-rate-lanes-set-by-dev.patch b/target/linux/layerscape/patches-5.4/805-display-0018-drm-bridge-cdns-dp-Remove-link-rate-lanes-set-by-dev.patch
index 58df9b98aa..fba2ac4f02 100644
--- a/target/linux/layerscape/patches-5.4/805-display-0018-drm-bridge-cdns-dp-Remove-link-rate-lanes-set-by-dev.patch
+++ b/target/linux/layerscape/patches-5.4/805-display-0018-drm-bridge-cdns-dp-Remove-link-rate-lanes-set-by-dev.patch
@@ -142,7 +142,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	msg[4] = PTS1 | PTS2 | PTS3 | PTS4;
 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
 +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
-@@ -305,12 +305,10 @@ static int cdn_dp_connector_mode_valid(s
+@@ -306,12 +306,10 @@ static int cdn_dp_connector_mode_valid(s
  	requested = mode->clock * bpc * 3 / 1000;
  
  	source_max = dp->lanes;
@@ -157,7 +157,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  
  	actual = rate * lanes / 100;
  
-@@ -365,21 +363,25 @@ static int cdn_dp_firmware_init(struct c
+@@ -366,21 +364,25 @@ static int cdn_dp_firmware_init(struct c
  
  static int cdn_dp_get_sink_capability(struct cdn_dp_device *dp)
  {
@@ -188,7 +188,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	return 0;
  }
  
-@@ -421,7 +423,8 @@ static int cdn_dp_enable_phy(struct cdn_
+@@ -422,7 +424,8 @@ static int cdn_dp_enable_phy(struct cdn_
  	}
  
  	port->lanes = cdn_dp_get_port_lanes(port);
@@ -198,7 +198,7 @@ Signed-off-by: Sandor Yu <Sandor.yu at nxp.com>
  	if (ret) {
  		DRM_DEV_ERROR(dev, "set host capabilities failed: %d\n",
  			      ret);
-@@ -576,9 +579,9 @@ static bool cdn_dp_check_link_status(str
+@@ -577,9 +580,9 @@ static bool cdn_dp_check_link_status(str
  {
  	u8 link_status[DP_LINK_STATUS_SIZE];
  	struct cdn_dp_port *port = cdn_dp_connected_port(dp);
diff --git a/target/linux/layerscape/patches-5.4/817-spi-0003-MLK-21960-1-spi-fspi-enable-fspi-on-imx8qxp-and-imx8.patch b/target/linux/layerscape/patches-5.4/817-spi-0003-MLK-21960-1-spi-fspi-enable-fspi-on-imx8qxp-and-imx8.patch
index 07fac213ce..02562b7587 100644
--- a/target/linux/layerscape/patches-5.4/817-spi-0003-MLK-21960-1-spi-fspi-enable-fspi-on-imx8qxp-and-imx8.patch
+++ b/target/linux/layerscape/patches-5.4/817-spi-0003-MLK-21960-1-spi-fspi-enable-fspi-on-imx8qxp-and-imx8.patch
@@ -35,7 +35,7 @@ Signed-off-by: Han Xu <han.xu at nxp.com>
  struct nxp_fspi {
  	void __iomem *iobase;
  	void __iomem *ahb_addr;
-@@ -1083,6 +1099,8 @@ static int nxp_fspi_resume(struct device
+@@ -1082,6 +1098,8 @@ static int nxp_fspi_resume(struct device
  
  static const struct of_device_id nxp_fspi_dt_ids[] = {
  	{ .compatible = "nxp,lx2160a-fspi", .data = (void *)&lx2160a_data, },
diff --git a/target/linux/layerscape/patches-5.4/817-spi-0004-MLK-21960-2-spi-fspi-dynamically-alloc-AHB-memory.patch b/target/linux/layerscape/patches-5.4/817-spi-0004-MLK-21960-2-spi-fspi-dynamically-alloc-AHB-memory.patch
index a8db23cebb..534c014a2b 100644
--- a/target/linux/layerscape/patches-5.4/817-spi-0004-MLK-21960-2-spi-fspi-dynamically-alloc-AHB-memory.patch
+++ b/target/linux/layerscape/patches-5.4/817-spi-0004-MLK-21960-2-spi-fspi-dynamically-alloc-AHB-memory.patch
@@ -76,7 +76,7 @@ Signed-off-by: Han Xu <han.xu at nxp.com>
  	} else {
  		if (op->data.nbytes && op->data.dir == SPI_MEM_DATA_OUT)
  			nxp_fspi_fill_txfifo(f, op);
-@@ -999,9 +1025,8 @@ static int nxp_fspi_probe(struct platfor
+@@ -993,9 +1019,8 @@ static int nxp_fspi_probe(struct platfor
  
  	/* find the resources - controller memory mapped space */
  	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "fspi_mmap");
@@ -88,7 +88,7 @@ Signed-off-by: Han Xu <han.xu at nxp.com>
  		goto err_put_ctrl;
  	}
  
-@@ -1080,6 +1105,9 @@ static int nxp_fspi_remove(struct platfo
+@@ -1079,6 +1104,9 @@ static int nxp_fspi_remove(struct platfo
  
  	mutex_destroy(&f->lock);
  
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch b/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch
index 3357acc76d..7c9a153aec 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0011-usb-dwc3-Add-cache-type-configuration-support.patch
@@ -109,7 +109,7 @@ Reviewed-by: Jun Li <jun.li at nxp.com>
  	usb_phy_set_suspend(dwc->usb2_phy, 0);
  	usb_phy_set_suspend(dwc->usb3_phy, 0);
  	ret = phy_power_on(dwc->usb2_generic_phy);
-@@ -1931,12 +1983,9 @@ static const struct dev_pm_ops dwc3_dev_
+@@ -1932,12 +1984,9 @@ static const struct dev_pm_ops dwc3_dev_
  
  #ifdef CONFIG_OF
  static const struct of_device_id of_dwc3_match[] = {
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch b/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch
index 4bc9f4d465..9a3d3f4a17 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0024-LF-387-1-Revert-usb-dwc3-Add-cache-type-configuratio.patch
@@ -81,7 +81,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  	usb_phy_set_suspend(dwc->usb2_phy, 0);
  	usb_phy_set_suspend(dwc->usb3_phy, 0);
  	ret = phy_power_on(dwc->usb2_generic_phy);
-@@ -1983,9 +1931,12 @@ static const struct dev_pm_ops dwc3_dev_
+@@ -1984,9 +1932,12 @@ static const struct dev_pm_ops dwc3_dev_
  
  #ifdef CONFIG_OF
  static const struct of_device_id of_dwc3_match[] = {
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch b/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch
index 9c5818c268..f9de7035aa 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0025-LF-387-4-usb-dwc3-Add-cache-type-configuration-suppo.patch
@@ -108,7 +108,7 @@ Reviewed-by: Jun Li <jun.li at nxp.com>
  	usb_phy_set_suspend(dwc->usb2_phy, 0);
  	usb_phy_set_suspend(dwc->usb3_phy, 0);
  	ret = phy_power_on(dwc->usb2_generic_phy);
-@@ -1931,12 +1982,16 @@ static const struct dev_pm_ops dwc3_dev_
+@@ -1932,12 +1983,16 @@ static const struct dev_pm_ops dwc3_dev_
  
  #ifdef CONFIG_OF
  static const struct of_device_id of_dwc3_match[] = {
diff --git a/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch
index 92383f51b4..12844c860f 100644
--- a/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch
+++ b/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch
@@ -19,7 +19,7 @@
  	},
  	[PORT_NPCM] = {
  		.name		= "Nuvoton 16550",
-@@ -2578,6 +2578,11 @@ serial8250_do_set_termios(struct uart_po
+@@ -2591,6 +2591,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.4/1021-ubnt-ledbar-driver.patch b/target/linux/mediatek/patches-5.4/1021-ubnt-ledbar-driver.patch
index c971b9b4ca..41ab094e9f 100644
--- a/target/linux/mediatek/patches-5.4/1021-ubnt-ledbar-driver.patch
+++ b/target/linux/mediatek/patches-5.4/1021-ubnt-ledbar-driver.patch
@@ -1,6 +1,6 @@
 --- a/drivers/leds/Kconfig
 +++ b/drivers/leds/Kconfig
-@@ -823,6 +823,16 @@ config LEDS_LM36274
+@@ -824,6 +824,16 @@ config LEDS_LM36274
  	  Say Y to enable the LM36274 LED driver for TI LMU devices.
  	  This supports the LED device LM36274.
  


From lede-commits at lists.infradead.org  Mon Jul 19 20:20:08 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 23:20:08 -0400
Subject: [openwrt/openwrt] uboot-envtools: move mediatek to mediatek_mt7622
In-Reply-To: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
References: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
Message-ID: <mailman.8711.1626751207.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/a71fa5e4766d2fba5b8195bbfdaae5d488797b69

commit a71fa5e4766d2fba5b8195bbfdaae5d488797b69
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Jul 12 16:47:11 2021 +0100

    uboot-envtools: move mediatek to mediatek_mt7622
    
    All mediatek boards having fw_env accessible through uboot-envtools
    belong to be mt7622 subtarget. Move the file, as subtarget-specific
    files are supported for a while now.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-envtools/files/{mediatek => mediatek_mt7622} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/package/boot/uboot-envtools/files/mediatek b/package/boot/uboot-envtools/files/mediatek_mt7622
similarity index 100%
rename from package/boot/uboot-envtools/files/mediatek
rename to package/boot/uboot-envtools/files/mediatek_mt7622


From lede-commits at lists.infradead.org  Mon Jul 19 20:20:02 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 23:20:02 -0400
Subject: [openwrt/openwrt] x86: include kmod-fs-vfat by default in generic
 images
In-Reply-To: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
References: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
Message-ID: <mailman.8712.1626751207.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/aaf1028296f45120f8e95491d1c8094bc8e8b693

commit aaf1028296f45120f8e95491d1c8094bc8e8b693
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Jun 30 02:18:42 2021 +0100

    x86: include kmod-fs-vfat by default in generic images
    
    As x86/64 and x86/generic may be using UEFI, mounting the FAT-32 /boot
    is necessary in order not to loose configuration files accross
    sysupgrades. Include kmod-fs-vfat by default to make sure /boot can
    always be mounted.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/x86/image/64.mk      | 2 +-
 target/linux/x86/image/generic.mk | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/x86/image/64.mk b/target/linux/x86/image/64.mk
index 9c9decbf79..d5033f932a 100644
--- a/target/linux/x86/image/64.mk
+++ b/target/linux/x86/image/64.mk
@@ -1,7 +1,7 @@
 define Device/generic
   DEVICE_TITLE := Generic x86/64
   DEVICE_PACKAGES += kmod-amazon-ena kmod-bnx2 kmod-e1000e kmod-e1000 \
-	kmod-forcedeth kmod-igb kmod-ixgbe kmod-amd-xgbe kmod-r8169
+	kmod-forcedeth kmod-igb kmod-ixgbe kmod-amd-xgbe kmod-r8169 kmod-fs-vfat
   GRUB2_VARIANT := generic
 endef
 TARGET_DEVICES += generic
diff --git a/target/linux/x86/image/generic.mk b/target/linux/x86/image/generic.mk
index 8a23afef0a..81cccd30b0 100644
--- a/target/linux/x86/image/generic.mk
+++ b/target/linux/x86/image/generic.mk
@@ -2,7 +2,7 @@ define Device/generic
   DEVICE_TITLE := Generic x86
   DEVICE_PACKAGES += kmod-3c59x kmod-8139too kmod-e100 kmod-e1000 kmod-natsemi \
 	kmod-ne2k-pci kmod-pcnet32 kmod-r8169 kmod-sis900 kmod-tg3 \
-	kmod-via-rhine kmod-via-velocity kmod-forcedeth
+	kmod-via-rhine kmod-via-velocity kmod-forcedeth kmod-fs-vfat
   GRUB2_VARIANT := generic
 endef
 TARGET_DEVICES += generic


From lede-commits at lists.infradead.org  Mon Jul 19 20:20:05 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 23:20:05 -0400
Subject: [openwrt/openwrt] mediatek: mt7623: import patch to fix flow
 offloading
In-Reply-To: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
References: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
Message-ID: <mailman.8713.1626751209.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/932366fdd97090f909cec2c5f1dffeebd2806998

commit 932366fdd97090f909cec2c5f1dffeebd2806998
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Jul 12 18:15:19 2021 +0100

    mediatek: mt7623: import patch to fix flow offloading
    
    Hardware flow offloading was reported to work when setting the right
    version identifier. Import a patch from Frank Wunderlich doing that.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...-net-mediatek-add-flow-offload-for-mt7623.patch | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/target/linux/mediatek/patches-5.10/510-net-mediatek-add-flow-offload-for-mt7623.patch b/target/linux/mediatek/patches-5.10/510-net-mediatek-add-flow-offload-for-mt7623.patch
new file mode 100644
index 0000000000..27bc1a60b2
--- /dev/null
+++ b/target/linux/mediatek/patches-5.10/510-net-mediatek-add-flow-offload-for-mt7623.patch
@@ -0,0 +1,24 @@
+From 4823778b116c08e9c55dbc5b5042223289ea6a0c Mon Sep 17 00:00:00 2001
+From: Frank Wunderlich <frank-w at public-files.de>
+Date: Wed, 31 Mar 2021 15:34:37 +0200
+Subject: [PATCH] net: mediatek: add flow offload for mt7623
+
+mt7623 uses offload version 2 too
+
+tested on Bananapi-R2
+
+Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
+---
+ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -3272,6 +3272,7 @@ static const struct mtk_soc_data mt7623_
+ 	.hw_features = MTK_HW_FEATURES,
+ 	.required_clks = MT7623_CLKS_BITMAP,
+ 	.required_pctl = true,
++	.offload_version = 2,
+ };
+ 
+ static const struct mtk_soc_data mt7629_data = {


From lede-commits at lists.infradead.org  Mon Jul 19 20:20:09 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 23:20:09 -0400
Subject: [openwrt/openwrt] uboot-envtools: add configuration for Bananapi
 BPi-R2
In-Reply-To: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
References: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
Message-ID: <mailman.8714.1626751209.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/6b2000b6ff19165d33b7f67fb7275334cbf80395

commit 6b2000b6ff19165d33b7f67fb7275334cbf80395
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Jul 12 16:49:12 2021 +0100

    uboot-envtools: add configuration for Bananapi BPi-R2
    
    Add fw_env configuration for the BPi-R2 which is a mediatek/mt7623
    devboard which can be booted from SD Card or eMMC.
    Auto detect the boot device and add environment accordingly.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-envtools/files/mediatek_mt7623 | 25 +++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/package/boot/uboot-envtools/files/mediatek_mt7623 b/package/boot/uboot-envtools/files/mediatek_mt7623
new file mode 100644
index 0000000000..863c8bc211
--- /dev/null
+++ b/package/boot/uboot-envtools/files/mediatek_mt7623
@@ -0,0 +1,25 @@
+#
+# Copyright (C) 2021 OpenWrt.org
+#
+
+[ -e /etc/config/ubootenv ] && exit 0
+
+touch /etc/config/ubootenv
+
+. /lib/uboot-envtools.sh
+. /lib/functions.sh
+
+board=$(board_name)
+
+case "$board" in
+bananapi,bpi-r2)
+	. /lib/upgrade/common.sh
+	export_bootdevice
+	export_partdevice ubootpart 1
+	ubootenv_add_uci_config "/dev/$ubootpart" "0xb0000" "0x10000" "0x10000" "1"
+esac
+
+config_load ubootenv
+config_foreach ubootenv_add_app_config ubootenv
+
+exit 0


From lede-commits at lists.infradead.org  Mon Jul 19 20:20:06 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 23:20:06 -0400
Subject: [openwrt/openwrt] kernel: make uImage.FIT partition parser work on
 MBR partitions
In-Reply-To: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
References: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
Message-ID: <mailman.8715.1626751209.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/8d633bf9f71e52aaefa917c83ab8e71622253e74

commit 8d633bf9f71e52aaefa917c83ab8e71622253e74
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Jul 12 16:54:45 2021 +0100

    kernel: make uImage.FIT partition parser work on MBR partitions
    
    Introduce new partition type 0x2e representing uImage.FIT and trigger
    FIT partition parser on partitions having that type.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/generic/files/block/partitions/fit.c  |  4 +--
 .../hack-5.10/410-block-fit-partition-parser.patch | 36 ++++++++++++++++++++++
 2 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/target/linux/generic/files/block/partitions/fit.c b/target/linux/generic/files/block/partitions/fit.c
index 823ee715de..27e44a4af4 100644
--- a/target/linux/generic/files/block/partitions/fit.c
+++ b/target/linux/generic/files/block/partitions/fit.c
@@ -189,8 +189,8 @@ int parse_fit_partitions(struct parsed_partitions *state, u64 fit_start_sector,
 
 		image_description = fdt_getprop(fit, node, FIT_DESC_PROP, &image_description_len);
 
-		printk(KERN_DEBUG "FIT: %16s sub-image 0x%08x - 0x%08x \"%s\" %s%s%s\n",
-			image_type, image_pos, image_pos + image_len, image_name,
+		printk(KERN_DEBUG "FIT: %16s sub-image 0x%08x..0x%08x \"%s\" %s%s%s\n",
+			image_type, image_pos, image_pos + image_len - 1, image_name,
 			image_description?"(":"", image_description?:"", image_description?") ":"");
 
 		if (strcmp(image_type, FIT_FILESYSTEM_PROP))
diff --git a/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch b/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch
index 2528f3afa1..6c2132e85e 100644
--- a/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch
+++ b/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch
@@ -217,3 +217,39 @@
  
  	set_capacity(gd, ((u64)new->size * tr->blksize) >> 9);
  
+--- a/block/partitions/msdos.c
++++ b/block/partitions/msdos.c
+@@ -565,6 +565,15 @@ static void parse_minix(struct parsed_pa
+ #endif /* CONFIG_MINIX_SUBPARTITION */
+ }
+ 
++static void parse_fit_mbr(struct parsed_partitions *state,
++			  sector_t offset, sector_t size, int origin)
++{
++#ifdef CONFIG_FIT_PARTITION
++	u32 extra_slot = 64;
++	(void) parse_fit_partitions(state, offset, size, &extra_slot, 1);
++#endif /* CONFIG_FIT_PARTITION */
++}
++
+ static struct {
+ 	unsigned char id;
+ 	void (*parse)(struct parsed_partitions *, sector_t, sector_t, int);
+@@ -576,6 +585,7 @@ static struct {
+ 	{UNIXWARE_PARTITION, parse_unixware},
+ 	{SOLARIS_X86_PARTITION, parse_solaris_x86},
+ 	{NEW_SOLARIS_X86_PARTITION, parse_solaris_x86},
++	{FIT_PARTITION, parse_fit_mbr},
+ 	{0, NULL},
+ };
+ 
+--- a/include/linux/msdos_partition.h
++++ b/include/linux/msdos_partition.h
+@@ -31,6 +31,7 @@ enum msdos_sys_ind {
+ 	LINUX_LVM_PARTITION = 0x8e,
+ 	LINUX_RAID_PARTITION = 0xfd,	/* autodetect RAID partition */
+ 
++	FIT_PARTITION = 0x2e,		/* U-Boot uImage.FIT */
+ 	SOLARIS_X86_PARTITION =	0x82,	/* also Linux swap partitions */
+ 	NEW_SOLARIS_X86_PARTITION = 0xbf,
+ 


From lede-commits at lists.infradead.org  Mon Jul 19 20:20:04 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 23:20:04 -0400
Subject: [openwrt/openwrt]  mediatek: mt7623: build with Linux 5.10
In-Reply-To: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
References: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
Message-ID: <mailman.8716.1626751212.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/bce7777222887ac0356b2a2311dd16486cc2cc05

commit bce7777222887ac0356b2a2311dd16486cc2cc05
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Jul 12 18:13:37 2021 +0100

    mediatek: mt7623: build with Linux 5.10
    
    Update Kernel config and set Linux 5.10 for mediatek/mt7623.
    (patches have already been updated to 5.10 when mt7622 was bumped)
    Tested on Bananapi BPi-R2.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../mediatek/mt7623/{config-5.4 => config-5.10}    | 164 ++++++++++-----------
 target/linux/mediatek/mt7623/target.mk             |   2 +
 2 files changed, 76 insertions(+), 90 deletions(-)

diff --git a/target/linux/mediatek/mt7623/config-5.4 b/target/linux/mediatek/mt7623/config-5.10
similarity index 78%
rename from target/linux/mediatek/mt7623/config-5.4
rename to target/linux/mediatek/mt7623/config-5.10
index 54c5049d82..4a43b51675 100644
--- a/target/linux/mediatek/mt7623/config-5.4
+++ b/target/linux/mediatek/mt7623/config-5.10
@@ -1,23 +1,6 @@
 # CONFIG_AIO is not set
 CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_CLOCKSOURCE_DATA=y
-CONFIG_ARCH_HAS_BINFMT_FLAT=y
-CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
-CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
-CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
-CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
-CONFIG_ARCH_HAS_KCOV=y
-CONFIG_ARCH_HAS_KEEPINITRD=y
-CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
-CONFIG_ARCH_HAS_PHYS_TO_DMA=y
-CONFIG_ARCH_HAS_SETUP_DMA_OPS=y
-CONFIG_ARCH_HAS_SET_MEMORY=y
-CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
-CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
-CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y
-CONFIG_ARCH_HAS_TICK_BROADCAST=y
-CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_KEEP_MEMBLOCK=y
 CONFIG_ARCH_MEDIATEK=y
@@ -28,14 +11,9 @@ 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_SUPPORTS_ATOMIC_RMW=y
-CONFIG_ARCH_SUPPORTS_UPROBES=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_USE_BUILTIN_BSWAP=y
-CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
-CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
-CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
-CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARM=y
 CONFIG_ARM_APPENDED_DTB=y
 CONFIG_ARM_ARCH_TIMER=y
@@ -50,6 +28,7 @@ CONFIG_ARM_L1_CACHE_SHIFT_6=y
 CONFIG_ARM_MEDIATEK_CPUFREQ=y
 CONFIG_ARM_PATCH_IDIV=y
 CONFIG_ARM_PATCH_PHYS_VIRT=y
+# CONFIG_ARM_SCMI_PROTOCOL is not set
 # CONFIG_ARM_SMMU is not set
 CONFIG_ARM_THUMB=y
 CONFIG_ARM_THUMBEE=y
@@ -58,12 +37,12 @@ CONFIG_ARM_VIRT_EXT=y
 CONFIG_ATAGS=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_CMDLINE_PARSER=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_MQ_PCI=y
 CONFIG_BLK_PM=y
 CONFIG_BOUNCE=y
 # CONFIG_CACHE_L2X0 is not set
-CONFIG_CC_HAS_KASAN_GENERIC=y
 CONFIG_CLEANCACHE=y
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLKSRC_MMIO=y
@@ -114,7 +93,6 @@ CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_PM=y
 CONFIG_CPU_RMAP=y
 CONFIG_CPU_SPECTRE=y
-# CONFIG_CPU_THERMAL is not set
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V7=y
 CONFIG_CPU_V7=y
@@ -122,28 +100,20 @@ CONFIG_CRC16=y
 # CONFIG_CRC32_SARWATE is not set
 CONFIG_CRC32_SLICEBY8=y
 CONFIG_CROSS_MEMORY_ATTACH=y
-CONFIG_CRYPTO_ACOMP2=y
-CONFIG_CRYPTO_AEAD=y
-CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_CRC32=y
 CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_CTR=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_DEV_MEDIATEK=y
 CONFIG_CRYPTO_DRBG=y
 CONFIG_CRYPTO_DRBG_HMAC=y
 CONFIG_CRYPTO_DRBG_MENU=y
-CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_GF128MUL=y
 CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_HW=y
 CONFIG_CRYPTO_JITTERENTROPY=y
 CONFIG_CRYPTO_LIB_SHA256=y
 CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_MANAGER=y
-CONFIG_CRYPTO_MANAGER2=y
-CONFIG_CRYPTO_NULL=y
 CONFIG_CRYPTO_NULL2=y
 CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_RNG2=y
@@ -166,16 +136,39 @@ CONFIG_DEBUG_MT6589_UART0=y
 # CONFIG_DEBUG_MT8135_UART3 is not set
 CONFIG_DEBUG_PREEMPT=y
 CONFIG_DEBUG_UART_8250=y
-# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
 CONFIG_DEBUG_UART_8250_SHIFT=2
-# CONFIG_DEBUG_UART_8250_WORD is not set
 CONFIG_DEBUG_UART_PHYS=0x11004000
 CONFIG_DEBUG_UART_VIRT=0xf1004000
 CONFIG_DEBUG_UNCOMPRESS=y
+# CONFIG_DEVFREQ_GOV_PASSIVE is not set
+# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
+# CONFIG_DEVFREQ_GOV_POWERSAVE is not set
+CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y
+# CONFIG_DEVFREQ_GOV_USERSPACE is not set
+# CONFIG_DEVFREQ_THERMAL is not set
+CONFIG_DIMLIB=y
 CONFIG_DMADEVICES=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_GEM_CMA_HELPER=y
+CONFIG_DRM_GEM_SHMEM_HELPER=y
+CONFIG_DRM_KMS_FB_HELPER=y
+CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_LIMA=y
+CONFIG_DRM_MEDIATEK=y
+CONFIG_DRM_MEDIATEK_HDMI=y
+CONFIG_DRM_MIPI_DSI=y
+CONFIG_DRM_PANEL=y
+CONFIG_DRM_PANEL_BRIDGE=y
+CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
+CONFIG_DRM_SCHED=y
 CONFIG_DTC=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_EDAC_ATOMIC_SCRUB=y
@@ -184,11 +177,23 @@ CONFIG_EINT_MTK=y
 CONFIG_ELF_CORE=y
 CONFIG_EXT4_FS=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_FIT_PARTITION=y
 CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
 CONFIG_FREEZER=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
+CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_BUG=y
@@ -196,6 +201,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
 CONFIG_GENERIC_CPU_AUTOPROBE=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
@@ -213,55 +219,18 @@ 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=y
+CONFIG_GRO_CELLS=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_ARCH_AUDITSYSCALL=y
-CONFIG_HAVE_ARCH_BITREVERSE=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_ARCH_KGDB=y
-CONFIG_HAVE_ARCH_PFN_VALID=y
-CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
-CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
-CONFIG_HAVE_ARCH_TRACEHOOK=y
-CONFIG_HAVE_ARM_ARCH_TIMER=y
-CONFIG_HAVE_ARM_SMCCC=y
-CONFIG_HAVE_CLK=y
-CONFIG_HAVE_CLK_PREPARE=y
-CONFIG_HAVE_CONTEXT_TRACKING=y
-CONFIG_HAVE_COPY_THREAD_TLS=y
-CONFIG_HAVE_C_RECORDMCOUNT=y
-CONFIG_HAVE_DEBUG_KMEMLEAK=y
-CONFIG_HAVE_DMA_CONTIGUOUS=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
-CONFIG_HAVE_EBPF_JIT=y
-CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
-CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_IDE=y
-CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
-CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y
-CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
-CONFIG_HAVE_NET_DSA=y
-CONFIG_HAVE_OPROFILE=y
-CONFIG_HAVE_OPTPROBES=y
-CONFIG_HAVE_PCI=y
-CONFIG_HAVE_PERF_EVENTS=y
-CONFIG_HAVE_PERF_REGS=y
-CONFIG_HAVE_PERF_USER_STACK_DUMP=y
-CONFIG_HAVE_PROC_CPU=y
-CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
-CONFIG_HAVE_RSEQ=y
 CONFIG_HAVE_SMP=y
-CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-CONFIG_HAVE_UID16=y
-CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
+CONFIG_HDMI=y
 CONFIG_HIGHMEM=y
 # CONFIG_HIGHPTE is not set
 CONFIG_HOTPLUG_CPU=y
@@ -270,15 +239,13 @@ CONFIG_HW_RANDOM=y
 CONFIG_HW_RANDOM_MTK=y
 CONFIG_HZ_FIXED=0
 CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
 CONFIG_I2C_MT65XX=y
 CONFIG_ICPLUS_PHY=y
 CONFIG_IIO=y
-CONFIG_INITRAMFS_COMPRESSION=""
-CONFIG_INITRAMFS_ROOT_GID=1000
-CONFIG_INITRAMFS_ROOT_UID=1000
-CONFIG_INITRAMFS_SOURCE="/openwrt/trunk/build_dir/target-arm_cortex-a7_musl-1.1.14_eabi/root-mediatek /openwrt/trunk/target/linux/generic/image/initramfs-base-files.txt"
+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
@@ -291,10 +258,11 @@ CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
 CONFIG_JBD2=y
 CONFIG_KALLSYMS=y
-# CONFIG_KEYBOARD_MTK_PMIC is not set
+CONFIG_KCMP=y
 CONFIG_LEDS_MT6323=y
 # CONFIG_LEDS_UBNT_LEDBAR is not set
 CONFIG_LIBFDT=y
+CONFIG_LLD_VERSION=0
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_LOCK_SPIN_ON_OWNER=y
 CONFIG_LZO_COMPRESS=y
@@ -307,26 +275,31 @@ CONFIG_MACH_MT7623=y
 # CONFIG_MACH_MT8127 is not set
 # CONFIG_MACH_MT8135 is not set
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_MAILBOX=y
+# CONFIG_MAILBOX_TEST is not set
 CONFIG_MDIO_BITBANG=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
 CONFIG_MDIO_GPIO=y
 CONFIG_MEDIATEK_MT6577_AUXADC=y
 CONFIG_MEDIATEK_WATCHDOG=y
 CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY=y
 CONFIG_MFD_CORE=y
+# CONFIG_MFD_HI6421_SPMI is not set
 CONFIG_MFD_MT6397=y
 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_MTK=y
 CONFIG_MMC_SDHCI=y
 # CONFIG_MMC_SDHCI_PCI is not set
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MODULES_USE_ELF_REL=y
-# CONFIG_MT753X_GSW is not set
 CONFIG_MTD_BLOCK2MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
 # CONFIG_MTD_NAND_MTK_BMT is not set
@@ -338,15 +311,18 @@ CONFIG_MTD_UBI=y
 CONFIG_MTD_UBI_BEB_LIMIT=20
 CONFIG_MTD_UBI_BLOCK=y
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
-# CONFIG_MTK_CMDQ is not set
+CONFIG_MTK_CMDQ=y
+CONFIG_MTK_CMDQ_MBOX=y
 # CONFIG_MTK_CQDMA is not set
 CONFIG_MTK_EFUSE=y
 # CONFIG_MTK_HSDMA is not set
 CONFIG_MTK_INFRACFG=y
 # CONFIG_MTK_IOMMU is not set
 # CONFIG_MTK_IOMMU_V1 is not set
+CONFIG_MTK_MMSYS=y
 CONFIG_MTK_PMIC_WRAP=y
 CONFIG_MTK_SCPSYS=y
+CONFIG_MTK_SMI=y
 CONFIG_MTK_THERMAL=y
 CONFIG_MTK_TIMER=y
 # CONFIG_MTK_UART_APDMA is not set
@@ -358,7 +334,6 @@ CONFIG_NET_DSA=y
 CONFIG_NET_DSA_MT7530=y
 CONFIG_NET_DSA_TAG_MTK=y
 CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NET_MEDIATEK_OFFLOAD=y
 CONFIG_NET_MEDIATEK_SOC=y
 CONFIG_NET_SWITCHDEV=y
 # CONFIG_NET_VENDOR_AURORA is not set
@@ -370,6 +345,7 @@ CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_NR_CPUS=4
 CONFIG_NVMEM=y
+# CONFIG_NVMEM_SPMI_SDAM is not set
 CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
@@ -397,6 +373,7 @@ CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
 CONFIG_PHYLINK=y
+CONFIG_PHY_MTK_HDMI=y
 CONFIG_PHY_MTK_TPHY=y
 # CONFIG_PHY_MTK_UFS is not set
 # CONFIG_PHY_MTK_XSPHY is not set
@@ -406,8 +383,11 @@ CONFIG_PINCTRL_MT6397=y
 CONFIG_PINCTRL_MT7623=y
 CONFIG_PINCTRL_MTK=y
 CONFIG_PINCTRL_MTK_MOORE=y
+CONFIG_PINCTRL_MTK_V2=y
 CONFIG_PM=y
 CONFIG_PM_CLK=y
+CONFIG_PM_DEVFREQ=y
+# CONFIG_PM_DEVFREQ_EVENT is not set
 CONFIG_PM_GENERIC_DOMAINS=y
 CONFIG_PM_GENERIC_DOMAINS_OF=y
 CONFIG_PM_GENERIC_DOMAINS_SLEEP=y
@@ -415,6 +395,7 @@ CONFIG_PM_OPP=y
 CONFIG_PM_SLEEP=y
 CONFIG_PM_SLEEP_SMP=y
 CONFIG_POWER_RESET=y
+# CONFIG_POWER_RESET_MT6323 is not set
 CONFIG_POWER_SUPPLY=y
 CONFIG_POWER_SUPPLY_HWMON=y
 CONFIG_PREEMPT=y
@@ -433,16 +414,18 @@ CONFIG_RCU_CPU_STALL_TIMEOUT=21
 # CONFIG_RCU_EXPERT is not set
 CONFIG_RCU_NEED_SEGCBLIST=y
 CONFIG_RCU_STALL_COMMON=y
-CONFIG_REFCOUNT_FULL=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_REGULATOR=y
 CONFIG_REGULATOR_FIXED_VOLTAGE=y
 CONFIG_REGULATOR_GPIO=y
 CONFIG_REGULATOR_MT6323=y
+# CONFIG_REGULATOR_MT6358 is not set
 # CONFIG_REGULATOR_MT6380 is not set
 # CONFIG_REGULATOR_MT6397 is not set
+# CONFIG_REGULATOR_QCOM_LABIBB is not set
 # CONFIG_REGULATOR_QCOM_SPMI is not set
+# CONFIG_REGULATOR_QCOM_USB_VBUS is not set
 CONFIG_RESET_CONTROLLER=y
 CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
@@ -462,8 +445,6 @@ CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SGL_ALLOC=y
 CONFIG_SMP=y
 # CONFIG_SMP_ON_UP is not set
-# CONFIG_SND_SOC_MT6797 is not set
-# CONFIG_SND_SOC_MT8183 is not set
 CONFIG_SPARSE_IRQ=y
 CONFIG_SPI=y
 CONFIG_SPI_BITBANG=y
@@ -473,6 +454,7 @@ CONFIG_SPI_MT65XX=y
 # CONFIG_SPI_MTK_NOR is not set
 # CONFIG_SPI_MTK_SNFI is not set
 CONFIG_SPMI=y
+# CONFIG_SPMI_HISI3670 is not set
 CONFIG_SRCU=y
 # CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_SUSPEND=y
@@ -480,8 +462,8 @@ CONFIG_SUSPEND_FREEZER=y
 CONFIG_SWCONFIG=y
 CONFIG_SWPHY=y
 CONFIG_SWP_EMULATE=y
+CONFIG_SYNC_FILE=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-CONFIG_TASKS_RCU=y
 CONFIG_THERMAL=y
 CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
 CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
@@ -490,6 +472,7 @@ 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_UBIFS_FS=y
 CONFIG_UEVENT_HELPER_PATH=""
@@ -505,6 +488,7 @@ CONFIG_USB_XHCI_PLATFORM=y
 CONFIG_USE_OF=y
 CONFIG_VFP=y
 CONFIG_VFPv3=y
+CONFIG_VIDEOMODE_HELPERS=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_WATCHDOG_CORE=y
 CONFIG_XPS=y
diff --git a/target/linux/mediatek/mt7623/target.mk b/target/linux/mediatek/mt7623/target.mk
index df7d3bf4ed..224934caa3 100644
--- a/target/linux/mediatek/mt7623/target.mk
+++ b/target/linux/mediatek/mt7623/target.mk
@@ -9,6 +9,8 @@ CPU_TYPE:=cortex-a7
 CPU_SUBTYPE:=neon-vfpv4
 KERNELNAME:=Image dtbs zImage
 FEATURES+=ext4 usb
+KERNEL_PATCHVER:=5.10
+DEFAULT_PACKAGES+=blockdev uboot-envtools
 
 define Target/Description
 	Build firmware images for MediaTek mt7623 ARM based boards.


From lede-commits at lists.infradead.org  Mon Jul 19 20:20:03 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 23:20:03 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.10 to 5.10.51
In-Reply-To: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
References: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
Message-ID: <mailman.8719.1626751212.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/a395cd00d23602bfa9c568593e7b9a8f5b258ab1

commit a395cd00d23602bfa9c568593e7b9a8f5b258ab1
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Mon Jul 19 09:59:05 2021 +0100

    kernel: bump 5.10 to 5.10.51
    
    No deleted or manually refreshed patches.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 include/kernel-version.mk                                         | 4 ++--
 target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch  | 2 +-
 ...3-v5.13-MIPS-select-CPU_MIPS64-for-remaining-MIPS64-CPUs.patch | 2 +-
 ...v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch | 8 ++++----
 ...v5.12-net-implement-threaded-able-napi-poll-loop-support.patch | 8 ++++----
 ....12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch | 2 +-
 ....12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch | 4 ++--
 ...4-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch | 4 ++--
 target/linux/generic/hack-5.10/301-mips_image_cmdline_hack.patch  | 2 +-
 target/linux/generic/pending-5.10/300-mips_expose_boot_raw.patch  | 4 ++--
 .../pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch | 8 ++++----
 .../generic/pending-5.10/810-pci_disable_common_quirks.patch      | 8 ++++----
 target/linux/lantiq/patches-5.10/0152-lantiq-VPE.patch            | 2 +-
 .../ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch | 4 ++--
 ...01-dts-rockchip-add-usb3-controller-node-for-RK3328-SoCs.patch | 2 +-
 15 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 2948f7b5e8..91e609c427 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
 endif
 
 LINUX_VERSION-5.4 = .132
-LINUX_VERSION-5.10 = .50
+LINUX_VERSION-5.10 = .51
 
 LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
-LINUX_KERNEL_HASH-5.10.50 = 8bda327a7d95acfff8f87fb6ef4223e3194fa22195f5551249a9aa3393bfb436
+LINUX_KERNEL_HASH-5.10.51 = 95bae893c274ccc3a8a6271f377bcc7fd3badcb7990ecd41b05b2731f1d67ae2
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch
index b9290dee1c..c77de17db0 100644
--- a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch
@@ -706,7 +706,7 @@
  EXPORT_SYMBOL(xfrm_parse_spi);
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -4074,14 +4074,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -4081,14 +4081,16 @@ static bool tcp_parse_aligned_timestamp(
  {
  	const __be32 *ptr = (const __be32 *)(th + 1);
  
diff --git a/target/linux/generic/backport-5.10/103-v5.13-MIPS-select-CPU_MIPS64-for-remaining-MIPS64-CPUs.patch b/target/linux/generic/backport-5.10/103-v5.13-MIPS-select-CPU_MIPS64-for-remaining-MIPS64-CPUs.patch
index 9fc236ec41..83bfd733d6 100644
--- a/target/linux/generic/backport-5.10/103-v5.13-MIPS-select-CPU_MIPS64-for-remaining-MIPS64-CPUs.patch
+++ b/target/linux/generic/backport-5.10/103-v5.13-MIPS-select-CPU_MIPS64-for-remaining-MIPS64-CPUs.patch
@@ -25,7 +25,7 @@ Signed-off-by: Jason A. Donenfeld <Jason at zx2c4.com>
 
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -2076,7 +2076,7 @@ config CPU_MIPS32
+@@ -2078,7 +2078,7 @@ config CPU_MIPS32
  config CPU_MIPS64
  	bool
  	default y if CPU_MIPS64_R1 || CPU_MIPS64_R2 || CPU_MIPS64_R5 || \
diff --git a/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch b/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch
index 877ccb2aee..7f92a1307d 100644
--- a/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch
+++ b/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -6772,15 +6772,10 @@ void __netif_napi_del(struct napi_struct
+@@ -6779,15 +6779,10 @@ void __netif_napi_del(struct napi_struct
  }
  EXPORT_SYMBOL(__netif_napi_del);
  
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	weight = n->weight;
  
  	/* This NAPI_STATE_SCHED test is for avoiding a race
-@@ -6800,7 +6795,7 @@ static int napi_poll(struct napi_struct
+@@ -6807,7 +6802,7 @@ static int napi_poll(struct napi_struct
  			    n->poll, work, weight);
  
  	if (likely(work < weight))
@@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	/* Drivers must not modify the NAPI state if they
  	 * consume the entire weight.  In such cases this code
-@@ -6809,7 +6804,7 @@ static int napi_poll(struct napi_struct
+@@ -6816,7 +6811,7 @@ static int napi_poll(struct napi_struct
  	 */
  	if (unlikely(napi_disable_pending(n))) {
  		napi_complete(n);
@@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	}
  
  	if (n->gro_bitmask) {
-@@ -6827,12 +6822,29 @@ static int napi_poll(struct napi_struct
+@@ -6834,12 +6829,29 @@ static int napi_poll(struct napi_struct
  	if (unlikely(!list_empty(&n->poll_list))) {
  		pr_warn_once("%s: Budget exhausted after napi rescheduled\n",
  			     n->dev ? n->dev->name : "backlog");
diff --git a/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch b/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
index 43267b5d74..6396499e4d 100644
--- a/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
+++ b/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
@@ -153,7 +153,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	list_add_tail(&napi->poll_list, &sd->poll_list);
  	__raise_softirq_irqoff(NET_RX_SOFTIRQ);
  }
-@@ -6725,6 +6762,12 @@ void netif_napi_add(struct net_device *d
+@@ -6732,6 +6769,12 @@ void netif_napi_add(struct net_device *d
  	set_bit(NAPI_STATE_NPSVC, &napi->state);
  	list_add_rcu(&napi->dev_list, &dev->napi_list);
  	napi_hash_add(napi);
@@ -166,7 +166,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  EXPORT_SYMBOL(netif_napi_add);
  
-@@ -6741,9 +6784,28 @@ void napi_disable(struct napi_struct *n)
+@@ -6748,9 +6791,28 @@ void napi_disable(struct napi_struct *n)
  	hrtimer_cancel(&n->timer);
  
  	clear_bit(NAPI_STATE_DISABLE, &n->state);
@@ -195,7 +195,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void flush_gro_hash(struct napi_struct *napi)
  {
  	int i;
-@@ -6769,6 +6831,11 @@ void __netif_napi_del(struct napi_struct
+@@ -6776,6 +6838,11 @@ void __netif_napi_del(struct napi_struct
  
  	flush_gro_hash(napi);
  	napi->gro_bitmask = 0;
@@ -207,7 +207,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  EXPORT_SYMBOL(__netif_napi_del);
  
-@@ -6850,6 +6917,51 @@ static int napi_poll(struct napi_struct
+@@ -6857,6 +6924,51 @@ static int napi_poll(struct napi_struct
  	return work;
  }
  
diff --git a/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch b/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
index c54e2b2fe2..323e93860a 100644
--- a/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
+++ b/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
@@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		 * wake_up_process() when it's not NULL.
  		 */
  		thread = READ_ONCE(napi->thread);
-@@ -6735,6 +6736,49 @@ static void init_gro_hash(struct napi_st
+@@ -6742,6 +6743,49 @@ static void init_gro_hash(struct napi_st
  	napi->gro_bitmask = 0;
  }
  
diff --git a/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch b/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
index cff4e8b173..cdab47e0cc 100644
--- a/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
+++ b/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
@@ -54,7 +54,7 @@ Cc: Hannes Frederic Sowa <hannes at stressinduktion.org>
  			wake_up_process(thread);
  			return;
  		}
-@@ -6527,7 +6529,8 @@ bool napi_complete_done(struct napi_stru
+@@ -6534,7 +6536,8 @@ bool napi_complete_done(struct napi_stru
  
  		WARN_ON_ONCE(!(val & NAPIF_STATE_SCHED));
  
@@ -64,7 +64,7 @@ Cc: Hannes Frederic Sowa <hannes at stressinduktion.org>
  
  		/* If STATE_MISSED was set, leave STATE_SCHED set,
  		 * because we will call napi->poll() one more time.
-@@ -6963,16 +6966,25 @@ static int napi_poll(struct napi_struct
+@@ -6970,16 +6973,25 @@ static int napi_poll(struct napi_struct
  
  static int napi_thread_wait(struct napi_struct *napi)
  {
diff --git a/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch b/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch
index 0b7639af1c..5894099fff 100644
--- a/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch
+++ b/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch
@@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -6970,7 +6970,7 @@ static int napi_thread_wait(struct napi_
+@@ -6977,7 +6977,7 @@ static int napi_thread_wait(struct napi_
  
  	set_current_state(TASK_INTERRUPTIBLE);
  
@@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		/* Testing SCHED_THREADED bit here to make sure the current
  		 * kthread owns this napi and could poll on this napi.
  		 * Testing SCHED bit is not enough because SCHED bit might be
-@@ -6988,6 +6988,7 @@ static int napi_thread_wait(struct napi_
+@@ -6995,6 +6995,7 @@ static int napi_thread_wait(struct napi_
  		set_current_state(TASK_INTERRUPTIBLE);
  	}
  	__set_current_state(TASK_RUNNING);
diff --git a/target/linux/generic/hack-5.10/301-mips_image_cmdline_hack.patch b/target/linux/generic/hack-5.10/301-mips_image_cmdline_hack.patch
index 027620deeb..ecf86b66a6 100644
--- a/target/linux/generic/hack-5.10/301-mips_image_cmdline_hack.patch
+++ b/target/linux/generic/hack-5.10/301-mips_image_cmdline_hack.patch
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
 
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -1163,6 +1163,10 @@ config MIPS_MSC
+@@ -1165,6 +1165,10 @@ config MIPS_MSC
  config SYNC_R4K
  	bool
  
diff --git a/target/linux/generic/pending-5.10/300-mips_expose_boot_raw.patch b/target/linux/generic/pending-5.10/300-mips_expose_boot_raw.patch
index 8ecfb6d3ca..a04864ab4d 100644
--- a/target/linux/generic/pending-5.10/300-mips_expose_boot_raw.patch
+++ b/target/linux/generic/pending-5.10/300-mips_expose_boot_raw.patch
@@ -9,7 +9,7 @@ Acked-by: Rob Landley <rob at landley.net>
 ---
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -1078,9 +1078,6 @@ config FW_ARC
+@@ -1080,9 +1080,6 @@ config FW_ARC
  config ARCH_MAY_HAVE_PC_FDC
  	bool
  
@@ -19,7 +19,7 @@ Acked-by: Rob Landley <rob at landley.net>
  config CEVT_BCM1480
  	bool
  
-@@ -3170,6 +3167,18 @@ choice
+@@ -3172,6 +3169,18 @@ choice
  		bool "Extend builtin kernel arguments with bootloader arguments"
  endchoice
  
diff --git a/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 33d64ab3da..8a47b3ab21 100644
--- a/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (netif_elide_gro(skb->dev))
  		goto normal;
  
-@@ -8006,6 +8009,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -8013,6 +8016,48 @@ static void __netdev_adjacent_dev_unlink
  					   &upper_dev->adj_list.lower);
  }
  
@@ -91,7 +91,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,
-@@ -8057,6 +8102,7 @@ static int __netdev_upper_dev_link(struc
+@@ -8064,6 +8109,7 @@ static int __netdev_upper_dev_link(struc
  	if (ret)
  		return ret;
  
@@ -99,7 +99,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);
-@@ -8153,6 +8199,7 @@ static void __netdev_upper_dev_unlink(st
+@@ -8160,6 +8206,7 @@ static void __netdev_upper_dev_unlink(st
  
  	__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
  
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
  				      &changeupper_info.info);
  
-@@ -8939,6 +8986,7 @@ int dev_set_mac_address(struct net_devic
+@@ -8946,6 +8993,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-5.10/810-pci_disable_common_quirks.patch b/target/linux/generic/pending-5.10/810-pci_disable_common_quirks.patch
index 7e7866add8..5be832b074 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
-@@ -205,6 +205,7 @@ static void quirk_mmio_always_on(struct
+@@ -206,6 +206,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"
-@@ -3320,6 +3321,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -3321,6 +3322,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
-@@ -3345,6 +3348,8 @@ static void quirk_intel_ntb(struct pci_d
+@@ -3346,6 +3349,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
-@@ -3383,6 +3388,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3384,6 +3389,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/0152-lantiq-VPE.patch b/target/linux/lantiq/patches-5.10/0152-lantiq-VPE.patch
index aa9745d6ff..5f070ffb9b 100644
--- a/target/linux/lantiq/patches-5.10/0152-lantiq-VPE.patch
+++ b/target/linux/lantiq/patches-5.10/0152-lantiq-VPE.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/Kconfig
 +++ b/arch/mips/Kconfig
-@@ -2426,6 +2426,12 @@ config MIPS_VPE_LOADER
+@@ -2428,6 +2428,12 @@ config MIPS_VPE_LOADER
  	  Includes a loader for loading an elf relocatable object
  	  onto another VPE and running it.
  
diff --git a/target/linux/ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch
index 204dc41b01..a01f3a1078 100644
--- a/target/linux/ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch
+++ b/target/linux/ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch
@@ -64,7 +64,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  #include <media/v4l2-common.h>
  
-@@ -1156,9 +1161,149 @@ static void uvc_video_decode_data(struct
+@@ -1183,9 +1188,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_trace(UVC_TRACE_FRAME, "Frame complete (EOF found).\n");
-@@ -1715,6 +1860,8 @@ static int uvc_init_video_isoc(struct uv
+@@ -1742,6 +1887,8 @@ static int uvc_init_video_isoc(struct uv
  	if (npackets == 0)
  		return -ENOMEM;
  
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 e8123ee025..54036c0f6b 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
-@@ -984,6 +984,33 @@
+@@ -1003,6 +1003,33 @@
  		status = "disabled";
  	};
  


From lede-commits at lists.infradead.org  Mon Jul 19 20:20:07 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 23:20:07 -0400
Subject: [openwrt/openwrt]  uboot-mediatek: rework support for the BPi-R2
In-Reply-To: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
References: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
Message-ID: <mailman.8720.1626751212.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/ec3bd5e1972eeb737dcddaf2d1c673b99ea28e5e

commit ec3bd5e1972eeb737dcddaf2d1c673b99ea28e5e
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Jul 12 16:52:21 2021 +0100

    uboot-mediatek: rework support for the BPi-R2
    
     * use built-in default environment instead of file in bootfs
     * get rid of bootfs alltogether and use uImage.FIT
     * auto-detect boot device like original script did
     * add support for factory button
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...00-mt7622-generic-reset-button-ignore-env.patch |  11 +
 .../patches/400-update-bpir2-defconfig.patch       | 303 ++++++++++++++++++++-
 2 files changed, 301 insertions(+), 13 deletions(-)

diff --git a/package/boot/uboot-mediatek/patches/300-mt7622-generic-reset-button-ignore-env.patch b/package/boot/uboot-mediatek/patches/300-mt7622-generic-reset-button-ignore-env.patch
index e794e0a0db..f45462eeab 100644
--- a/package/boot/uboot-mediatek/patches/300-mt7622-generic-reset-button-ignore-env.patch
+++ b/package/boot/uboot-mediatek/patches/300-mt7622-generic-reset-button-ignore-env.patch
@@ -39,3 +39,14 @@
  	env_relocate();
  	return 0;
  }
+--- a/board/mediatek/mt7622/Kconfig
++++ b/board/mediatek/mt7622/Kconfig
+@@ -14,4 +14,8 @@ config MTK_BROM_HEADER_INFO
+ 	string
+ 	default "media=nor"
+ 
++config RESET_BUTTON_LABEL
++	string "Button to trigger factory reset"
++	default "reset"
++
+ endif
diff --git a/package/boot/uboot-mediatek/patches/400-update-bpir2-defconfig.patch b/package/boot/uboot-mediatek/patches/400-update-bpir2-defconfig.patch
index ec0fed84b8..c42a2c628b 100644
--- a/package/boot/uboot-mediatek/patches/400-update-bpir2-defconfig.patch
+++ b/package/boot/uboot-mediatek/patches/400-update-bpir2-defconfig.patch
@@ -1,19 +1,296 @@
 --- a/configs/mt7623n_bpir2_defconfig
 +++ b/configs/mt7623n_bpir2_defconfig
-@@ -51,6 +51,16 @@ CONFIG_SYSRESET=y
- CONFIG_SYSRESET_WATCHDOG=y
- CONFIG_TIMER=y
- CONFIG_MTK_TIMER=y
-+CONFIG_CMD_BOOTZ=y
-+CONFIG_OF_LIBFDT_OVERLAY=y
-+#enables savenenv-command
-+CONFIG_ENV_IS_IN_FAT=y
-+CONFIG_ENV_FAT_INTERFACE="mmc"
-+CONFIG_ENV_FAT_DEVICE_AND_PART=":2"
-+CONFIG_ENV_FAT_FILE="uboot.env"
+@@ -4,53 +4,137 @@ CONFIG_ARCH_MEDIATEK=y
+ CONFIG_SYS_TEXT_BASE=0x81e00000
+ CONFIG_SYS_MALLOC_F_LEN=0x4000
+ CONFIG_NR_DRAM_BANKS=1
+-CONFIG_ENV_SIZE=0x1000
++CONFIG_ENV_SIZE=0x10000
+ CONFIG_ENV_OFFSET=0x100000
+ CONFIG_TARGET_MT7623=y
+ CONFIG_DEFAULT_DEVICE_TREE="mt7623n-bananapi-bpi-r2"
++CONFIG_USE_DEFAULT_ENV_FILE=y
+ CONFIG_DISTRO_DEFAULTS=y
+ CONFIG_FIT=y
+-CONFIG_FIT_VERBOSE=y
++CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
++CONFIG_LED=y
++CONFIG_LED_BLINK=y
++CONFIG_LED_GPIO=y
++CONFIG_LOGLEVEL=7
++CONFIG_LOG=y
++CONFIG_AUTOBOOT_KEYED=y
++CONFIG_AUTOBOOT_MENU_SHOW=y
++CONFIG_BOARD_LATE_INIT=y
+ CONFIG_BOOTDELAY=3
++CONFIG_BOOTP_SEND_HOSTNAME=y
+ CONFIG_DEFAULT_FDT_FILE="mt7623n-bananapi-bpi-r2.dtb"
+ CONFIG_SYS_CONSOLE_IS_IN_ENV=y
++CONFIG_DEFAULT_ENV_FILE="bananapi_bpi-r2_env"
++CONFIG_BUTTON=y
++CONFIG_BUTTON_GPIO=y
++CONFIG_RESET_BUTTON_LABEL="factory"
++CONFIG_CFB_CONSOLE_ANSI=y
++CONFIG_CMD_ENV_FLAGS=y
+ # CONFIG_DISPLAY_BOARDINFO is not set
+-CONFIG_SYS_PROMPT="U-Boot> "
++CONFIG_SYS_PROMPT="MT7623> "
+ CONFIG_CMD_BOOTMENU=y
++CONFIG_CMD_BOOTP=y
++CONFIG_CMD_BUTTON=y
++CONFIG_CMD_CACHE=y
++CONFIG_CMD_CDP=y
++CONFIG_CMD_DHCP=y
++CONFIG_CMD_DM=y
++CONFIG_CMD_DNS=y
++CONFIG_CMD_ECHO=y
++CONFIG_CMD_ENV_READMEM=y
++CONFIG_CMD_ERASEENV=y
++CONFIG_CMD_EXT4=y
++CONFIG_CMD_FAT=y
++CONFIG_CMD_FS_GENERIC=y
++CONFIG_CMD_FS_UUID=y
+ # CONFIG_CMD_ELF is not set
+ # CONFIG_CMD_XIMG is not set
+ CONFIG_CMD_GPIO=y
+-CONFIG_CMD_GPT=y
++# CONFIG_CMD_GPT is not set
++CONFIG_CMD_HASH=y
++CONFIG_CMD_ITEST=y
++CONFIG_CMD_LED=y
++CONFIG_CMD_LICENSE=y
++CONFIG_CMD_LINK_LOCAL=y
++CONFIG_CMD_MBR=y
+ CONFIG_CMD_MMC=y
+-CONFIG_CMD_READ=y
+-# CONFIG_CMD_SETEXPR is not set
++CONFIG_CMD_MTD=y
+ # CONFIG_CMD_NFS is not set
++CONFIG_CMD_PCI=y
++CONFIG_CMD_SF_TEST=y
++CONFIG_CMD_PING=y
++CONFIG_CMD_PXE=y
++CONFIG_CMD_PWM=y
++CONFIG_CMD_SMC=y
++CONFIG_CMD_TFTPBOOT=y
++CONFIG_CMD_TFTPSRV=y
 +CONFIG_CMD_ASKENV=y
-+CONFIG_ENV_SIZE=0x2000
++CONFIG_CMD_PART=y
++CONFIG_CMD_RARP=y
++CONFIG_CMD_SATA=y
 +CONFIG_CMD_SETEXPR=y
++CONFIG_CMD_SLEEP=y
++CONFIG_CMD_SNTP=y
++CONFIG_CMD_SOURCE=y
++CONFIG_CMD_STRINGS=y
++CONFIG_CMD_USB=y
++CONFIG_CMD_UUID=y
++CONFIG_CMD_MMC=y
++CONFIG_CMD_READ=y
++CONFIG_CMD_SCSI=y
++CONFIG_DISPLAY_CPUINFO=y
++CONFIG_DM_ETH=y
++CONFIG_DM_GPIO=y
++CONFIG_DM_SCSI=y
++CONFIG_DM_MMC=y
++CONFIG_DM_MTD=y
++CONFIG_DM_REGULATOR=y
++CONFIG_DM_REGULATOR_FIXED=y
++CONFIG_DM_SERIAL=y
++CONFIG_DM_REGULATOR_GPIO=y
++CONFIG_DM_USB=y
++CONFIG_DM_PCI=y
++CONFIG_DM_PWM=y
++CONFIG_AHCI=y
++CONFIG_AHCI_PCI=y
++CONFIG_SCSI_AHCI=y
++CONFIG_SCSI=y
++CONFIG_PWM_MTK=y
++CONFIG_HUSH_PARSER=y
++CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_ENV_OVERWRITE=y
+ CONFIG_ENV_IS_IN_MMC=y
+ CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+ CONFIG_NET_RANDOM_ETHADDR=y
++CONFIG_NETCONSOLE=y
+ CONFIG_REGMAP=y
+ CONFIG_SYSCON=y
+ CONFIG_CLK=y
+-CONFIG_DM_MMC=y
++CONFIG_LZMA=y
++CONFIG_MEDIATEK_ETH=y
+ # CONFIG_MMC_QUIRKS is not set
+ CONFIG_SUPPORT_EMMC_BOOT=y
+ CONFIG_MMC_HS400_SUPPORT=y
+ CONFIG_MMC_MTK=y
++CONFIG_MTK_AHCI=y
++CONFIG_MTK_POWER_DOMAIN=y
++CONFIG_MTK_SERIAL=y
++CONFIG_MTK_TIMER=y
++CONFIG_OF_LIBFDT_OVERLAY=y
++CONFIG_PARTITION_UUIDS=y
++CONFIG_PCI=y
++CONFIG_PCIE_MEDIATEK=y
++CONFIG_PHY=y
+ CONFIG_PHY_FIXED=y
+-CONFIG_DM_ETH=y
+-CONFIG_MEDIATEK_ETH=y
+ CONFIG_PINCTRL=y
+ CONFIG_PINCONF=y
+ CONFIG_PINCTRL_MT7623=y
+ CONFIG_POWER_DOMAIN=y
+-CONFIG_MTK_POWER_DOMAIN=y
+-CONFIG_DM_SERIAL=y
+-CONFIG_MTK_SERIAL=y
++CONFIG_RANDOM_UUID=y
++CONFIG_REGEX=y
+ CONFIG_SYSRESET=y
+ CONFIG_SYSRESET_WATCHDOG=y
+ CONFIG_TIMER=y
+-CONFIG_MTK_TIMER=y
++CONFIG_VERSION_VARIABLE=y
  CONFIG_WDT_MTK=y
- CONFIG_LZMA=y
+-CONFIG_LZMA=y
  # CONFIG_EFI_GRUB_ARM32_WORKAROUND is not set
+--- /dev/null
++++ b/bananapi_bpi-r2_env
+@@ -0,0 +1,64 @@
++ipaddr=192.168.1.1
++serverip=192.168.1.254
++loadaddr=0x88000000
++dtaddr=0x83f00000
++console=earlycon=uart8250,mmio32,0x11004000 console=ttyS2,115200
++initrd_high=0xafffffff
++part_default=3
++part_recovery=2
++bootcmd=run boot_mmc
++bootdelay=0
++bootfile=openwrt-mediatek-mt7623-bananapi_bpi-r2-initramfs-recovery.itb
++bootfile_upg=openwrt-mediatek-mt7623-bananapi_bpi-r2-squashfs-sysupgrade.itb
++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
++bootmenu_default=0
++bootmenu_delay=0
++bootmenu_title=      [0;34m( ( ( [1;39mOpenWrt[0;34m ) ) )
++bootmenu_0=Initialize environment.=run _firstboot
++bootmenu_0d=Run default boot command.=run boot_default
++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
++boot_first=if button factory ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
++boot_tftp_forever=led bpi-r64:pio:blue on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run mmc_write_production ; if env exists noboot ; then else bootm $loadaddr ; fi
++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run mmc_write_recovery ; if env exists noboot ; then else bootm $loadaddr ; fi
++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr
++boot_mmc=run boot_production ; run boot_recovery
++emmc_init=run emmc_init_bl && run emmc_init_openwrt ; env default bootcmd ; saveenv
++emmc_init_bl=run sdmmc_read_emmc_hdr && run emmc_write_hdr && run sdmmc_read_preloader && run emmc_write_preloader && run sdmmc_read_uboot && run emmc_write_uboot
++emmc_init_openwrt=run sdmmc_read_recovery && run emmc_write_recovery ; run sdmmc_read_production && run emmc_write_production
++emmc_write_hdr=mmc dev 0 0 ; mmc erase 0x0 0x2000 ; mmc write $loadaddr 0x0 0x4 ; mmc dev 0 1 ; mmc partconf 0 1 1 1 ; mmc erase 0x0 0x400 ; mmc write $loadaddr 0x0 0x4 ; mmc partconf 0 1 1 0
++emmc_write_preloader=mmc dev 0 1 ; mmc partconf 0 1 1 1 ; mmc write $loadaddr 0x4 0x100 ; mmc partconf 0 1 1 0
++emmc_write_uboot=mmc dev 0 0 ; part size mmc 0 1 part_size && part start mmc 0 1 part_addr && mmc write $loadaddr $part_addr 0x400
++emmc_write_production=mmc dev 0 0 ; iminfo $loadaddr && part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_write_vol
++emmc_write_recovery=mmc dev 0 0 ; iminfo $loadaddr && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
++emmc_read_production=mmc dev 0 0 ; part start mmc 0 $part_default part_addr && part size mmc 0 $part_default part_size && run mmc_read_vol
++emmc_read_recovery=mmc dev 0 0 ; part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_read_vol
++mmc_write_production=if test "$bootedfrom" = "SD" ; then run sdmmc_write_production ; else run emmc_write_production ; fi
++mmc_write_recovery=if test "$bootedfrom" = "SD" ; run sdmmc_write_recovery ; else run emmc_write_recovery ; fi
++mmc_write_vol=imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc erase 0x$part_addr 0x$part_size && mmc write $loadaddr 0x$part_addr 0x$image_size
++mmc_read_vol=mmc read $loadaddr $part_addr 0x8 && imszb $loadaddr image_size && test 0x$image_size -le 0x$part_size && mmc read $loadaddr 0x$part_addr 0x$image_size && setexpr filesize $image_size * 0x200
++reset_factory=eraseenv && reset
++sdmmc_read_emmc_hdr=mmc dev 1 && mmc read $loadaddr 0x1ff8 0x8
++sdmmc_read_preloader=mmc dev 1 && mmc read $loadaddr 0x4 0x100
++sdmmc_read_uboot=mmc dev 1 ; part start mmc 1 1 part_addr && part size mmc 1 1 part_size && mmc read $loadaddr $part_addr $part_size
++sdmmc_read_production=mmc dev 1 ; part start mmc 1 $part_default part_addr && part size mmc 1 $part_default part_size && run mmc_read_vol
++sdmmc_read_recovery=mmc dev 1 ; part start mmc 1 $part_recovery part_addr && part size mmc 1 $part_recovery part_size && run mmc_read_vol
++sdmmc_write_production=iminfo $fileaddr && mmc dev 1 && part start mmc 1 $part_default part_addr && part size mmc 1 $part_default part_size && run mmc_write_vol
++sdmmc_write_recovery=iminfo $fileaddr && mmc dev 1 && part start mmc 1 $part_recovery part_addr && part size mmc 1 $part_recovery part_size && run mmc_write_vol
++_checkbootedfrom=setenv _checkbootedfrom ; if itest.l *81dffff0 == 434d4d65 ; then setenv bootedfrom eMMC ; else setenv bootedfrom SD ; fi
++_init_env=setenv _init_env ; setenv _create_env ; saveenv ; saveenv
++_firstboot=setenv _firstboot ; led bpi-r64:pio:blue on ; run _checkbootedfrom _switch_to_menu _update_bootdev _update_bootcmd _update_bootcmd2 _init_env boot_first
++_update_bootcmd=setenv _update_bootcmd ; if test "$bootedfrom" = "SD" ; then setenv boot_production "run sdmmc_read_production && bootm $loadaddr" ; else setenv boot_production "run emmc_read_production && bootm $loadaddr" ; fi
++_update_bootcmd2=setenv _update_bootcmd2 ; if test "$bootedfrom" = "SD" ; then setenv boot_recovery "run sdmmc_read_recovery && bootm $loadaddr" ; else setenv boot_recovery "run emmc_read_recovery && bootm $loadaddr" ; fi
++_update_bootdev=setenv _update_bootdev ; if test "$bootedfrom" = "SD" ; then setenv bootargs "$console root=/dev/mmcblk1p65" ; else setenv bootargs "$console root=/dev/mmcblk0p65" ; fi
++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title  [0;36m[$bootedfrom][0m    [33m$ver[0m" ; run _set_bm2
++_set_bm2=setenv _set_bm2 ; setenv bootmenu_2 "Boot production system from $bootedfrom.=run boot_production ; run bootmenu_confirm_return" ; run _set_bm3
++_set_bm3=setenv _set_bm3 ; setenv bootmenu_3 "Boot recovery system from $bootedfrom.=run boot_recovery ; run bootmenu_confirm_return" ; run _set_bm4
++_set_bm4=setenv _set_bm4 ; setenv bootmenu_4 "Load production system via TFTP then write to $bootedfrom.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return" ; run _set_bm5
++_set_bm5=setenv _set_bm5 ; setenv bootmenu_5 "Load recovery system via TFTP then write to $bootedfrom.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return" ; run _set_bm5a
++_set_bm5a=setenv _set_bm5a ; if test "$bootedfrom" = "SD" ; then run _set_bm6 ; else setenv _set_bm6 ; setenv _menu_next 6 ; fi ; run _set_bmr
++_set_bm6=setenv _set_bm6 ; setenv bootmenu_6 "[31mInstall bootloader, recovery and production to eMMC.[0m=run emmc_init ; run bootmenu_confirm_return" ; setenv _menu_next 7
++_set_bmr=setenv _set_bmr ; setenv bootmenu_${_menu_next} "Reboot.=reset" ; setexpr _menu_next ${_menu_next} + 1 ; run _set_bmf
++_set_bmf=setenv _set_bmf ; setenv bootmenu_${_menu_next} "Reset all settings to factory defaults.=run reset_factory ; reset" ; setenv _menu_next
+--- a/arch/arm/dts/mt7623n-bananapi-bpi-r2.dts
++++ b/arch/arm/dts/mt7623n-bananapi-bpi-r2.dts
+@@ -66,6 +66,15 @@
+ 			default-state = "off";
+ 		};
+ 	};
++
++	gpio-keys {
++		compatible = "gpio-keys";
++
++		factory {
++			label = "factory";
++			gpios = <&gpio 256 GPIO_ACTIVE_LOW>;
++		};
++	};
+ };
+ 
+ &eth {
+--- a/board/mediatek/mt7623/mt7623_rfb.c
++++ b/board/mediatek/mt7623/mt7623_rfb.c
+@@ -6,6 +6,17 @@
+ #include <common.h>
+ #include <mmc.h>
+ #include <asm/global_data.h>
++#include <config.h>
++#include <dm.h>
++#include <button.h>
++#include <env.h>
++#include <init.h>
++#include <asm/global_data.h>
++#include <linux/delay.h>
++
++#ifndef CONFIG_RESET_BUTTON_LABEL
++#define CONFIG_RESET_BUTTON_LABEL "reset"
++#endif
+ 
+ DECLARE_GLOBAL_DATA_PTR;
+ 
+@@ -17,6 +28,25 @@ int board_init(void)
+ 	return 0;
+ }
+ 
++int board_late_init(void)
++{
++	struct udevice *dev;
++
++	if (!button_get_by_label(CONFIG_RESET_BUTTON_LABEL, &dev)) {
++		puts("reset button found\n");
++#ifdef CONFIG_RESET_BUTTON_SETTLE_DELAY
++		mdelay(CONFIG_RESET_BUTTON_SETTLE_DELAY);
++#endif
++		if (button_get_state(dev) == BUTTON_ON) {
++			puts("button pushed, resetting environment\n");
++			gd->env_valid = ENV_INVALID;
++		}
++	}
++
++	env_relocate();
++	return 0;
++}
++
+ #ifdef CONFIG_MMC
+ int mmc_get_boot_dev(void)
+ {
+--- a/board/mediatek/mt7623/Kconfig
++++ b/board/mediatek/mt7623/Kconfig
+@@ -10,4 +10,8 @@ config MTK_BROM_HEADER_INFO
+ 	string
+ 	default "lk=1"
+ 
++config RESET_BUTTON_LABEL
++	string "Button to trigger factory reset"
++	default "reset"
++
+ endif


From lede-commits at lists.infradead.org  Mon Jul 19 20:20:10 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 19 Jul 2021 23:20:10 -0400
Subject: [openwrt/openwrt]  mediatek: rework Bananapi BPi-R2
In-Reply-To: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
References: <162675120291.9845.15789921925483112046@git-01.infra.openwrt.org>
Message-ID: <mailman.8723.1626751214.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/86a61e716efe2e0ef2f4ce9b2fdd7a532661ef56

commit 86a61e716efe2e0ef2f4ce9b2fdd7a532661ef56
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat Jul 10 16:35:47 2021 +0100

    mediatek: rework Bananapi BPi-R2
    
     * introduce recovery (=initramfs) vs. production dual boot scheme
     * make use of uImage.FIT (instead of FAT partition)
     * generate images using build steps (instead of external scripts)
     * simplify sysupgrade and config restore (thanks to uImage.FIT)
     * make sure mmc devices are ordered persistently (set DT aliases)
    
    This commit breaks sysupgrade from existing installations, you will
    have to re-install using the sdcard.img.gz image.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/image/Config.in              |   2 +-
 target/linux/mediatek/image/mt7623.mk              | 144 +++++++++++++++------
 target/linux/mediatek/image/mt7623n_bpir2-uEnv.txt |  78 -----------
 .../mt7623/base-files/lib/preinit/79_move_config   |   3 -
 .../mt7623/base-files/lib/upgrade/platform.sh      |  50 +++----
 target/linux/mediatek/mt7623/config-5.10           |   1 +
 .../160-dts-mt7623-bpi-r2-earlycon.patch           |  11 ++
 .../161-dts-mt7623-bpi-r2-mmc-device-order.patch   |  11 ++
 8 files changed, 153 insertions(+), 147 deletions(-)

diff --git a/target/linux/mediatek/image/Config.in b/target/linux/mediatek/image/Config.in
index ef8536ebab..63329d386a 100644
--- a/target/linux/mediatek/image/Config.in
+++ b/target/linux/mediatek/image/Config.in
@@ -1,4 +1,4 @@
 config MTK_BOOT_PARTSIZE
        int "Boot (SD Card/eMMC) filesystem partition size (in MiB)"
-       depends on TARGET_mediatek_mt7623_DEVICE_bpi_bananapi-r2 || TARGET_DEVICE_mediatek_mt7623_DEVICE_bpi_bananapi-r2 || TARGET_mediatek_mt7623_DEVICE_unielec_u7623-emmc || TARGET_DEVICE_mediatek_mt7623_DEVICE_unielec_u7623-emmc
+       depends on TARGET_mediatek_mt7623_DEVICE_unielec_u7623-emmc || TARGET_DEVICE_mediatek_mt7623_DEVICE_unielec_u7623-emmc
        default 32
diff --git a/target/linux/mediatek/image/mt7623.mk b/target/linux/mediatek/image/mt7623.mk
index 56f67c0e89..c404b333ba 100644
--- a/target/linux/mediatek/image/mt7623.mk
+++ b/target/linux/mediatek/image/mt7623.mk
@@ -1,59 +1,123 @@
 KERNEL_LOADADDR := 0x80008000
 DEVICE_VARS += UBOOT_TARGET UBOOT_OFFSET UBOOT_ENVSIZE
 
-ifneq ($(CONFIG_MTK_BOOT_PARTSIZE),)
-BOOTFS_BLOCK_SIZE := 1024
-BOOTFS_BLOCKS := $(shell echo $$(($(CONFIG_MTK_BOOT_PARTSIZE)*1024*1024/$(BOOTFS_BLOCK_SIZE))))
-endif
+# The bootrom of MT7623 expects legacy MediaTek headers present in
+# exactly the location also used for the primary GPT partition table.
+# (*MMC_BOOT and BRLYT)
+# Hence only MSDOS/MBR partitioning can work here.
+#
+#   ------------------------   Sector   Offset
+#   |  MBR + SDMMC_BOOT    |     0       0x0
+#   |----------------------|
+#   |     BRLYT header     |     1       0x200
+#   |----------------------|
+#   .                      .
+#   .                      .
+#   |----------------------|
+#   |                      |     4       0x800
+#   |                      |
+#   |     Preloader        |
+#   .                      .
+#   .                      .
+#   |                      |     639
+#   |----------------------|
+#   |   MBR partition #1   |     640     0x50000
+#   |                      |
+#   |       U-Boot         |
+#   .                      .
+#   .                      .
+#   |                      |     1663
+#   |----------------------|
+#   |   MBR partition #2   |
+#   |                      |
+#   |       Recovery       |
+#   .                      .
+#   .     (uImage.FIT)     .
+#   |                      |
+#   |----------------------|
+#   |   MBR partition #3   |
+#   |                      |
+#   |      Production      |
+#   |                      |
+#   |     (uImage.FIT,     |
+#   .     rootfs_Data.)    .
+#   .                      .
+#   |                      |
+#   ------------------------
+#
+# For eMMC boot, everything up to and including the preloader must be
+# written to /dev/mmcblk0boot0, with the SDMMC_BOOT header changed to
+# read EMMC_BOOT\0 instead.
+#
+# The contents of the main eMMC are identical to the SD card layout,
+# with the preloader loading 512KiB of U-Boot starting at 0x50000.
 
-define Build/mtk-mmc-img
-	rm -f $@.boot
-	mkfs.fat -C $@.boot $(BOOTFS_BLOCKS)
+define Build/mt7623-mbr
+	cp $@ $@.tmp 2>/dev/null || true
+	ptgen -o $@.tmp -h 4 -s 63 -a 0 -l 1024 \
+			-t 0x41	-N uboot	-p 3584k at 320k \
+			-t 0xea	-N recovery	-p 40M at 4M \
+		$(if $(findstring sdmmc,$1), \
+			-t 0x2e -N production	-p 208M at 48M \
+		) \
+		$(if $(findstring emmc,$1), \
+			-t 0x2e -N production	-p 976M at 48M \
+		)
 
-	if [ -r $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-preloader.bin ]; then \
-		./gen_mtk_mmc_img.sh emmc $@.emmc \
-			$(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-preloader.bin; \
-		mcopy -i $@.boot $@.emmc ::eMMCboot.bin; \
-	fi
-	mkenvimage -s $(UBOOT_ENVSIZE) -o $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-uboot.env $(UBOOT_TARGET)-uEnv.txt
-	mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-uboot.env ::uboot.env
-	mcopy -i $@.boot $(IMAGE_KERNEL) ::uImage
-	./gen_mtk_mmc_img.sh sd $@ \
-		$(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-preloader.bin \
-		$(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-u-boot*.bin \
-		$(UBOOT_OFFSET) \
-		$@.boot \
-		$(IMAGE_ROOTFS) \
-		$(CONFIG_MTK_BOOT_PARTSIZE) \
-		$(CONFIG_TARGET_ROOTFS_PARTSIZE)
+	echo -en \
+		$(if $(findstring sdmmc,$1),"SDMMC_BOOT\x00\x00\x01\x00\x00\x00\x00\x02\x00\x00") \
+		$(if $(findstring emmc,$1),"EMMC_BOOT\x00\x00\x00\x01\x00\x00\x00\x00\x02\x00\x00") \
+		| dd bs=1 of="$@.tmp" seek=0 conv=notrunc
+
+	echo -en "BRLYT\x00\x00\x00\x01\x00\x00\x00\x00\x08\x00\x00\x00\x08\x00\x00\x42\x42\x42\x42\x08\x00\x01\x00\x00\x08\x00\x00\x00\x08\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"\
+		| dd bs=1 of="$@.tmp" seek=512 conv=notrunc
+
+	cat $@.tmp >> $@
+	rm $@.tmp
 endef
 
-define Build/preloader
-	$(CP) $(STAGING_DIR_IMAGE)/$1-preloader.bin $@
+define Build/append-preloader
+	cat $(STAGING_DIR_IMAGE)/$1-preloader.bin >> $@
 endef
 
-define Build/scatterfile
-	./gen_scatterfile.sh $(subst mt,MT,$(SUBTARGET)) "$1" \
-		$(subst -scatter.txt,,$(notdir $@)) "$(DEVICE_TITLE)" > $@
+define Build/append-bootloader
+	cat $(STAGING_DIR_IMAGE)/$1-u-boot.bin >> $@
 endef
 
-define Device/bpi_bananapi-r2
-  DEVICE_VENDOR := Bpi
-  DEVICE_MODEL := Banana Pi R2
+define Device/bananapi_bpi-r2
+  DEVICE_VENDOR := Bananapi
+  DEVICE_MODEL := BPi-R2
   DEVICE_DTS := mt7623n-bananapi-bpi-r2
-  DEVICE_PACKAGES := kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 kmod-mmc \
-	mkf2fs e2fsprogs kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk
-  UBOOT_ENVSIZE := 0x2000
+  DEVICE_PACKAGES := kmod-mmc mkf2fs e2fsprogs kmod-usb3 kmod-ata-ahci
+  UBOOT_ENVSIZE := 0x10000
   UBOOT_OFFSET := 320k
   UBOOT_TARGET := mt7623n_bpir2
-  IMAGES := img.gz
-  IMAGE/img.gz := mtk-mmc-img | gzip | append-metadata
-  ARTIFACT/preloader.bin := preloader $$(UBOOT_TARGET)
-  ARTIFACT/scatter.txt := scatterfile $$(firstword $$(FILESYSTEMS))-$$(firstword $$(IMAGES))
-  ARTIFACTS = preloader.bin scatter.txt
+  UBOOT_PATH := $(STAGING_DIR_IMAGE)/mt7623n_bpir2-u-boot.bin
+  IMAGES := sysupgrade.itb
+  KERNEL := kernel-bin | gzip
+  KERNEL_INITRAMFS_SUFFIX := -recovery.itb
+  KERNEL_INITRAMFS := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb with-initrd
+  IMAGE/sysupgrade.itb := append-kernel | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb external-static-with-rootfs | append-metadata
+  ARTIFACT/preloader.bin := append-preloader $$(UBOOT_TARGET)
+  ARTIFACT/u-boot.bin := append-uboot
+  ARTIFACT/sdcard.img.gz := mt7623-mbr sdmmc |\
+			    pad-to 2k | append-preloader $$(UBOOT_TARGET) |\
+			    pad-to 320k | append-bootloader $$(UBOOT_TARGET) |\
+			    pad-to 4092k | mt7623-mbr emmc |\
+			    pad-to 4M | append-image-stage initramfs-recovery.itb |\
+			    pad-to 48M | append-image squashfs-sysupgrade.itb |\
+			    gzip
+  ARTIFACTS = u-boot.bin preloader.bin scatter.txt sdcard.img.gz
   SUPPORTED_DEVICES := bananapi,bpi-r2
 endef
-TARGET_DEVICES += bpi_bananapi-r2
+TARGET_DEVICES += bananapi_bpi-r2
+
+
+
+define Build/scatterfile
+	./gen_scatterfile.sh $(subst mt,MT,$(SUBTARGET)) "$1" \
+		$(subst -scatter.txt,,$(notdir $@)) "$(DEVICE_TITLE)" > $@
+endef
 
 # Full eMMC image including U-Boot and partition table
 define Device/unielec_u7623-emmc
diff --git a/target/linux/mediatek/image/mt7623n_bpir2-uEnv.txt b/target/linux/mediatek/image/mt7623n_bpir2-uEnv.txt
deleted file mode 100644
index f260ed9176..0000000000
--- a/target/linux/mediatek/image/mt7623n_bpir2-uEnv.txt
+++ /dev/null
@@ -1,78 +0,0 @@
-# Boot menu for Banana Pi R2
-# Copyright ? 2020 David Woodhouse <dwmw2 at infradead.org>
-
-kernel=uImage
-loadaddr=0x88000000
-dtaddr=0x83f00000
-fdt_high=0xffffffff
-
-console=ttyS2,115200
-bootopts=rootfstype=squashfs,ext4 rootwait
-
-# Create the command line (with appropriate root=) and boot the Linux FIT image.
-boot1=setenv bootargs "console=${console} root=${rootdev} ${bootopts}";printenv bootargs;\
- fatload mmc ${partition} ${loadaddr} ${kernel}; bootm
-
-# The preloader leaves a breadcrumb behind to say what it booted from.
-checkbootedfrom=if itest.l *81dffff0 == 434d4d65 ; then setenv bootedfrom eMMC; else setenv bootedfrom SD; fi;
-
-# Build the boot menu one item at a time
-bm_count=0
-checkkernel=test -e mmc ${bm_part} ${kernel}
-addbm=if run checkkernel; then setenv bootmenu_${bm_count} "Boot from ${bm_dev}.=setenv partition ${bm_part};setenv rootdev ${bm_root};run boot1";if test "${bootedfrom}" = "${bm_dev}"; then setenv bootmenu_default ${bm_count};fi;setexpr bm_count ${bm_count} + 1; fi
-# Here we assume that SD card id mmcblk1 and eMMC is mmcblk0 in linux. Swap them if your DTS define them in reverse order.
-addeMMCbm=setenv bm_part 0:2;setenv bm_root /dev/mmcblk0p3;setenv bm_dev eMMC;run addbm
-addSDbm=setenv bm_part 1:2;setenv bm_root /dev/mmcblk1p3;setenv bm_dev SD;run addbm
-addinstallbm=if test "${bootedfrom}" = "SD";then run checkinstall; if run validparts; then setenv bootmenu_${bm_count} "Install OpenWrt from SD to internal eMMC.=run doinstall";setexpr bm_count ${bm_count} + 1;fi;fi
-
-runbootmenu=if test "${bootedfrom}" = "";then run checkbootedfrom;fi;\
- setenv bm_count 0;run addeMMCbm;run addSDbm;run addinstallbm;setenv bootmenu_${bm_count};\
- bootmenu
-
-bootdelay=0
-bootcmd=run checkbootedfrom;run runbootmenu
-
-# XX: Can we read this from the device, or must we trust they're all the same as mine?
-# Probably not that important as we're unlikely ever to hit the limit anyway.
-maxsect=0xe8ffff
-validparts=false
-
-# We could use 'part size' here but I'd like to check the types too.
-checkinstall=mmc dev 1;\
- mmc read 0x88000002 0 1;\
- setenv validparts true;\
- test -e mmc 1:2 eMMCboot.bin || setenv validparts false && echo "eMMCboot.bin not present on SD partition 2";\
- if run validparts && itest.b *0x880001c4 != 0x41; then echo "SD partition 1 is not a PReP Boot partition"; setenv validparts false; fi;\
- if run validparts && itest.l *0x880001c8 != 0x280; then echo "SD partition 1 does not start at 320KiB for U-Boot"; mmc part; exit; fi;\
- if run validparts && itest.l *0x880001cc != 0x400; then echo "SD partition 1 is not 512KiB in size for U-Boot"; mmc part; exit; fi;\
- if run validparts && itest.b *0x880001d4 != 0x0c; then echo "SD partition 2 is not a FAT32 partition"; setenv validparts false; fi;\
- if run validparts && itest.b *0x880001e4 != 0x83; then echo "SD partition 3 is not a Linux partition"; setenv validparts false; fi;\
- setexpr.l part2_start *0x880001d8;setexpr.l part2_len *0x880001dc;setexpr.l part3_start *0x880001e8;setexpr.l part3_len *0x880001ec;\
- if run validparts && test 0x${part2_start} -gt ${maxsect}; then echo "SD partition 2 start too high"; setenv validparts false; fi;\
- if run validparts && test 0x${part2_len} -gt ${maxsect}; then echo "SD partition 2 is too large"; setenv validparts false; fi;\
- if run validparts && test 0x${part3_start} -gt ${maxsect}; then echo "SD partition 3 start too high"; setenv validparts false; fi;\
- if run validparts && test 0x${part3_len} -gt ${maxsect}; then echo "SD partition 2 is too large"; setenv validparts false; fi;\
- setexpr.l part2_end 0x$(part2_start} + 0x${part2_len};setexpr.l part3_end 0x${part3_start} + 0x${part3_len};\
- if run validparts && test 0x${part2_end} -ge ${maxsect}; then echo "SD partition 2 end too high"; setenv validparts false; fi;\
- if run validparts && test 0x${part3_end} -ge ${maxsect}; then echo "SD partition 3 end too high"; setenv validparts false; fi;
-
-# Copy a single chunk, up to 0x8000 sectors / 16MiB, from SD to eMMC at the specified offset.
-writechunk=setenv thislen 8000; if test 0x${partlen} -lt 0x${thislen}; then setenv thislen ${partlen};fi;\
- mmc dev 1;mmc read ${loadaddr} 0x${partofs} 0x${thislen};\
- mmc dev 0; mmc write ${loadaddr} 0x${partofs} 0x${thislen};\
- setexpr partofs 0x${partofs} + 0x${thislen};setexpr partlen 0x${partlen} - 0x${thislen}
-
-# Copy a partition defined by ${partofs} / ${partlen} from SD to eMMC
-writepart=while test 0x${partlen} -ne 0; do run writechunk; done
-
-# Configure the eMMC boot partition and write eMMCboot.bin to it
-writeboot=mmc partconf 0 1 1 0;fatload mmc 1:2 ${loadaddr} eMMCboot.bin;\
- setexpr filesize ${filesize} + 0x1ff;setexpr blocks ${filesize} / 0x200;\
- mmc dev 0 1;mmc write ${loadaddr} 0 ${blocks}
-
-# Install OpenWrt from the SD card to internal eMMC.
-doinstall=run checkinstall;if run validparts;then run writeboot;\
- echo "Copying preloader and U-Boot";setenv partofs 0;setenv partlen 680;run writepart;\
- echo "Copying FAT boot partition";setenv partofs ${part2_start};setenv partlen ${part2_len};run writepart;\
- echo "Copying root partition";setenv partofs ${part3_start};setenv partlen ${part3_len};run writepart;\
- echo "Installed OpenWrt to eMMC";setenv bootedfrom eMMC;run runbootmenu;fi
diff --git a/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config b/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config
index f47894c0fd..9dfb06bd81 100644
--- a/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config
+++ b/target/linux/mediatek/mt7623/base-files/lib/preinit/79_move_config
@@ -6,9 +6,6 @@ move_config() {
 	local partdev partnum
 
 	case $(board_name) in
-	bananapi,bpi-r2)
-		partnum=2
-		;;
 	unielec,u7623-02-emmc-512m)
 		if grep -q root=/dev/mmcblk0p2 /proc/cmdline; then
 			partnum=1;
diff --git a/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
index d3da22d496..4564bc61dd 100755
--- a/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/mt7623/base-files/lib/upgrade/platform.sh
@@ -1,5 +1,6 @@
 
 REQUIRE_IMAGE_METADATA=1
+RAMFS_COPY_BIN='blockdev'
 
 # Full system upgrade including preloader for MediaTek SoCs on eMMC or SD
 mtk_mmc_full_upgrade() {
@@ -83,7 +84,18 @@ platform_do_upgrade() {
 
 	case "$board" in
 	bananapi,bpi-r2)
-		mtk_mmc_full_upgrade "$1"
+		export_bootdevice
+		export_partdevice rootdev 0
+		export_partdevice fitpart 3
+		[ "$fitpart" ] || return 1
+		dd if=/dev/zero of=/dev/$fitpart bs=4096 count=1 2>/dev/null
+		blockdev --rereadpt /dev/$rootdev
+		get_image "$1" | dd of=/dev/$fitpart
+		blockdev --rereadpt /dev/$rootdev
+		local datapart=$(get_partition_by_name $rootdev "rootfs_data")
+		[ "$datapart" ] || return 0
+		dd if=/dev/zero of=/dev/$datapart bs=4096 count=1 2>/dev/null
+		echo $datapart > /tmp/sysupgrade.datapart
 		;;
 
 	unielec,u7623-02-emmc-512m)
@@ -126,32 +138,10 @@ platform_check_image() {
 
 	case "$board" in
 	bananapi,bpi-r2)
-		[ "$magic" != "53444d4d" ] && {
+		[ "$magic" != "d00dfeed" ] && {
 			echo "Invalid image type."
 			return 1
 		}
-		export_bootdevice && export_partdevice diskdev 0 || {
-			echo "Unable to determine upgrade device"
-			return 1
-		    }
-
-		get_partitions "/dev/$diskdev" bootdisk
-
-		#extract the boot sector from the image
-		get_image "$@" | dd of=/tmp/image.bs count=1 bs=512b 2>/dev/null
-
-		get_partitions /tmp/image.bs image
-
-		#compare tables
-		diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
-
-		rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image
-
-		if [ -n "$diff" ]; then
-			echo "Partition layout has changed. Full image will be written."
-			ask_bool 0 "Abort" && exit 1
-			return 0
-		fi
 		;;
 	unielec,u7623-02-emmc-512m)
 		# Can always upgrade to the new-style full image
@@ -180,9 +170,19 @@ platform_check_image() {
 	return 0
 }
 
+platform_copy_config_mmc() {
+	[ -e "$UPGRADE_BACKUP" ] || return
+	local datapart=$(cat /tmp/sysupgrade.datapart)
+	[ "$datapart" ] || echo "no rootfs_data partition, cannot keep configuration." >&2
+	dd if="$UPGRADE_BACKUP" of=/dev/$datapart
+	sync
+}
+
 platform_copy_config() {
 	case "$(board_name)" in
-	bananapi,bpi-r2|\
+	bananapi,bpi-r2)
+		platform_copy_config_mmc
+		;;
 	unielec,u7623-02-emmc-512m)
 		# platform_do_upgrade() will have set $recoverydev
 		if [ -n "$recoverydev" ]; then
diff --git a/target/linux/mediatek/mt7623/config-5.10 b/target/linux/mediatek/mt7623/config-5.10
index 4a43b51675..ca1f92ae78 100644
--- a/target/linux/mediatek/mt7623/config-5.10
+++ b/target/linux/mediatek/mt7623/config-5.10
@@ -229,6 +229,7 @@ CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT_MAP=y
+CINFIG_HAVE_ARM_ARCH_TIMER=y
 CONFIG_HAVE_SMP=y
 CONFIG_HDMI=y
 CONFIG_HIGHMEM=y
diff --git a/target/linux/mediatek/patches-5.10/160-dts-mt7623-bpi-r2-earlycon.patch b/target/linux/mediatek/patches-5.10/160-dts-mt7623-bpi-r2-earlycon.patch
new file mode 100644
index 0000000000..bd386c8420
--- /dev/null
+++ b/target/linux/mediatek/patches-5.10/160-dts-mt7623-bpi-r2-earlycon.patch
@@ -0,0 +1,11 @@
+--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
++++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+@@ -19,7 +19,7 @@
+ 
+ 	chosen {
+ 		stdout-path = "serial2:115200n8";
+-		bootargs = "console=ttyS2,115200n8";
++		bootargs = "earlycon=uart8250,mmio32,0x11004000 console=ttyS2,115200n8";
+ 	};
+ 
+ 	connector {
diff --git a/target/linux/mediatek/patches-5.10/161-dts-mt7623-bpi-r2-mmc-device-order.patch b/target/linux/mediatek/patches-5.10/161-dts-mt7623-bpi-r2-mmc-device-order.patch
new file mode 100644
index 0000000000..d1bafc1526
--- /dev/null
+++ b/target/linux/mediatek/patches-5.10/161-dts-mt7623-bpi-r2-mmc-device-order.patch
@@ -0,0 +1,11 @@
+--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
++++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
+@@ -15,6 +15,8 @@
+ 
+ 	aliases {
+ 		serial2 = &uart2;
++		mmc0 = &mmc0;
++		mmc1 = &mmc1;
+ 	};
+ 
+ 	chosen {


From lede-commits at lists.infradead.org  Tue Jul 20 09:01:37 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 20 Jul 2021 12:01:37 -0400
Subject: [openwrt/openwrt] uboot-mediatek: fix board name of Bananapi BPi-R2
In-Reply-To: <162679689743.21529.10057926968360407067@git-01.infra.openwrt.org>
References: <162679689743.21529.10057926968360407067@git-01.infra.openwrt.org>
Message-ID: <mailman.8889.1626796901.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/025c0bcd601698206d8f5ededadb25beb95ebdb7

commit 025c0bcd601698206d8f5ededadb25beb95ebdb7
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Jul 20 16:58:50 2021 +0100

    uboot-mediatek: fix board name of Bananapi BPi-R2
    
    As the board name was changed to be identical to the device tree
    compatible string (just like for other boards), also reflect that
    change for U-Boot.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-mediatek/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile
index 673b4d2aed..37af42e664 100644
--- a/package/boot/uboot-mediatek/Makefile
+++ b/package/boot/uboot-mediatek/Makefile
@@ -85,7 +85,7 @@ endef
 
 define U-Boot/mt7623n_bpir2
   NAME:=Banana Pi R2 (mt7623)
-  BUILD_DEVICES:=bpi_bananapi-r2
+  BUILD_DEVICES:=bananapi_bpi-r2
   BUILD_SUBTARGET:=mt7623
   UBOOT_IMAGE:=u-boot.bin
   UBOOT_CONFIG:=mt7623n_bpir2


From lede-commits at lists.infradead.org  Tue Jul 20 09:01:38 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 20 Jul 2021 12:01:38 -0400
Subject: [openwrt/openwrt]  mediatek: drop kmod-mmc
In-Reply-To: <162679689743.21529.10057926968360407067@git-01.infra.openwrt.org>
References: <162679689743.21529.10057926968360407067@git-01.infra.openwrt.org>
Message-ID: <mailman.8890.1626796901.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/ddec752890022794a9c035356d7e13e9889a03db

commit ddec752890022794a9c035356d7e13e9889a03db
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Jul 20 17:00:11 2021 +0100

    mediatek: drop kmod-mmc
    
    Support for MMC is built-into the kernel anyway, no need to select the
    (empty/stub) kmod package.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/image/mt7623.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mediatek/image/mt7623.mk b/target/linux/mediatek/image/mt7623.mk
index c404b333ba..166086b88e 100644
--- a/target/linux/mediatek/image/mt7623.mk
+++ b/target/linux/mediatek/image/mt7623.mk
@@ -88,7 +88,7 @@ define Device/bananapi_bpi-r2
   DEVICE_VENDOR := Bananapi
   DEVICE_MODEL := BPi-R2
   DEVICE_DTS := mt7623n-bananapi-bpi-r2
-  DEVICE_PACKAGES := kmod-mmc mkf2fs e2fsprogs kmod-usb3 kmod-ata-ahci
+  DEVICE_PACKAGES := mkf2fs e2fsprogs kmod-usb3 kmod-ata-ahci
   UBOOT_ENVSIZE := 0x10000
   UBOOT_OFFSET := 320k
   UBOOT_TARGET := mt7623n_bpir2


From lede-commits at lists.infradead.org  Tue Jul 20 09:04:41 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 20 Jul 2021 12:04:41 -0400
Subject: [openwrt/openwrt]  mediatek: fix typo in kernel mt7623/config-5.10
In-Reply-To: <162679708129.23870.4192861818378304210@git-01.infra.openwrt.org>
References: <162679708129.23870.4192861818378304210@git-01.infra.openwrt.org>
Message-ID: <mailman.8891.1626797087.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/27deb35af3cfa1dda5a635016fa852c8d201e81f

commit 27deb35af3cfa1dda5a635016fa852c8d201e81f
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Jul 20 17:02:49 2021 +0100

    mediatek: fix typo in kernel mt7623/config-5.10
    
    Fix typo reported by github user @mans0n.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/mt7623/config-5.10 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mediatek/mt7623/config-5.10 b/target/linux/mediatek/mt7623/config-5.10
index ca1f92ae78..4e240b560d 100644
--- a/target/linux/mediatek/mt7623/config-5.10
+++ b/target/linux/mediatek/mt7623/config-5.10
@@ -229,7 +229,7 @@ CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT_MAP=y
-CINFIG_HAVE_ARM_ARCH_TIMER=y
+CONFIG_HAVE_ARM_ARCH_TIMER=y
 CONFIG_HAVE_SMP=y
 CONFIG_HDMI=y
 CONFIG_HIGHMEM=y


From lede-commits at lists.infradead.org  Tue Jul 20 10:39:05 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 20 Jul 2021 13:39:05 -0400
Subject: [openwrt/openwrt] linux/rockchip: update the USB 3.0 controller
 node patch
In-Reply-To: <162680274589.3667.1018298054194128540@git-01.infra.openwrt.org>
References: <162680274589.3667.1018298054194128540@git-01.infra.openwrt.org>
Message-ID: <mailman.8902.1626802751.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f7ab41acc98682d818a9da997ee5a888b8076656

commit f7ab41acc98682d818a9da997ee5a888b8076656
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Tue Jul 20 16:24:50 2021 +0100

    linux/rockchip: update the USB 3.0 controller node patch
    
    This has been added in Linux 5.10.51 [1], but it's broken/incomplete. Update our
    patch and refresh the remaining patches.
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.51&id=421aff50af5e4cdc56b3ac8d6b670e09697bc8ac
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 ...-mac-address-support-to-of_get_mac_addres.patch | 13 +++------
 ...-of_net-add-mac-address-increment-support.patch |  9 ++----
 ...-add-usb3-controller-node-for-RK3328-SoCs.patch | 32 ++++++++++++++--------
 3 files changed, 26 insertions(+), 28 deletions(-)

diff --git a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
index 44a6b6a047..9e16564953 100644
--- a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
+++ b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
@@ -15,8 +15,6 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  drivers/of/of_net.c | 75 ++++++++++++++++++++++++++++++++++++++++++++-
  1 file changed, 74 insertions(+), 1 deletion(-)
 
-diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
-index 6e411821583e..f072e2509cc9 100644
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
 @@ -11,6 +11,7 @@
@@ -27,7 +25,7 @@ index 6e411821583e..f072e2509cc9 100644
  
  /**
   * of_get_phy_mode - Get phy mode for given device_node
-@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node *np, phy_interface_t *interface)
+@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node *
  }
  EXPORT_SYMBOL_GPL(of_get_phy_mode);
  
@@ -36,7 +34,7 @@ index 6e411821583e..f072e2509cc9 100644
  {
  	struct property *pp = of_find_property(np, name, NULL);
  
-@@ -78,6 +79,70 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
+@@ -78,6 +79,70 @@ static const void *of_get_mac_addr_nvmem
  	return mac;
  }
  
@@ -107,7 +105,7 @@ index 6e411821583e..f072e2509cc9 100644
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
   * checked first, because that is supposed to contain to "most recent" MAC
-@@ -98,6 +163,10 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
+@@ -98,6 +163,10 @@ static const void *of_get_mac_addr_nvmem
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
   *
@@ -118,7 +116,7 @@ index 6e411821583e..f072e2509cc9 100644
   * Return: Will be a valid pointer on success and ERR_PTR in case of error.
  */
  const void *of_get_mac_address(struct device_node *np)
-@@ -116,6 +185,10 @@ const void *of_get_mac_address(struct device_node *np)
+@@ -116,6 +185,10 @@ const void *of_get_mac_address(struct de
  	if (addr)
  		return addr;
  
@@ -129,6 +127,3 @@ index 6e411821583e..f072e2509cc9 100644
  	return of_get_mac_addr_nvmem(np);
  }
  EXPORT_SYMBOL(of_get_mac_address);
--- 
-2.30.2
-
diff --git a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
index 1c08e23699..0776d7bccc 100644
--- a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
+++ b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
@@ -18,11 +18,9 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  drivers/of/of_net.c | 59 ++++++++++++++++++++++++++++++++++-----------
  1 file changed, 45 insertions(+), 14 deletions(-)
 
-diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
-index f072e2509cc9..0dbd1f7ef396 100644
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
-@@ -55,31 +55,36 @@ static void *of_get_mac_addr(struct device_node *np, const char *name)
+@@ -55,31 +55,36 @@ static void *of_get_mac_addr(struct devi
  	return NULL;
  }
  
@@ -67,7 +65,7 @@ index f072e2509cc9..0dbd1f7ef396 100644
  {
  #ifdef CONFIG_MTD
  	struct device_node *mtd_np = NULL;
-@@ -167,28 +172,54 @@ static const void *of_get_mac_address_mtd(struct device_node *np)
+@@ -167,28 +172,54 @@ free:
   * If a mtd-mac-address property exists, try to fetch the MAC address from the
   * specified mtd device, and store it as a 'mac-address' property
   *
@@ -128,6 +126,3 @@ index f072e2509cc9..0dbd1f7ef396 100644
 +	return addr;
  }
  EXPORT_SYMBOL(of_get_mac_address);
--- 
-2.30.2
-
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 54036c0f6b..2dd6e40ebf 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,20 +26,30 @@ use-case. You've been warned.
 
 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
 +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
-@@ -1003,6 +1003,33 @@
- 		status = "disabled";
+@@ -985,22 +985,30 @@
  	};
  
-+	usbdrd3: usb at ff600000 {
+ 	usbdrd3: usb at ff600000 {
+-		compatible = "rockchip,rk3328-dwc3", "snps,dwc3";
+-		reg = <0x0 0xff600000 0x0 0x100000>;
+-		interrupts = <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
 +		compatible = "rockchip,rk3328-dwc3", "rockchip,rk3399-dwc3";
-+		clocks = <&cru SCLK_USB3OTG_REF>, <&cru SCLK_USB3OTG_SUSPEND>,
-+			 <&cru ACLK_USB3OTG>;
-+		clock-names = "ref_clk", "suspend_clk",
-+			      "bus_clk";
+ 		clocks = <&cru SCLK_USB3OTG_REF>, <&cru SCLK_USB3OTG_SUSPEND>,
+ 			 <&cru ACLK_USB3OTG>;
+ 		clock-names = "ref_clk", "suspend_clk",
+ 			      "bus_clk";
+-		dr_mode = "otg";
+-		phy_type = "utmi_wide";
+-		snps,dis-del-phy-power-chg-quirk;
+-		snps,dis_enblslpm_quirk;
+-		snps,dis-tx-ipgap-linecheck-quirk;
+-		snps,dis-u2-freeclk-exists-quirk;
+-		snps,dis_u2_susphy_quirk;
+-		snps,dis_u3_susphy_quirk;
 +		#address-cells = <2>;
 +		#size-cells = <2>;
 +		ranges;
-+		status = "disabled";
+ 		status = "disabled";
 +
 +		usbdrd_dwc3: dwc3 at ff600000 {
 +			compatible = "snps,dwc3";
@@ -55,8 +65,6 @@ use-case. You've been warned.
 +			snps,dis-tx-ipgap-linecheck-quirk;
 +			status = "disabled";
 +		};
-+	};
-+
+ 	};
+ 
  	gic: interrupt-controller at ff811000 {
- 		compatible = "arm,gic-400";
- 		#interrupt-cells = <3>;


From lede-commits at lists.infradead.org  Wed Jul 21 02:29:06 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 21 Jul 2021 05:29:06 -0400
Subject: [openwrt/openwrt]  mediatek: remove ext4 images from mt7623 build
In-Reply-To: <162685974613.22849.4789843976029640692@git-01.infra.openwrt.org>
References: <162685974613.22849.4789843976029640692@git-01.infra.openwrt.org>
Message-ID: <mailman.9020.1626859752.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/fe7596192e24aadeb163db6bb7078702171d319c

commit fe7596192e24aadeb163db6bb7078702171d319c
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Jul 20 18:43:56 2021 +0100

    mediatek: remove ext4 images from mt7623 build
    
    A full read-write rootfs cannot work inside uImage.FIT as the hash
    will obviously change once writing to it. Disable generating ext4
    rootfs images.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/mt7623/target.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mediatek/mt7623/target.mk b/target/linux/mediatek/mt7623/target.mk
index 224934caa3..8413acb263 100644
--- a/target/linux/mediatek/mt7623/target.mk
+++ b/target/linux/mediatek/mt7623/target.mk
@@ -8,7 +8,7 @@ BOARDNAME:=MT7623
 CPU_TYPE:=cortex-a7
 CPU_SUBTYPE:=neon-vfpv4
 KERNELNAME:=Image dtbs zImage
-FEATURES+=ext4 usb
+FEATURES+=usb
 KERNEL_PATCHVER:=5.10
 DEFAULT_PACKAGES+=blockdev uboot-envtools
 


From lede-commits at lists.infradead.org  Wed Jul 21 02:29:07 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 21 Jul 2021 05:29:07 -0400
Subject: [openwrt/openwrt] mediatek: mt7623: add back needed build steps for
 U7623 board
In-Reply-To: <162685974613.22849.4789843976029640692@git-01.infra.openwrt.org>
References: <162685974613.22849.4789843976029640692@git-01.infra.openwrt.org>
Message-ID: <mailman.9021.1626859752.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/c5b3c13b6030ef2d7e6e40df2b3e778077e15811

commit c5b3c13b6030ef2d7e6e40df2b3e778077e15811
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Jul 21 10:26:44 2021 +0100

    mediatek: mt7623: add back needed build steps for U7623 board
    
    When reworking the BPi-R2 the mtk-mmc-img build step was removed
    despite it was still needed to build the image for the UniElec U7623
    board. Add it back for now until U7623 gets its facelift.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/image/mt7623.mk | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/target/linux/mediatek/image/mt7623.mk b/target/linux/mediatek/image/mt7623.mk
index 166086b88e..00c1ac4443 100644
--- a/target/linux/mediatek/image/mt7623.mk
+++ b/target/linux/mediatek/image/mt7623.mk
@@ -113,6 +113,27 @@ endef
 TARGET_DEVICES += bananapi_bpi-r2
 
 
+define Build/mtk-mmc-img
+	rm -f $@.boot
+	mkfs.fat -C $@.boot $(BOOTFS_BLOCKS)
+
+	if [ -r $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-preloader.bin ]; then \
+		./gen_mtk_mmc_img.sh emmc $@.emmc \
+			$(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-preloader.bin; \
+		mcopy -i $@.boot $@.emmc ::eMMCboot.bin; \
+	fi
+	mkenvimage -s $(UBOOT_ENVSIZE) -o $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-uboot.env $(UBOOT_TARGET)-uEnv.txt
+	mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-uboot.env ::uboot.env
+	mcopy -i $@.boot $(IMAGE_KERNEL) ::uImage
+	./gen_mtk_mmc_img.sh sd $@ \
+		$(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-preloader.bin \
+		$(STAGING_DIR_IMAGE)/$(UBOOT_TARGET)-u-boot*.bin \
+		$(UBOOT_OFFSET) \
+		$@.boot \
+		$(IMAGE_ROOTFS) \
+		$(CONFIG_MTK_BOOT_PARTSIZE) \
+		$(CONFIG_TARGET_ROOTFS_PARTSIZE)
+endef
 
 define Build/scatterfile
 	./gen_scatterfile.sh $(subst mt,MT,$(SUBTARGET)) "$1" \


From lede-commits at lists.infradead.org  Wed Jul 21 02:39:55 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 21 Jul 2021 05:39:55 -0400
Subject: [openwrt/openwrt]  bmips: fix missing NVMEM subsystem
In-Reply-To: <162686039591.448.153984762922124400@git-01.infra.openwrt.org>
References: <162686039591.448.153984762922124400@git-01.infra.openwrt.org>
Message-ID: <mailman.9024.1626860400.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f33fbfa4de3fb1d2e8a0341683e0eb4da40365ef

commit f33fbfa4de3fb1d2e8a0341683e0eb4da40365ef
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Wed Jul 21 10:28:50 2021 +0200

    bmips: fix missing NVMEM subsystem
    
    MAC address retrieval was switched to more generic upstream (5.13) NVMEM
    based solution in commit 32adbfc789f6 ("bmips: convert mtd-mac-address
    to nvmem implementation"), but NVMEM subsystem wasn't enabled in the
    kernel, so fix it now.
    
    References: https://github.com/openwrt/openwrt/pull/4041#issuecomment-883322801
    Fixes: 32adbfc789f6 ("bmips: convert mtd-mac-address to nvmem implementation")
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 target/linux/bmips/config-5.10 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/bmips/config-5.10 b/target/linux/bmips/config-5.10
index 58f40951d3..f10768f99e 100644
--- a/target/linux/bmips/config-5.10
+++ b/target/linux/bmips/config-5.10
@@ -194,6 +194,7 @@ CONFIG_NET_SWITCHDEV=y
 CONFIG_NO_EXCEPT_FILL=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NR_CPUS=2
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y


From lede-commits at lists.infradead.org  Wed Jul 21 02:39:56 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 21 Jul 2021 05:39:56 -0400
Subject: [openwrt/openwrt]  ramips: fix missing NVMEM subsystem
In-Reply-To: <162686039591.448.153984762922124400@git-01.infra.openwrt.org>
References: <162686039591.448.153984762922124400@git-01.infra.openwrt.org>
Message-ID: <mailman.9025.1626860401.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/373c08bcbb08b49715919597ed400abb4dd169c9

commit 373c08bcbb08b49715919597ed400abb4dd169c9
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed Jul 21 10:28:50 2021 +0200

    ramips: fix missing NVMEM subsystem
    
    MAC address retrieval was switched to more generic upstream (5.13) NVMEM
    based solution in commit 06bb4a5018cd ("ramips: convert mtd-mac-address
    to nvmem implementation") , but NVMEM subsystem wasn't enabled in the
    kernel, so fix it now.
    
    References: https://github.com/openwrt/openwrt/pull/4041#issuecomment-883322801
    Fixes: 06bb4a5018cd ("ramips: convert mtd-mac-address to nvmem implementation")
    Signed-off-by: David Bauer <mail at david-bauer.net>
    Signed-off-by: Petr ?tetiar <ynezz at true.cz> [commit message]
---
 target/linux/ramips/mt7620/config-5.10 | 1 +
 target/linux/ramips/mt7620/config-5.4  | 1 +
 target/linux/ramips/mt7621/config-5.10 | 1 +
 target/linux/ramips/mt7621/config-5.4  | 1 +
 target/linux/ramips/mt76x8/config-5.10 | 1 +
 target/linux/ramips/mt76x8/config-5.4  | 1 +
 target/linux/ramips/rt288x/config-5.10 | 1 +
 target/linux/ramips/rt288x/config-5.4  | 1 +
 target/linux/ramips/rt305x/config-5.10 | 1 +
 target/linux/ramips/rt305x/config-5.4  | 1 +
 target/linux/ramips/rt3883/config-5.10 | 1 +
 target/linux/ramips/rt3883/config-5.4  | 1 +
 12 files changed, 12 insertions(+)

diff --git a/target/linux/ramips/mt7620/config-5.10 b/target/linux/ramips/mt7620/config-5.10
index 391449cc51..f91d01bbd8 100644
--- a/target/linux/ramips/mt7620/config-5.10
+++ b/target/linux/ramips/mt7620/config-5.10
@@ -129,6 +129,7 @@ CONFIG_NET_RALINK_SOC=y
 # CONFIG_NET_VENDOR_MEDIATEK is not set
 CONFIG_NET_VENDOR_RALINK=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/ramips/mt7620/config-5.4 b/target/linux/ramips/mt7620/config-5.4
index ca96f09c5b..d6d8ef483f 100644
--- a/target/linux/ramips/mt7620/config-5.4
+++ b/target/linux/ramips/mt7620/config-5.4
@@ -131,6 +131,7 @@ CONFIG_NET_RALINK_SOC=y
 # CONFIG_NET_VENDOR_MEDIATEK is not set
 CONFIG_NET_VENDOR_RALINK=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/ramips/mt7621/config-5.10 b/target/linux/ramips/mt7621/config-5.10
index 92165590f6..b02e59588f 100644
--- a/target/linux/ramips/mt7621/config-5.10
+++ b/target/linux/ramips/mt7621/config-5.10
@@ -190,6 +190,7 @@ CONFIG_NET_VENDOR_MEDIATEK=y
 CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_NR_CPUS=4
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/ramips/mt7621/config-5.4 b/target/linux/ramips/mt7621/config-5.4
index 0ce300c138..f303d354a8 100644
--- a/target/linux/ramips/mt7621/config-5.4
+++ b/target/linux/ramips/mt7621/config-5.4
@@ -180,6 +180,7 @@ CONFIG_NET_SWITCHDEV=y
 CONFIG_NET_VENDOR_MEDIATEK=y
 # CONFIG_NET_VENDOR_RALINK is not set
 CONFIG_NR_CPUS=4
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/ramips/mt76x8/config-5.10 b/target/linux/ramips/mt76x8/config-5.10
index 3a42a5770f..fd1e03685e 100644
--- a/target/linux/ramips/mt76x8/config-5.10
+++ b/target/linux/ramips/mt76x8/config-5.10
@@ -124,6 +124,7 @@ CONFIG_NET_RALINK_SOC=y
 # CONFIG_NET_VENDOR_MEDIATEK is not set
 CONFIG_NET_VENDOR_RALINK=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/ramips/mt76x8/config-5.4 b/target/linux/ramips/mt76x8/config-5.4
index c69f120899..5b9792b30e 100644
--- a/target/linux/ramips/mt76x8/config-5.4
+++ b/target/linux/ramips/mt76x8/config-5.4
@@ -124,6 +124,7 @@ CONFIG_NET_RALINK_SOC=y
 # CONFIG_NET_VENDOR_MEDIATEK is not set
 CONFIG_NET_VENDOR_RALINK=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/ramips/rt288x/config-5.10 b/target/linux/ramips/rt288x/config-5.10
index 88d06266b9..03b38fcad4 100644
--- a/target/linux/ramips/rt288x/config-5.10
+++ b/target/linux/ramips/rt288x/config-5.10
@@ -112,6 +112,7 @@ CONFIG_NET_RALINK_SOC=y
 CONFIG_NET_VENDOR_RALINK=y
 CONFIG_NLS=m
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/ramips/rt288x/config-5.4 b/target/linux/ramips/rt288x/config-5.4
index d0de43e29c..2ddcb15741 100644
--- a/target/linux/ramips/rt288x/config-5.4
+++ b/target/linux/ramips/rt288x/config-5.4
@@ -112,6 +112,7 @@ CONFIG_NET_RALINK_SOC=y
 CONFIG_NET_VENDOR_RALINK=y
 CONFIG_NLS=m
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/ramips/rt305x/config-5.10 b/target/linux/ramips/rt305x/config-5.10
index 1704accf95..a67b525f82 100644
--- a/target/linux/ramips/rt305x/config-5.10
+++ b/target/linux/ramips/rt305x/config-5.10
@@ -114,6 +114,7 @@ CONFIG_NET_RALINK_RT3050=y
 CONFIG_NET_RALINK_SOC=y
 CONFIG_NET_VENDOR_RALINK=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/ramips/rt305x/config-5.4 b/target/linux/ramips/rt305x/config-5.4
index b4ee93c05b..8ba86b501c 100644
--- a/target/linux/ramips/rt305x/config-5.4
+++ b/target/linux/ramips/rt305x/config-5.4
@@ -114,6 +114,7 @@ CONFIG_NET_RALINK_RT3050=y
 CONFIG_NET_RALINK_SOC=y
 CONFIG_NET_VENDOR_RALINK=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/ramips/rt3883/config-5.10 b/target/linux/ramips/rt3883/config-5.10
index 16d6fc32f8..664d93f454 100644
--- a/target/linux/ramips/rt3883/config-5.10
+++ b/target/linux/ramips/rt3883/config-5.10
@@ -113,6 +113,7 @@ CONFIG_NET_RALINK_RT3883=y
 CONFIG_NET_RALINK_SOC=y
 CONFIG_NET_VENDOR_RALINK=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
diff --git a/target/linux/ramips/rt3883/config-5.4 b/target/linux/ramips/rt3883/config-5.4
index f7d6a2cc2b..49e449f8b9 100644
--- a/target/linux/ramips/rt3883/config-5.4
+++ b/target/linux/ramips/rt3883/config-5.4
@@ -114,6 +114,7 @@ CONFIG_NET_RALINK_RT3883=y
 CONFIG_NET_RALINK_SOC=y
 CONFIG_NET_VENDOR_RALINK=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y


From lede-commits at lists.infradead.org  Wed Jul 21 07:34:35 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 21 Jul 2021 10:34:35 -0400
Subject: [openwrt/openwrt] mediatek: mt7623: allow build without ext4 rootfs
In-Reply-To: <162687807540.17690.11421461203958815847@git-01.infra.openwrt.org>
References: <162687807540.17690.11421461203958815847@git-01.infra.openwrt.org>
Message-ID: <mailman.9182.1626878081.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5096f0513b7d2d3fc1004578e8ef3c03fdfa7c1f

commit 5096f0513b7d2d3fc1004578e8ef3c03fdfa7c1f
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Jul 21 15:32:00 2021 +0100

    mediatek: mt7623: allow build without ext4 rootfs
    
    The image generation code for the U7623 board expects ext4 filesystem
    to be selected in menuconfig and CONFIG_TARGET_ROOTFS_PARTSIZE to be
    defined. Now that ext4 isn't enabled any more, the variable was missing
    and broke the build.
    Set the default (104) instead of using the config variable to fix that.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/image/mt7623.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mediatek/image/mt7623.mk b/target/linux/mediatek/image/mt7623.mk
index 00c1ac4443..653da6b2c0 100644
--- a/target/linux/mediatek/image/mt7623.mk
+++ b/target/linux/mediatek/image/mt7623.mk
@@ -132,7 +132,7 @@ define Build/mtk-mmc-img
 		$@.boot \
 		$(IMAGE_ROOTFS) \
 		$(CONFIG_MTK_BOOT_PARTSIZE) \
-		$(CONFIG_TARGET_ROOTFS_PARTSIZE)
+		104
 endef
 
 define Build/scatterfile


From lede-commits at lists.infradead.org  Wed Jul 21 08:59:39 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 21 Jul 2021 11:59:39 -0400
Subject: [openwrt/openwrt] mediatek: mt7623: yet another legacy image
 variable restored
In-Reply-To: <162688317980.13496.12111660926746411875@git-01.infra.openwrt.org>
References: <162688317980.13496.12111660926746411875@git-01.infra.openwrt.org>
Message-ID: <mailman.9210.1626883185.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/089c2bb2178daa144baa2e3ed20a55fb9a5c11ab

commit 089c2bb2178daa144baa2e3ed20a55fb9a5c11ab
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Jul 21 16:18:58 2021 +0100

    mediatek: mt7623: yet another legacy image variable restored
    
    Restore BOOTFS_BLOCKS variable until U7623 gets brushed, so things
    hopefully build now.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/image/mt7623.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/target/linux/mediatek/image/mt7623.mk b/target/linux/mediatek/image/mt7623.mk
index 653da6b2c0..9a938662c3 100644
--- a/target/linux/mediatek/image/mt7623.mk
+++ b/target/linux/mediatek/image/mt7623.mk
@@ -113,6 +113,11 @@ endef
 TARGET_DEVICES += bananapi_bpi-r2
 
 
+ifneq ($(CONFIG_MTK_BOOT_PARTSIZE),)
+BOOTFS_BLOCK_SIZE := 1024
+BOOTFS_BLOCKS := $(shell echo $$(($(CONFIG_MTK_BOOT_PARTSIZE)*1024*1024/$(BOOTFS_BLOCK_SIZE))))
+endif
+
 define Build/mtk-mmc-img
 	rm -f $@.boot
 	mkfs.fat -C $@.boot $(BOOTFS_BLOCKS)
@@ -140,6 +145,7 @@ define Build/scatterfile
 		$(subst -scatter.txt,,$(notdir $@)) "$(DEVICE_TITLE)" > $@
 endef
 
+
 # Full eMMC image including U-Boot and partition table
 define Device/unielec_u7623-emmc
   DEVICE_VENDOR := UniElec


From lede-commits at lists.infradead.org  Wed Jul 21 13:56:38 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 21 Jul 2021 16:56:38 -0400
Subject: [buildbot]  phase1,phase2: improve round robin builds
In-Reply-To: <162690099829.23494.16398890373433788629@git-01.infra.openwrt.org>
References: <162690099829.23494.16398890373433788629@git-01.infra.openwrt.org>
Message-ID: <mailman.9299.1626901005.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/87ed6cf749bee5a22ffed22fad248d78a1144352

commit 87ed6cf749bee5a22ffed22fad248d78a1144352
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Wed Jul 21 21:31:28 2021 +0200

    phase1,phase2: improve round robin builds
    
    There seems to be some issue with database updates, where database
    updates are asynchronous and thus the status update of the previous
    build (complete_at DB column) might take little bit longer, then
    preparation of the next/current build.
    
    This is issue during job prioritization as this might result in the
    build of the same builder twice in a row, for example:
    
     2021-06-22 02:42:54+0000 [-]  <Build mipsel_24kc number:95 results:success>: build finished
     2021-06-22 02:42:55+0000 [-] prioritizeBuilders:          mipsel_24kc complete_at: 2021-06-21 20:17:14+00:00
     2021-06-22 03:14:30+0000 [-] prioritizeBuilders:          mipsel_24kc complete_at: 2021-06-22 02:42:54+00:00
    
    Build finishes at 02:42:54, scheduler then asks for next build at
    02:42:55, but the build still has the old complete_at timestamp
    2021-06-21 20:17:14 instead of the correct one 2021-06-22 02:42:54, thus
    scheduling the build of oldest mipsel_24kc builder one more time.
    
    This is so far very promising workaround attempt which checks latest
    builder complete_at in builds table which seems to be updated faster,
    thus using greater complete_at value seems to work for now.
    
    References: https://github.com/buildbot/buildbot/issues/4592#issuecomment-801163587
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 phase1/master.cfg | 16 +++++++++++++++-
 phase2/master.cfg | 16 +++++++++++++++-
 2 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/phase1/master.cfg b/phase1/master.cfg
index a85382a..be3a894 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -154,7 +154,21 @@ def getNewestCompleteTime(bldr):
 	if not completed:
 		return
 
-	return completed[0]['complete_at']
+	complete_at = completed[0]['complete_at']
+
+	last_build = yield bldr.master.data.get(
+			('builds', ),
+			[
+				resultspec.Filter('builderid', 'eq', [bldrid]),
+			],
+			order=['-started_at'], limit=1)
+
+	if last_build and last_build[0]:
+		last_complete_at = last_build[0]['complete_at']
+		if last_complete_at and (last_complete_at > complete_at):
+                   return last_complete_at
+
+	return complete_at
 
 @defer.inlineCallbacks
 def prioritizeBuilders(master, builders):
diff --git a/phase2/master.cfg b/phase2/master.cfg
index b9342cf..7742ad6 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -351,7 +351,21 @@ def getNewestCompleteTime(bldr):
 	if not completed:
 		return
 
-	return completed[0]['complete_at']
+	complete_at = completed[0]['complete_at']
+
+	last_build = yield bldr.master.data.get(
+			('builds', ),
+			[
+				resultspec.Filter('builderid', 'eq', [bldrid]),
+			],
+			order=['-started_at'], limit=1)
+
+	if last_build and last_build[0]:
+		last_complete_at = last_build[0]['complete_at']
+		if last_complete_at and (last_complete_at > complete_at):
+                   return last_complete_at
+
+	return complete_at
 
 @defer.inlineCallbacks
 def prioritizeBuilders(master, builders):


From lede-commits at lists.infradead.org  Wed Jul 21 19:32:05 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 21 Jul 2021 22:32:05 -0400
Subject: [openwrt/openwrt] generic: add mac-address property for NVMEM mac
 addresses
In-Reply-To: <162692112563.1644.16302625695549916183@git-01.infra.openwrt.org>
References: <162692112563.1644.16302625695549916183@git-01.infra.openwrt.org>
Message-ID: <mailman.9326.1626921130.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/b30924873062be47250e6b872347461c8221688d

commit b30924873062be47250e6b872347461c8221688d
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Tue Jul 20 22:00:10 2021 +0200

    generic: add mac-address property for NVMEM mac addresses
    
    Traversing the device-tree by referencing a network device to determine
    a devices labe-mac does not work with the generic nvmem implementation,
    as the userspace expects the MAC-address to be available as a
    device-tree property.
    
    The legacy mtd-mac-address implementation did create such a node. Do the
    same when using the nvmem implementation to allow reading the MAC
    address.
    
    Fixes commit d284e6ef0f06 ("treewide: convert mtd-mac-address-increment*
    to generic implementation")
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 .../683-NET-add-mac-address-property.patch         | 59 ++++++++++++++++++++++
 .../683-NET-add-mac-address-property.patch         | 59 ++++++++++++++++++++++
 2 files changed, 118 insertions(+)

diff --git a/target/linux/generic/hack-5.10/683-NET-add-mac-address-property.patch b/target/linux/generic/hack-5.10/683-NET-add-mac-address-property.patch
new file mode 100644
index 0000000000..de561c5336
--- /dev/null
+++ b/target/linux/generic/hack-5.10/683-NET-add-mac-address-property.patch
@@ -0,0 +1,59 @@
+From: David Bauer <mail at david-bauer.net>
+Date: Tue, 20 Jul 2021 22:00:10 +0200
+Subject: [PATCH] generic: add mac-address property for NVMEM mac addresses
+
+Traversing the device-tree by referencing a network device to determine
+a devices labe-mac does not work with the generic nvmem implementation,
+as the userspace expects the MAC-address to be available as a
+device-tree property.
+
+The legacy mtd-mac-address implementation did create such a node. Do the
+same when using the nvmem implementation to allow reading the MAC
+address.
+
+Fixes commit d284e6ef0f06 ("treewide: convert mtd-mac-address-increment*
+to generic implementation")
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+
+--- a/drivers/of/of_net.c
++++ b/drivers/of/of_net.c
+@@ -61,6 +61,7 @@ static void *of_get_mac_addr_nvmem(struc
+ 	void *mac;
+ 	u8 nvmem_mac[ETH_ALEN];
+ 	struct platform_device *pdev = of_find_device_by_node(np);
++	struct property *prop;
+ 
+ 	if (!pdev) {
+ 		*err = -ENODEV;
+@@ -78,10 +79,29 @@ static void *of_get_mac_addr_nvmem(struc
+ 	put_device(&pdev->dev);
+ 	if (!mac) {
+ 		*err = -ENOMEM;
+-		return NULL;
++		goto out_err;
++	}
++
++	prop = devm_kzalloc(&pdev->dev, sizeof(*prop), GFP_KERNEL);
++	if (!prop) {
++		*err = -ENOMEM;
++		goto out_err;
++	}
++	prop->name = "mac-address";
++	prop->length = ETH_ALEN;
++	prop->value = devm_kmemdup(&pdev->dev, mac, ETH_ALEN, GFP_KERNEL);
++	if (!prop->value || of_add_property(np, prop)) {
++		*err = -ENOMEM;
++		goto out_err;
+ 	}
+ 
+ 	return mac;
++
++out_err:
++	devm_kfree(&pdev->dev, prop->value);
++	devm_kfree(&pdev->dev, prop);
++	devm_kfree(&pdev->dev, mac);
++	return NULL;
+ }
+ 
+ static void *of_get_mac_address_mtd(struct device_node *np)
diff --git a/target/linux/generic/hack-5.4/683-NET-add-mac-address-property.patch b/target/linux/generic/hack-5.4/683-NET-add-mac-address-property.patch
new file mode 100644
index 0000000000..de561c5336
--- /dev/null
+++ b/target/linux/generic/hack-5.4/683-NET-add-mac-address-property.patch
@@ -0,0 +1,59 @@
+From: David Bauer <mail at david-bauer.net>
+Date: Tue, 20 Jul 2021 22:00:10 +0200
+Subject: [PATCH] generic: add mac-address property for NVMEM mac addresses
+
+Traversing the device-tree by referencing a network device to determine
+a devices labe-mac does not work with the generic nvmem implementation,
+as the userspace expects the MAC-address to be available as a
+device-tree property.
+
+The legacy mtd-mac-address implementation did create such a node. Do the
+same when using the nvmem implementation to allow reading the MAC
+address.
+
+Fixes commit d284e6ef0f06 ("treewide: convert mtd-mac-address-increment*
+to generic implementation")
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+
+--- a/drivers/of/of_net.c
++++ b/drivers/of/of_net.c
+@@ -61,6 +61,7 @@ static void *of_get_mac_addr_nvmem(struc
+ 	void *mac;
+ 	u8 nvmem_mac[ETH_ALEN];
+ 	struct platform_device *pdev = of_find_device_by_node(np);
++	struct property *prop;
+ 
+ 	if (!pdev) {
+ 		*err = -ENODEV;
+@@ -78,10 +79,29 @@ static void *of_get_mac_addr_nvmem(struc
+ 	put_device(&pdev->dev);
+ 	if (!mac) {
+ 		*err = -ENOMEM;
+-		return NULL;
++		goto out_err;
++	}
++
++	prop = devm_kzalloc(&pdev->dev, sizeof(*prop), GFP_KERNEL);
++	if (!prop) {
++		*err = -ENOMEM;
++		goto out_err;
++	}
++	prop->name = "mac-address";
++	prop->length = ETH_ALEN;
++	prop->value = devm_kmemdup(&pdev->dev, mac, ETH_ALEN, GFP_KERNEL);
++	if (!prop->value || of_add_property(np, prop)) {
++		*err = -ENOMEM;
++		goto out_err;
+ 	}
+ 
+ 	return mac;
++
++out_err:
++	devm_kfree(&pdev->dev, prop->value);
++	devm_kfree(&pdev->dev, prop);
++	devm_kfree(&pdev->dev, mac);
++	return NULL;
+ }
+ 
+ static void *of_get_mac_address_mtd(struct device_node *np)


From lede-commits at lists.infradead.org  Thu Jul 22 18:49:17 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 22 Jul 2021 21:49:17 -0400
Subject: [openwrt/openwrt] ath79: kernel: Add missing quote to
 drivers/mfd/Kconfig
In-Reply-To: <162700495732.429.4093892420307066850@git-01.infra.openwrt.org>
References: <162700495732.429.4093892420307066850@git-01.infra.openwrt.org>
Message-ID: <mailman.9602.1627004971.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f7374bce00a97fda78ace3acaef48369e8246814

commit f7374bce00a97fda78ace3acaef48369e8246814
Author: Paul Blazejowski <paulb at blazebox.homeip.net>
AuthorDate: Wed Jul 21 18:28:20 2021 -0400

    ath79: kernel: Add missing quote to drivers/mfd/Kconfig
    
    A missing quote in target/linux/ath79/patches-5.x/920-mikrotik-rb4xx.patch
    produces:
    
    ...
    scripts/kconfig/conf  --syncconfig Kconfig
    drivers/mfd/Kconfig:2016:warning: multi-line strings not supported
    ...
    
    This patch adds missing closing quote, fixing the above warning.
    
    Signed-off-by: Paul Blazejowski <paulb at blazebox.homeip.net>
---
 target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch | 2 +-
 target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch b/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch
index 7c3c91817f..3129fac3ab 100644
--- a/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch
+++ b/target/linux/ath79/patches-5.10/920-mikrotik-rb4xx.patch
@@ -5,7 +5,7 @@
  	  device found on several devices in RAVE line of hardware.
  
 +config MFD_RB4XX_CPLD
-+	tristate "CPLD driver for Mikrotik RB4xx series boards
++	tristate "CPLD driver for Mikrotik RB4xx series boards"
 +	select MFD_CORE
 +	depends on ATH79 || COMPILE_TEST
 +	help
diff --git a/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch b/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch
index 60f8bdff79..7f424bbfc6 100644
--- a/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch
+++ b/target/linux/ath79/patches-5.4/920-mikrotik-rb4xx.patch
@@ -5,7 +5,7 @@
  	  device found on several devices in RAVE line of hardware.
  
 +config MFD_RB4XX_CPLD
-+	tristate "CPLD driver for Mikrotik RB4xx series boards
++	tristate "CPLD driver for Mikrotik RB4xx series boards"
 +	select MFD_CORE
 +	depends on ATH79 || COMPILE_TEST
 +	help


From lede-commits at lists.infradead.org  Thu Jul 22 18:52:50 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 22 Jul 2021 21:52:50 -0400
Subject: [openwrt/openwrt] ramips: mt7621: remove bring up DSA master init
 script
In-Reply-To: <162700517088.1948.10299820526539719303@git-01.infra.openwrt.org>
References: <162700517088.1948.10299820526539719303@git-01.infra.openwrt.org>
Message-ID: <mailman.9603.1627005181.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/6dc18649a013151f226c9a362e5060c703b6c642

commit 6dc18649a013151f226c9a362e5060c703b6c642
Author: DENG Qingfang <dqfext at gmail.com>
AuthorDate: Wed Jun 23 23:37:25 2021 +0800

    ramips: mt7621: remove bring up DSA master init script
    
    With commit 2e17c710954b, there is no need to bring up DSA master port
    manually.
    
    Signed-off-by: DENG Qingfang <dqfext at gmail.com>
---
 .../lib/preinit/07_mt7621_bringup_dsa_master         | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/target/linux/ramips/mt7621/base-files/lib/preinit/07_mt7621_bringup_dsa_master b/target/linux/ramips/mt7621/base-files/lib/preinit/07_mt7621_bringup_dsa_master
deleted file mode 100644
index 0f4660d242..0000000000
--- a/target/linux/ramips/mt7621/base-files/lib/preinit/07_mt7621_bringup_dsa_master
+++ /dev/null
@@ -1,20 +0,0 @@
-. /lib/functions.sh
-
-mt7621_bringup_dsa_master() {
-    local board=$(board_name)
-    local masterif
-
-    case "$board" in
-    ubnt,edgerouter-x|\
-    ubnt,edgerouter-x-sfp)
-        masterif="dsa"
-        ;;
-    *)
-        masterif="eth0"
-        ;;
-    esac
-
-    ip link set $masterif up
-}
-
-boot_hook_add preinit_main mt7621_bringup_dsa_master
\ No newline at end of file


From lede-commits at lists.infradead.org  Fri Jul 23 02:33:43 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 23 Jul 2021 05:33:43 -0400
Subject: [openwrt/openwrt]  kernel: add missing symbol to kmod-qlcnic
In-Reply-To: <162703282334.17583.3715332981554625323@git-01.infra.openwrt.org>
References: <162703282334.17583.3715332981554625323@git-01.infra.openwrt.org>
Message-ID: <mailman.9690.1627032833.1072.lede-commits@lists.infradead.org>

stintel pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3cb22b277a312445bfe34f5e32626c4448f95b77

commit 3cb22b277a312445bfe34f5e32626c4448f95b77
Author: Stijn Tintel <stijn at linux-ipv6.be>
AuthorDate: Thu Jul 22 16:37:12 2021 +0300

    kernel: add missing symbol to kmod-qlcnic
    
    When the kmod-qlcnic package is built on targets that have
    CONFIG_PCI_IOV enabled, the CONFIG_QLCNIC_SRIOV symbol is exposed.
    Enable this symbol in the kmod package to fix its build.
    
    Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 package/kernel/linux/modules/netdevices.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk
index b91442748d..6bbaf21e4a 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -1199,7 +1199,8 @@ define KernelPackage/qlcnic
   TITLE:=QLogic QLE8240 and QLE8242 device support
   KCONFIG:= \
 	CONFIG_QLCNIC \
-	CONFIG_QLCNIC_HWMON=y
+	CONFIG_QLCNIC_HWMON=y \
+	CONFIG_QLCNIC_SRIOV=y
   FILES:=$(LINUX_DIR)/drivers/net/ethernet/qlogic/qlcnic/qlcnic.ko
   AUTOLOAD:=$(call AutoProbe,qlcnic)
 endef


From lede-commits at lists.infradead.org  Fri Jul 23 08:40:36 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 23 Jul 2021 11:40:36 -0400
Subject: [openwrt/openwrt] generic: fix mediatek and dsa not detecting
 mac-addr from nvmem
In-Reply-To: <162705483672.24181.8638084416551888204@git-01.infra.openwrt.org>
References: <162705483672.24181.8638084416551888204@git-01.infra.openwrt.org>
Message-ID: <mailman.9763.1627054843.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/6bc6a416851b01d7b062a504ba4296a14113d795

commit 6bc6a416851b01d7b062a504ba4296a14113d795
Author: Ansuel Smith <ansuelsmth at gmail.com>
AuthorDate: Fri Jul 23 12:43:35 2021 +0200

    generic: fix mediatek and dsa not detecting mac-addr from nvmem
    
    Nvmem require the device node to be registered with the of_platform.
    Register the device node so that nvmem can correctly find the dev and
    correctly load the mac-addr stored in the nvmem cell declared in the dts.
    
    Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
---
 ...-mediatek-register-of_platform-for-every-.patch | 32 +++++++++++++++++
 ...-dsa-register-every-port-with-of_platform.patch | 40 ++++++++++++++++++++++
 ...-mediatek-register-of_platform-for-every-.patch | 32 +++++++++++++++++
 ...-dsa-register-every-port-with-of_platform.patch | 40 ++++++++++++++++++++++
 4 files changed, 144 insertions(+)

diff --git a/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch b/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch
new file mode 100644
index 0000000000..d1383cc2d1
--- /dev/null
+++ b/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch
@@ -0,0 +1,32 @@
+From c94b2cfd25c282e2974accc1b07da98ae7139b47 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Fri, 23 Jul 2021 12:14:33 +0200
+Subject: [PATCH 1/2] drivers: net: mediatek: register of_platform for every
+ port
+
+Currently the nvmem framework require the devicenode to be registred on
+the of_platform or of_get_mac_address fail to get the macaddress if
+defined using an nvmem cell. Fix this by registrering these special node
+so they can be found by of_find_device_by_node.
+
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
+---
+ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+index ed4eacef17ce..666803817540 100644
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -3015,6 +3015,8 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
+ 	eth->netdev[id]->dev.of_node = np;
+ 
+ 	eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;
++	
++	of_platform_device_create(np, NULL, NULL);
+ 
+ 	return 0;
+ 
+-- 
+2.31.1
+
diff --git a/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch b/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch
new file mode 100644
index 0000000000..a8b8910423
--- /dev/null
+++ b/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch
@@ -0,0 +1,40 @@
+From 8bab551f44204fc5d43977063cd704112c17c750 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Fri, 23 Jul 2021 12:17:27 +0200
+Subject: [PATCH 2/2] dsa: register every port with of_platform
+
+The declaration of a different mac-addr using the nvmem framework is
+currently broken. The dsa code use the generic of_get_mac_address where
+the nvmem function require the device node to be registred in the
+of_platform to be found by of_find_device_by_node. Register every port
+in the of_platform so they can corrently found and a custom mac-addr can
+correctly be declared using a nvmem-cell declared in the dts.
+
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
+---
+ net/dsa/dsa2.c | 2 +
+ 1 file changed, 2 insertion(+)
+
+diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
+index b71e87909f0e..55bbc1a769ca 100644
+--- a/net/dsa/dsa2.c
++++ b/net/dsa/dsa2.c
+@@ -14,6 +14,7 @@
+ #include <linux/rtnetlink.h>
+ #include <linux/of.h>
+ #include <linux/of_net.h>
++#include <linux/of_platform.h>
+ #include <net/devlink.h>
+ 
+ #include "dsa_priv.h"
+@@ -392,6 +392,7 @@ static int dsa_port_setup(struct dsa_port *dp)
+ 
+ 		break;
+ 	case DSA_PORT_TYPE_USER:
++		of_platform_device_create(dp->dn, NULL, NULL);
+ 		dp->mac = of_get_mac_address(dp->dn);
+ 		err = dsa_slave_create(dp);
+ 		if (err)
+-- 
+2.31.1
+
diff --git a/target/linux/generic/hack-5.4/780-drivers-net-mediatek-register-of_platform-for-every-.patch b/target/linux/generic/hack-5.4/780-drivers-net-mediatek-register-of_platform-for-every-.patch
new file mode 100644
index 0000000000..d1383cc2d1
--- /dev/null
+++ b/target/linux/generic/hack-5.4/780-drivers-net-mediatek-register-of_platform-for-every-.patch
@@ -0,0 +1,32 @@
+From c94b2cfd25c282e2974accc1b07da98ae7139b47 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Fri, 23 Jul 2021 12:14:33 +0200
+Subject: [PATCH 1/2] drivers: net: mediatek: register of_platform for every
+ port
+
+Currently the nvmem framework require the devicenode to be registred on
+the of_platform or of_get_mac_address fail to get the macaddress if
+defined using an nvmem cell. Fix this by registrering these special node
+so they can be found by of_find_device_by_node.
+
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
+---
+ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+index ed4eacef17ce..666803817540 100644
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -3015,6 +3015,8 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
+ 	eth->netdev[id]->dev.of_node = np;
+ 
+ 	eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;
++	
++	of_platform_device_create(np, NULL, NULL);
+ 
+ 	return 0;
+ 
+-- 
+2.31.1
+
diff --git a/target/linux/generic/hack-5.4/781-dsa-register-every-port-with-of_platform.patch b/target/linux/generic/hack-5.4/781-dsa-register-every-port-with-of_platform.patch
new file mode 100644
index 0000000000..f9a684c093
--- /dev/null
+++ b/target/linux/generic/hack-5.4/781-dsa-register-every-port-with-of_platform.patch
@@ -0,0 +1,40 @@
+From 8bab551f44204fc5d43977063cd704112c17c750 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Fri, 23 Jul 2021 12:17:27 +0200
+Subject: [PATCH 2/2] dsa: register every port with of_platform
+
+The declaration of a different mac-addr using the nvmem framework is
+currently broken. The dsa code use the generic of_get_mac_address where
+the nvmem function require the device node to be registred in the
+of_platform to be found by of_find_device_by_node. Register every port
+in the of_platform so they can corrently found and a custom mac-addr can
+correctly be declared using a nvmem-cell declared in the dts.
+
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
+---
+ net/dsa/dsa2.c | 2 +
+ 1 file changed, 2 insertion(+)
+
+diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
+index b71e87909f0e..55bbc1a769ca 100644
+--- a/net/dsa/dsa2.c
++++ b/net/dsa/dsa2.c
+@@ -14,6 +14,7 @@
+ #include <linux/rtnetlink.h>
+ #include <linux/of.h>
+ #include <linux/of_net.h>
++#include <linux/of_platform.h>
+ #include <net/devlink.h>
+ 
+ #include "dsa_priv.h"
+@@ -392,6 +392,7 @@ static int dsa_port_setup(struct dsa_port *dp)
+ 			break;
+ 		devlink_port_registered = true;
+ 
++		of_platform_device_create(dp->dn, NULL, NULL);
+ 		dp->mac = of_get_mac_address(dp->dn);
+ 		err = dsa_slave_create(dp);
+ 		if (err)
+-- 
+2.31.1
+


From lede-commits at lists.infradead.org  Fri Jul 23 16:02:14 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 23 Jul 2021 19:02:14 -0400
Subject: [openwrt/openwrt]  fstools: update to git HEAD
In-Reply-To: <162708133466.18255.11676650329234904505@git-01.infra.openwrt.org>
References: <162708133466.18255.11676650329234904505@git-01.infra.openwrt.org>
Message-ID: <mailman.9827.1627081340.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5bc898b43e5c87187936151a44136ab0f00484ef

commit 5bc898b43e5c87187936151a44136ab0f00484ef
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat Jul 24 00:00:22 2021 +0100

    fstools: update to git HEAD
    
    59f7c11 blockd: create mountpoint parent folder if needed
    9cc96af Revert "block: resolve /dev/mapper/* name for /dev/dm-0 when hotplugging"
    06334ac Revert "blockd: detect mountpoint of /dev/mapper/*"
    9ab3551 block: use /dev/dm-* instead of /dev/mapper/*
    5114595 block: allow remove hotplug event to arrive at blockd
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/system/fstools/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 5300d35dc4..02f1353cea 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
-PKG_MIRROR_HASH:=c57f21db30349f30d70b6169ad9d9c905733069fe14ea6b4ffdfbd82a355dd61
-PKG_SOURCE_DATE:=2021-07-15
-PKG_SOURCE_VERSION:=cdc9939b071427cf2b35134481df27b4bd76dbfc
+PKG_MIRROR_HASH:=19a66cd45edee69fe23456e43c428935e30245ad0aa644539100da88f77209a2
+PKG_SOURCE_DATE:=2021-07-23
+PKG_SOURCE_VERSION:=5114595bc37e441a905db6b05b4487ad67fcb3d1
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Fri Jul 23 17:15:08 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 23 Jul 2021 20:15:08 -0400
Subject: [openwrt/openwrt]  fstools: update to git HEAD (again)
In-Reply-To: <162708570816.23024.8706028443153656148@git-01.infra.openwrt.org>
References: <162708570816.23024.8706028443153656148@git-01.infra.openwrt.org>
Message-ID: <mailman.9840.1627085714.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/ca31755af9877a4539a0268f50b26f003f2059cd

commit ca31755af9877a4539a0268f50b26f003f2059cd
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat Jul 24 01:13:00 2021 +0100

    fstools: update to git HEAD (again)
    
     a846c6b blockd: fix length of timeout int passed to ioctl
     1d681ca block: support umount device basename
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/system/fstools/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 02f1353cea..f56a18c70e 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
-PKG_MIRROR_HASH:=19a66cd45edee69fe23456e43c428935e30245ad0aa644539100da88f77209a2
-PKG_SOURCE_DATE:=2021-07-23
-PKG_SOURCE_VERSION:=5114595bc37e441a905db6b05b4487ad67fcb3d1
+PKG_MIRROR_HASH:=66811ea1ec6c747ad46978a0dc55a9e620e493cfa39d8acb318d1d1b00dc1fcc
+PKG_SOURCE_DATE:=2021-07-24
+PKG_SOURCE_VERSION:=1d681ca59cada118633c6e2d65b882b4c8f0db58
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Sat Jul 24 05:18:05 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 24 Jul 2021 08:18:05 -0400
Subject: [openwrt/openwrt]  mediatek: mt7623: import patch to fix spi
In-Reply-To: <162712908505.7750.10752910323413938873@git-01.infra.openwrt.org>
References: <162712908505.7750.10752910323413938873@git-01.infra.openwrt.org>
Message-ID: <mailman.9869.1627129091.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/90db922f8818edb1faf9b9c9ba71f73119fb6068

commit 90db922f8818edb1faf9b9c9ba71f73119fb6068
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Sat Jul 24 12:55:20 2021 +0200

    mediatek: mt7623: import patch to fix spi
    
    The patch fixes the fifo rx mode for the mt7623. It is already accepted
    upstream for Linux Kernel 5.15.
    
    To test the spi we can change the dts file to
    
    &spi0 {
            pinctrl-names = "default";
            pinctrl-0 = <&spi0_pins_a>;
            status = "okay";
            spidev: spidev at 0 {
                    compatible = "linux,spidev";
                    spi-max-frequency = <1000000>;
                    reg = <0>;
            };
    };
    
    Afterwards we should see a spidev device under /dev/.
    To test it we can further use spidev-test.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 .../mediatek/patches-5.10/000-spi-fix-fifo.patch   | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/target/linux/mediatek/patches-5.10/000-spi-fix-fifo.patch b/target/linux/mediatek/patches-5.10/000-spi-fix-fifo.patch
new file mode 100644
index 0000000000..a7ac93a208
--- /dev/null
+++ b/target/linux/mediatek/patches-5.10/000-spi-fix-fifo.patch
@@ -0,0 +1,54 @@
+From 3a70dd2d050331ee4cf5ad9d5c0a32d83ead9a43 Mon Sep 17 00:00:00 2001
+From: Peter Hess <peter.hess at ph-home.de>
+Date: Tue, 6 Jul 2021 14:16:09 +0200
+Subject: spi: mediatek: fix fifo rx mode
+
+In FIFO mode were two problems:
+- RX mode was never handled and
+- in this case the tx_buf pointer was NULL and caused an exception
+
+fix this by handling RX mode in mtk_spi_fifo_transfer
+
+Fixes: a568231f4632 ("spi: mediatek: Add spi bus for Mediatek MT8173")
+Signed-off-by: Peter Hess <peter.hess at ph-home.de>
+Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
+Link: https://lore.kernel.org/r/20210706121609.680534-1-linux at fw-web.de
+Signed-off-by: Mark Brown <broonie at kernel.org>
+---
+ drivers/spi/spi-mt65xx.c | 16 +++++++++++++---
+ 1 file changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
+index 976f73b9e2998..8d5fa7f1e5069 100644
+--- a/drivers/spi/spi-mt65xx.c
++++ b/drivers/spi/spi-mt65xx.c
+@@ -427,13 +427,23 @@ static int mtk_spi_fifo_transfer(struct spi_master *master,
+ 	mtk_spi_setup_packet(master);
+ 
+ 	cnt = xfer->len / 4;
+-	iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt);
++	if (xfer->tx_buf)
++		iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt);
++
++	if (xfer->rx_buf)
++		ioread32_rep(mdata->base + SPI_RX_DATA_REG, xfer->rx_buf, cnt);
+ 
+ 	remainder = xfer->len % 4;
+ 	if (remainder > 0) {
+ 		reg_val = 0;
+-		memcpy(&reg_val, xfer->tx_buf + (cnt * 4), remainder);
+-		writel(reg_val, mdata->base + SPI_TX_DATA_REG);
++		if (xfer->tx_buf) {
++			memcpy(&reg_val, xfer->tx_buf + (cnt * 4), remainder);
++			writel(reg_val, mdata->base + SPI_TX_DATA_REG);
++		}
++		if (xfer->rx_buf) {
++			reg_val = readl(mdata->base + SPI_RX_DATA_REG);
++			memcpy(xfer->rx_buf + (cnt * 4), &reg_val, remainder);
++		}
+ 	}
+ 
+ 	mtk_spi_enable_transfer(master);
+-- 
+cgit 1.2.3-1.el7
+


From lede-commits at lists.infradead.org  Sat Jul 24 16:59:46 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 24 Jul 2021 19:59:46 -0400
Subject: [openwrt/openwrt]  procd: update to git HEAD
In-Reply-To: <162717118671.25393.1212843792087517400@git-01.infra.openwrt.org>
References: <162717118671.25393.1212843792087517400@git-01.infra.openwrt.org>
Message-ID: <mailman.9890.1627171200.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/1ed9fc663e550a47fe221f5122c5ef4d55b795c8

commit 1ed9fc663e550a47fe221f5122c5ef4d55b795c8
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Jul 25 00:56:08 2021 +0100

    procd: update to git HEAD
    
     772292e uxc: don't restart containers when mount shows up
     3a9d910 uxc: resolve volume UUIDs by name of UCI fstab section
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 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 12cbb1e0f8..7d2c0a4170 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_SOURCE_DATE:=2021-07-18
-PKG_SOURCE_VERSION:=9bd1b7f0951ec2bcf56674fa729af3872b276057
-PKG_MIRROR_HASH:=87681b3f320af1392bfdecfe6e3c69a32a95169af0ca243e44bad78f22b34e3d
+PKG_SOURCE_DATE:=2021-07-25
+PKG_SOURCE_VERSION:=3a9d9102aa29cd3522a457d6e961454dabdee7cc
+PKG_MIRROR_HASH:=bda7f10b7acfea3eba1d719edc038df30c783d813bca8440a578aa2438683d6f
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Sat Jul 24 21:27:00 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 00:27:00 -0400
Subject: [openwrt/openwrt]  netifd: update to the latest version
In-Reply-To: <162718722058.6145.12000958169119507042@git-01.infra.openwrt.org>
References: <162718722058.6145.12000958169119507042@git-01.infra.openwrt.org>
Message-ID: <mailman.9901.1627187225.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2801fe6132c4e2e364e2d5a304594185351b501b

commit 2801fe6132c4e2e364e2d5a304594185351b501b
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Jul 25 06:26:20 2021 +0200

    netifd: update to the latest version
    
    85f01c44a950 bridge: check bridge port vlan membership on link-up events
    17e453bd68b4 wireless: add back regular virtual interfaces on hotplug-add events as well
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 62f3b60086..0b08f33e12 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2021-07-14
-PKG_SOURCE_VERSION:=7f24a063475e1e2be4e0c516a5b62c3fae5ec542
-PKG_MIRROR_HASH:=3fad25b8655e01e20f54b6c6decad6a660a34ab3ca2de97fe3c9b7db5aa485fe
+PKG_SOURCE_DATE:=2021-07-23
+PKG_SOURCE_VERSION:=17e453bd68b41780b6564dafa8358efc29a00930
+PKG_MIRROR_HASH:=06b6e10a71e3002fa03579846b97af29be9503d61486486c639dbfae423b398f
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Sat Jul 24 21:27:33 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 00:27:33 -0400
Subject: [openwrt/openwrt]  netifd: update to the latest version
In-Reply-To: <162718725343.6497.2463835219772345341@git-01.infra.openwrt.org>
References: <162718725343.6497.2463835219772345341@git-01.infra.openwrt.org>
Message-ID: <mailman.9902.1627187258.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/089efd61e9a6cdc0ea39c184d37bc8ebbe03175c

commit 089efd61e9a6cdc0ea39c184d37bc8ebbe03175c
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Jul 25 06:26:20 2021 +0200

    netifd: update to the latest version
    
    85f01c44a950 bridge: check bridge port vlan membership on link-up events
    17e453bd68b4 wireless: add back regular virtual interfaces on hotplug-add events as well
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry-picked from commit 2801fe6132c4e2e364e2d5a304594185351b501b)
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index f80f07a4ff..35035519f9 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2021-07-14
-PKG_SOURCE_VERSION:=7f24a063475e1e2be4e0c516a5b62c3fae5ec542
-PKG_MIRROR_HASH:=3fad25b8655e01e20f54b6c6decad6a660a34ab3ca2de97fe3c9b7db5aa485fe
+PKG_SOURCE_DATE:=2021-07-23
+PKG_SOURCE_VERSION:=17e453bd68b41780b6564dafa8358efc29a00930
+PKG_MIRROR_HASH:=06b6e10a71e3002fa03579846b97af29be9503d61486486c639dbfae423b398f
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:50 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:50 -0400
Subject: [openwrt/openwrt]  elfutils: fix building with GCC 11
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9912.1627214326.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2434a57dd7a057e71272e259eb31967c9e08b2f7

commit 2434a57dd7a057e71272e259eb31967c9e08b2f7
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Mon Jul 19 00:56:46 2021 +0100

    elfutils: fix building with GCC 11
    
    Add a patch to fix building with GCC 11, which triggers new warnings by
    enabling -Warray-parameter by default.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 .../elfutils/patches/111-fix-gcc11-build.patch     | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/package/libs/elfutils/patches/111-fix-gcc11-build.patch b/package/libs/elfutils/patches/111-fix-gcc11-build.patch
new file mode 100644
index 0000000000..1ec880e34e
--- /dev/null
+++ b/package/libs/elfutils/patches/111-fix-gcc11-build.patch
@@ -0,0 +1,22 @@
+--- a/libebl/libebl.h
++++ b/libebl/libebl.h
+@@ -245,7 +245,7 @@ extern ssize_t ebl_register_info (Ebl *e
+    Each of these is filled with the DWARF register number corresponding,
+    or -1 if there is none.  Returns zero when the information is available.  */
+ extern int ebl_syscall_abi (Ebl *ebl, int *sp, int *pc,
+-			    int *callno, int args[6]);
++			    int *callno, int args[]);
+ 
+ /* Supply the ABI-specified state of DWARF CFI before CIE initial programs.
+ 
+--- a/libdw/libdw.h
++++ b/libdw/libdw.h
+@@ -1065,7 +1065,7 @@ extern int dwarf_frame_cfa (Dwarf_Frame
+    expressions in the CFI, *OPS is an internal pointer that can be used as
+    long as the Dwarf_CFI used to create FRAME remains alive.  */
+ extern int dwarf_frame_register (Dwarf_Frame *frame, int regno,
+-				 Dwarf_Op ops_mem[3],
++				 Dwarf_Op ops_mem[],
+ 				 Dwarf_Op **ops, size_t *nops)
+   __nonnull_attribute__ (3, 4, 5);
+ 


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:47 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:47 -0400
Subject: [openwrt/openwrt] kernel/generic: add a missing symbol to the 5.10
 kconfig
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9913.1627214326.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2f1bd91d3360a3dad3ff4e4911bd69b844b2ddf1

commit 2f1bd91d3360a3dad3ff4e4911bd69b844b2ddf1
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Mon Jul 19 00:48:54 2021 +0100

    kernel/generic: add a missing symbol to the 5.10 kconfig
    
    Add CONFIG_HAVE_ARM_ARCH_TIMER (disabled). A make kernel_oldconfig on cortexa9
    will otherwise prompt for its selection. The 5.4 configuration already contains
    the same symbol.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 target/linux/generic/config-5.10 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index a1eab54b1c..04b9d04531 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -2121,6 +2121,7 @@ CONFIG_HARDENED_USERCOPY=y
 # CONFIG_HARDENED_USERCOPY_PAGESPAN is not set
 CONFIG_HARDEN_EL2_VECTORS=y
 # CONFIG_HARDLOCKUP_DETECTOR is not set
+# CONFIG_HAVE_ARM_ARCH_TIMER is not set
 # CONFIG_HCALL_STATS is not set
 # CONFIG_HDC100X is not set
 # CONFIG_HDC2010 is not set


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:41 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:41 -0400
Subject: [openwrt/openwrt]  kernel/generic: fix the arm gc-sections patch
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9914.1627214328.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/023a1366ee8138a8adbf3044814c1855c5677bb1

commit 023a1366ee8138a8adbf3044814c1855c5677bb1
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Fri Jul 23 13:34:49 2021 +0100

    kernel/generic: fix the arm gc-sections patch
    
    Latest binutils (2.37) exposed a long-standing bug. The kernel linking stage
    would break at the SORTTAB step, due to the exception table having been
    previously purged from vmlinux, as its section wasn't marked as unconditionally
    kept. Fix thusly.
    
    Additionally, the "#define ARM_MMU_DISCARD(x) KEEP(x)" change is bogus. It
    would only apply to !CONFIG_MMU devices (which we don't support in OpenWrt), and
    it would even break the build if referenced. Drop it.
    
    While at it, rename the patch in order to make it obvious that it's
    arm-specific.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
    [Add same changes for kernel 5.4 too]
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...220-gc_sections.patch => 220-arm-gc_sections.patch} | 18 ++++++++++--------
 ...220-gc_sections.patch => 220-arm-gc_sections.patch} | 18 ++++++++++--------
 2 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/target/linux/generic/hack-5.10/220-gc_sections.patch b/target/linux/generic/hack-5.10/220-arm-gc_sections.patch
similarity index 93%
rename from target/linux/generic/hack-5.10/220-gc_sections.patch
rename to target/linux/generic/hack-5.10/220-arm-gc_sections.patch
index 810c5aecf5..3b67eea250 100644
--- a/target/linux/generic/hack-5.10/220-gc_sections.patch
+++ b/target/linux/generic/hack-5.10/220-arm-gc_sections.patch
@@ -32,6 +32,15 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  		 lib1funcs.o ashldi3.o bswapsdi2.o \
 --- a/arch/arm/kernel/vmlinux.lds.S
 +++ b/arch/arm/kernel/vmlinux.lds.S
+@@ -75,7 +75,7 @@ SECTIONS
+ 	. = ALIGN(4);
+ 	__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
+ 		__start___ex_table = .;
+-		ARM_MMU_KEEP(*(__ex_table))
++		KEEP(*(__ex_table))
+ 		__stop___ex_table = .;
+ 	}
+ 
 @@ -100,24 +100,24 @@ SECTIONS
  	}
  	.init.arch.info : {
@@ -63,14 +72,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  
 --- a/arch/arm/include/asm/vmlinux.lds.h
 +++ b/arch/arm/include/asm/vmlinux.lds.h
-@@ -23,19 +23,19 @@
- #define ARM_MMU_DISCARD(x)
- #else
- #define ARM_MMU_KEEP(x)
--#define ARM_MMU_DISCARD(x)	x
-+#define ARM_MMU_DISCARD(x)	KEEP(x)
- #endif
- 
+@@ -29,13 +29,13 @@
  #define PROC_INFO							\
  		. = ALIGN(4);						\
  		__proc_info_begin = .;					\
diff --git a/target/linux/generic/hack-5.4/220-gc_sections.patch b/target/linux/generic/hack-5.4/220-arm-gc_sections.patch
similarity index 94%
rename from target/linux/generic/hack-5.4/220-gc_sections.patch
rename to target/linux/generic/hack-5.4/220-arm-gc_sections.patch
index 22276d4399..c7c985181c 100644
--- a/target/linux/generic/hack-5.4/220-gc_sections.patch
+++ b/target/linux/generic/hack-5.4/220-arm-gc_sections.patch
@@ -41,6 +41,15 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  # but it is being used too early to link to meaningful stack_chk logic.
 --- a/arch/arm/kernel/vmlinux.lds.S
 +++ b/arch/arm/kernel/vmlinux.lds.S
+@@ -73,7 +73,7 @@ SECTIONS
+ 	. = ALIGN(4);
+ 	__ex_table : AT(ADDR(__ex_table) - LOAD_OFFSET) {
+ 		__start___ex_table = .;
+-		ARM_MMU_KEEP(*(__ex_table))
++		KEEP(*(__ex_table))
+ 		__stop___ex_table = .;
+ 	}
+ 
 @@ -100,24 +100,24 @@ SECTIONS
  	}
  	.init.arch.info : {
@@ -72,14 +81,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  
 --- a/arch/arm/kernel/vmlinux.lds.h
 +++ b/arch/arm/kernel/vmlinux.lds.h
-@@ -22,13 +22,13 @@
- #define ARM_MMU_DISCARD(x)
- #else
- #define ARM_MMU_KEEP(x)
--#define ARM_MMU_DISCARD(x)	x
-+#define ARM_MMU_DISCARD(x)	KEEP(x)
- #endif
- 
+@@ -28,7 +28,7 @@
  #define PROC_INFO							\
  		. = ALIGN(4);						\
  		__proc_info_begin = .;					\


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:44 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:44 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.10 to 5.10.52
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9915.1627214328.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2b2ac841e022054ff3390f25fa41336467530a91

commit 2b2ac841e022054ff3390f25fa41336467530a91
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Wed Jul 21 16:49:05 2021 +0100

    kernel: bump 5.10 to 5.10.52
    
    Add the new CONFIG_BATTERY_RT5033 to the generic configuration, as reported by
    Paul Blazejowski. Resort the kconfig while at it.
    
    No deleted or manually refreshed patches.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 include/kernel-version.mk                                          | 4 ++--
 target/linux/generic/config-5.10                                   | 1 +
 .../linux/generic/hack-5.10/410-block-fit-partition-parser.patch   | 4 ++--
 .../780-drivers-net-mediatek-register-of_platform-for-every-.patch | 7 +------
 .../hack-5.10/781-dsa-register-every-port-with-of_platform.patch   | 7 +------
 5 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 91e609c427..5424e1a5f1 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
 endif
 
 LINUX_VERSION-5.4 = .132
-LINUX_VERSION-5.10 = .51
+LINUX_VERSION-5.10 = .52
 
 LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
-LINUX_KERNEL_HASH-5.10.51 = 95bae893c274ccc3a8a6271f377bcc7fd3badcb7990ecd41b05b2731f1d67ae2
+LINUX_KERNEL_HASH-5.10.52 = 769e57a0fa218589fa2f8460b8682eb784a72718c7a3d95295f382a77902ae79
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index 68e90156a0..a1eab54b1c 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -533,6 +533,7 @@ CONFIG_BASE_SMALL=0
 # CONFIG_BATTERY_MAX17040 is not set
 # CONFIG_BATTERY_MAX17042 is not set
 # CONFIG_BATTERY_MAX1721X is not set
+# CONFIG_BATTERY_RT5033 is not set
 # CONFIG_BATTERY_SBS is not set
 # CONFIG_BAYCOM_EPP is not set
 # CONFIG_BAYCOM_PAR is not set
diff --git a/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch b/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch
index 6c2132e85e..ec93472851 100644
--- a/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch
+++ b/target/linux/generic/hack-5.10/410-block-fit-partition-parser.patch
@@ -219,7 +219,7 @@
  
 --- a/block/partitions/msdos.c
 +++ b/block/partitions/msdos.c
-@@ -565,6 +565,15 @@ static void parse_minix(struct parsed_pa
+@@ -563,6 +563,15 @@ static void parse_minix(struct parsed_pa
  #endif /* CONFIG_MINIX_SUBPARTITION */
  }
  
@@ -235,7 +235,7 @@
  static struct {
  	unsigned char id;
  	void (*parse)(struct parsed_partitions *, sector_t, sector_t, int);
-@@ -576,6 +585,7 @@ static struct {
+@@ -574,6 +583,7 @@ static struct {
  	{UNIXWARE_PARTITION, parse_unixware},
  	{SOLARIS_X86_PARTITION, parse_solaris_x86},
  	{NEW_SOLARIS_X86_PARTITION, parse_solaris_x86},
diff --git a/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch b/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch
index d1383cc2d1..fa80b0e5f7 100644
--- a/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch
+++ b/target/linux/generic/hack-5.10/780-drivers-net-mediatek-register-of_platform-for-every-.patch
@@ -14,11 +14,9 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-index ed4eacef17ce..666803817540 100644
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3015,6 +3015,8 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
+@@ -3005,6 +3005,8 @@ static int mtk_add_mac(struct mtk_eth *e
  	eth->netdev[id]->dev.of_node = np;
  
  	eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;
@@ -27,6 +25,3 @@ index ed4eacef17ce..666803817540 100644
  
  	return 0;
  
--- 
-2.31.1
-
diff --git a/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch b/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch
index a8b8910423..330d9f1f80 100644
--- a/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch
+++ b/target/linux/generic/hack-5.10/781-dsa-register-every-port-with-of_platform.patch
@@ -15,8 +15,6 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  net/dsa/dsa2.c | 2 +
  1 file changed, 2 insertion(+)
 
-diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
-index b71e87909f0e..55bbc1a769ca 100644
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
 @@ -14,6 +14,7 @@
@@ -27,7 +25,7 @@ index b71e87909f0e..55bbc1a769ca 100644
  #include <net/devlink.h>
  
  #include "dsa_priv.h"
-@@ -392,6 +392,7 @@ static int dsa_port_setup(struct dsa_port *dp)
+@@ -288,6 +289,7 @@ static int dsa_port_setup(struct dsa_por
  
  		break;
  	case DSA_PORT_TYPE_USER:
@@ -35,6 +33,3 @@ index b71e87909f0e..55bbc1a769ca 100644
  		dp->mac = of_get_mac_address(dp->dn);
  		err = dsa_slave_create(dp);
  		if (err)
--- 
-2.31.1
-


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:49 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:49 -0400
Subject: [openwrt/openwrt]  toolchain/binutils: add binutils 2.37
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9918.1627214329.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d63fbfce70a292dcf2c3b33b84c6847d09e1a29a

commit d63fbfce70a292dcf2c3b33b84c6847d09e1a29a
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Mon Jul 19 12:09:38 2021 +0100

    toolchain/binutils: add binutils 2.37
    
    Tested on ath79/generic, without issues.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 toolchain/binutils/Config.in                       |  4 +++
 toolchain/binutils/Config.version                  |  4 +++
 toolchain/binutils/Makefile                        |  4 +++
 .../patches/2.37/300-001_ld_makefile_patch.patch   | 22 +++++++++++++
 .../2.37/400-mips_no_dynamic_linking_sym.patch     | 18 ++++++++++
 ...Change-default-emulation-for-mips64-linux.patch | 38 ++++++++++++++++++++++
 6 files changed, 90 insertions(+)

diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in
index b436a66c98..4b9579379c 100644
--- a/toolchain/binutils/Config.in
+++ b/toolchain/binutils/Config.in
@@ -21,6 +21,10 @@ choice
 	config BINUTILS_USE_VERSION_2_36_1
 		bool "Binutils 2.36.1"
 		select BINUTILS_VERSION_2_36_1
+
+	config BINUTILS_USE_VERSION_2_37
+		bool "Binutils 2.37"
+		select BINUTILS_VERSION_2_37
 endchoice
 
 config EXTRA_BINUTILS_CONFIG_OPTIONS
diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version
index 82ef9b8fc3..985e3b1b32 100644
--- a/toolchain/binutils/Config.version
+++ b/toolchain/binutils/Config.version
@@ -11,9 +11,13 @@ config BINUTILS_VERSION_2_35_2
 config BINUTILS_VERSION_2_36_1
 	bool
 
+config BINUTILS_VERSION_2_37
+	bool
+
 config BINUTILS_VERSION
 	string
 	default "2.32"			if BINUTILS_VERSION_2_32
 	default "2.34"			if BINUTILS_VERSION_2_34
 	default "2.35.2"		if BINUTILS_VERSION_2_35_2
 	default "2.36.1"		if BINUTILS_VERSION_2_36_1
+	default "2.37"			if BINUTILS_VERSION_2_37
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 5d1b518343..d58f6662bb 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -31,6 +31,10 @@ ifeq ($(PKG_VERSION),2.36.1)
   PKG_HASH:=e81d9edf373f193af428a0f256674aea62a9d74dfe93f65192d4eae030b0f3b0
 endif
 
+ifeq ($(PKG_VERSION),2.37)
+  PKG_HASH:=820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c
+endif
+
 HOST_BUILD_PARALLEL:=1
 
 PATCH_DIR:=./patches/$(PKG_VERSION)
diff --git a/toolchain/binutils/patches/2.37/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.37/300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000000..f1cbb8198b
--- /dev/null
+++ b/toolchain/binutils/patches/2.37/300-001_ld_makefile_patch.patch
@@ -0,0 +1,22 @@
+--- a/ld/Makefile.am
++++ b/ld/Makefile.am
+@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ 
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- a/ld/Makefile.in
++++ b/ld/Makefile.in
+@@ -561,7 +561,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/toolchain/binutils/patches/2.37/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.37/400-mips_no_dynamic_linking_sym.patch
new file mode 100644
index 0000000000..070247ecf0
--- /dev/null
+++ b/toolchain/binutils/patches/2.37/400-mips_no_dynamic_linking_sym.patch
@@ -0,0 +1,18 @@
+--- a/bfd/elfxx-mips.c
++++ b/bfd/elfxx-mips.c
+@@ -8057,6 +8057,7 @@ _bfd_mips_elf_create_dynamic_sections (b
+ 
+       name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
+       bh = NULL;
++      if (0) {
+       if (!(_bfd_generic_link_add_one_symbol
+ 	    (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0,
+ 	     NULL, false, get_elf_backend_data (abfd)->collect, &bh)))
+@@ -8069,6 +8070,7 @@ _bfd_mips_elf_create_dynamic_sections (b
+ 
+       if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ 	return false;
++      }
+ 
+       if (! mips_elf_hash_table (info)->use_rld_obj_head)
+ 	{
diff --git a/toolchain/binutils/patches/2.37/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.37/500-Change-default-emulation-for-mips64-linux.patch
new file mode 100644
index 0000000000..c59843766e
--- /dev/null
+++ b/toolchain/binutils/patches/2.37/500-Change-default-emulation-for-mips64-linux.patch
@@ -0,0 +1,38 @@
+--- a/bfd/config.bfd
++++ b/bfd/config.bfd
+@@ -891,12 +891,12 @@ case "${targ}" in
+     targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
+     ;;
+   mips64*el-*-linux*)
+-    targ_defvec=mips_elf32_ntrad_le_vec
+-    targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
++    targ_defvec=mips_elf64_trad_le_vec
++    targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
+     ;;
+   mips64*-*-linux*)
+-    targ_defvec=mips_elf32_ntrad_be_vec
+-    targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
++    targ_defvec=mips_elf64_trad_be_vec
++    targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
+     ;;
+   mips*el-*-linux*)
+     targ_defvec=mips_elf32_trad_le_vec
+--- a/ld/configure.tgt
++++ b/ld/configure.tgt
+@@ -530,12 +530,12 @@ mips*-*-vxworks*)	targ_emul=elf32ebmipvx
+ 			;;
+ mips*-*-windiss)	targ_emul=elf32mipswindiss
+ 			;;
+-mips64*el-*-linux-*)	targ_emul=elf32ltsmipn32
+-			targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
++mips64*el-*-linux-*)	targ_emul=elf64ltsmip
++			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
+ 			targ_extra_libpath=$targ_extra_emuls
+ 			;;
+-mips64*-*-linux-*)	targ_emul=elf32btsmipn32
+-			targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
++mips64*-*-linux-*)	targ_emul=elf64btsmip
++			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
+ 			targ_extra_libpath=$targ_extra_emuls
+ 			;;
+ mips*el-*-linux-*)	targ_emul=elf32ltsmip


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:46 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:46 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.4 to 5.4.134
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9919.1627214331.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d15db2fe4d8108efc5105bb6835da819da318b29

commit d15db2fe4d8108efc5105bb6835da819da318b29
Author: John Audia <graysky at archlinux.us>
AuthorDate: Tue Jul 20 12:23:02 2021 -0400

    kernel: bump 5.4 to 5.4.134
    
    All patches automatically rebased.
    
    Build system: x86_64
    Build-tested: ipq806x/R7800
    Run-tested: ipq806x/R7800
    
    Signed-off-by: John Audia <graysky at archlinux.us>
---
 include/kernel-version.mk                                |  4 ++--
 .../950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch          |  8 ++++----
 target/linux/generic/config-5.4                          |  1 +
 ...0001-tty-serial-lpuart-add-power-domain-support.patch |  4 ++--
 ...art-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch |  2 +-
 ...y-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch |  4 ++--
 ...1445-serial-fsl_lpuart-do-HW-reset-for-communic.patch |  4 ++--
 ...7133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch | 16 ++++++++--------
 ...y-serial-lpuart-enable-wakeup-source-for-lpuart.patch |  2 +-
 ...4-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch |  2 +-
 10 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 6dc4ad6133..0ab7ce31ce 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .133
+LINUX_VERSION-5.4 = .134
 LINUX_VERSION-5.10 = .52
 
-LINUX_KERNEL_HASH-5.4.133 = 89a366fbb8784f5bc296c9f3311094e9e4cffeb6dbdf7589168cc032cb950830
+LINUX_KERNEL_HASH-5.4.134 = c9fb861642161c256e10c97c35ccce18831e688d87ead53c18e3226778e05841
 LINUX_KERNEL_HASH-5.10.52 = 769e57a0fa218589fa2f8460b8682eb784a72718c7a3d95295f382a77902ae79
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
diff --git a/target/linux/bcm27xx/patches-5.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch b/target/linux/bcm27xx/patches-5.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch
index 8fa4ddf5c8..f42c2697f3 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch
@@ -234,7 +234,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  static int bcm2708_fb_register(struct bcm2708_fb *fb)
 --- a/drivers/video/fbdev/core/fbmem.c
 +++ b/drivers/video/fbdev/core/fbmem.c
-@@ -1076,6 +1076,30 @@ fb_blank(struct fb_info *info, int blank
+@@ -1074,6 +1074,30 @@ fb_blank(struct fb_info *info, int blank
  }
  EXPORT_SYMBOL(fb_blank);
  
@@ -265,7 +265,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
  			unsigned long arg)
  {
-@@ -1084,6 +1108,7 @@ static long do_fb_ioctl(struct fb_info *
+@@ -1082,6 +1106,7 @@ static long do_fb_ioctl(struct fb_info *
  	struct fb_fix_screeninfo fix;
  	struct fb_cmap cmap_from;
  	struct fb_cmap_user cmap;
@@ -273,7 +273,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	void __user *argp = (void __user *)arg;
  	long ret = 0;
  
-@@ -1159,6 +1184,15 @@ static long do_fb_ioctl(struct fb_info *
+@@ -1157,6 +1182,15 @@ static long do_fb_ioctl(struct fb_info *
  		unlock_fb_info(info);
  		console_unlock();
  		break;
@@ -289,7 +289,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	default:
  		lock_fb_info(info);
  		fb = info->fbops;
-@@ -1304,6 +1338,7 @@ static long fb_compat_ioctl(struct file
+@@ -1302,6 +1336,7 @@ static long fb_compat_ioctl(struct file
  	case FBIOPAN_DISPLAY:
  	case FBIOGET_CON2FBMAP:
  	case FBIOPUT_CON2FBMAP:
diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index 0a8ae1c179..8dd9ed5200 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -500,6 +500,7 @@ CONFIG_BASE_SMALL=0
 # CONFIG_BATTERY_MAX17040 is not set
 # CONFIG_BATTERY_MAX17042 is not set
 # CONFIG_BATTERY_MAX1721X is not set
+# CONFIG_BATTERY_RT5033 is not set
 # CONFIG_BATTERY_SBS is not set
 # CONFIG_BAYCOM_EPP is not set
 # CONFIG_BAYCOM_PAR is not set
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch
index ce93640b55..120a14c3be 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch
@@ -27,7 +27,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
  #include <linux/serial_core.h>
  #include <linux/slab.h>
  #include <linux/tty_flip.h>
-@@ -2391,6 +2393,54 @@ static struct uart_driver lpuart_reg = {
+@@ -2394,6 +2396,54 @@ static struct uart_driver lpuart_reg = {
  	.cons		= LPUART_CONSOLE,
  };
  
@@ -82,7 +82,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
  static int lpuart_probe(struct platform_device *pdev)
  {
  	const struct of_device_id *of_id = of_match_device(lpuart_dt_ids,
-@@ -2428,6 +2478,10 @@ static int lpuart_probe(struct platform_
+@@ -2431,6 +2481,10 @@ static int lpuart_probe(struct platform_
  
  	sport->port.rs485_config = lpuart_config_rs485;
  
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch b/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch
index f3ff330281..5ea3d50c37 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch
@@ -17,7 +17,7 @@ Signed-off-by: Adriana Reus <adriana.reus at nxp.com>
 
 --- a/drivers/tty/serial/fsl_lpuart.c
 +++ b/drivers/tty/serial/fsl_lpuart.c
-@@ -2476,7 +2476,7 @@ static int lpuart_probe(struct platform_
+@@ -2479,7 +2479,7 @@ static int lpuart_probe(struct platform_
  		return PTR_ERR(sport->port.membase);
  
  	sport->port.membase += sdata->reg_off;
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch
index 6edcc398d0..f07abc2469 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch
@@ -536,7 +536,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
  		lpuart_dma_rx_free(&sport->port);
  	}
  
-@@ -2480,6 +2636,10 @@ static int lpuart_probe(struct platform_
+@@ -2483,6 +2639,10 @@ static int lpuart_probe(struct platform_
  	sport->port.dev = &pdev->dev;
  	sport->port.type = PORT_LPUART;
  	sport->devtype = sdata->devtype;
@@ -547,7 +547,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
  	ret = platform_get_irq(pdev, 0);
  	if (ret < 0)
  		return ret;
-@@ -2642,7 +2802,7 @@ static int lpuart_suspend(struct device
+@@ -2645,7 +2805,7 @@ static int lpuart_suspend(struct device
  		 * Rx DMA path before suspend and start Rx DMA path on resume.
  		 */
  		if (irq_wake) {
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch
index ab52567a3c..a655a5df01 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch
@@ -105,7 +105,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade at mentor.com>
  static void lpuart_stop_tx(struct uart_port *port)
  {
  	unsigned char temp;
-@@ -2728,6 +2770,10 @@ static int lpuart_probe(struct platform_
+@@ -2731,6 +2773,10 @@ static int lpuart_probe(struct platform_
  	if (ret)
  		goto failed_attach_port;
  
@@ -116,7 +116,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade at mentor.com>
  	uart_get_rs485_mode(&pdev->dev, &sport->port.rs485);
  
  	if (sport->port.rs485.flags & SER_RS485_RX_DURING_TX)
-@@ -2751,6 +2797,8 @@ static int lpuart_probe(struct platform_
+@@ -2754,6 +2800,8 @@ static int lpuart_probe(struct platform_
  
  	return 0;
  
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch
index d819f4790a..5c0329583b 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch
@@ -59,7 +59,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  	.set_termios	= lpuart32_set_termios,
  	.type		= lpuart_type,
  	.request_port	= lpuart_request_port,
-@@ -2766,6 +2783,11 @@ static int lpuart_probe(struct platform_
+@@ -2769,6 +2786,11 @@ static int lpuart_probe(struct platform_
  	if (ret)
  		goto failed_irq_request;
  
@@ -71,7 +71,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  	ret = uart_add_one_port(&lpuart_reg, &sport->port);
  	if (ret)
  		goto failed_attach_port;
-@@ -2800,6 +2822,9 @@ static int lpuart_probe(struct platform_
+@@ -2803,6 +2825,9 @@ static int lpuart_probe(struct platform_
  failed_reset:
  	uart_remove_one_port(&lpuart_reg, &sport->port);
  failed_attach_port:
@@ -81,7 +81,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  failed_irq_request:
  	lpuart_disable_clks(sport);
  failed_clock_enable:
-@@ -2826,15 +2851,41 @@ static int lpuart_remove(struct platform
+@@ -2829,15 +2854,41 @@ static int lpuart_remove(struct platform
  	if (sport->dma_rx_chan)
  		dma_release_channel(sport->dma_rx_chan);
  
@@ -123,7 +123,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  
  	if (lpuart_is_32(sport)) {
  		/* disable Rx/Tx and interrupts */
-@@ -2848,10 +2899,14 @@ static int lpuart_suspend(struct device
+@@ -2851,10 +2902,14 @@ static int lpuart_suspend(struct device
  		writeb(temp, sport->port.membase + UARTCR2);
  	}
  
@@ -138,7 +138,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  
  	if (sport->lpuart_dma_rx_use) {
  		/*
-@@ -2882,9 +2937,6 @@ static int lpuart_suspend(struct device
+@@ -2885,9 +2940,6 @@ static int lpuart_suspend(struct device
  		dmaengine_terminate_all(sport->dma_tx_chan);
  	}
  
@@ -148,7 +148,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  	return 0;
  }
  
-@@ -2892,9 +2944,11 @@ static int lpuart_resume(struct device *
+@@ -2895,9 +2947,11 @@ static int lpuart_resume(struct device *
  {
  	struct lpuart_port *sport = dev_get_drvdata(dev);
  	bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq));
@@ -162,7 +162,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  
  	if (lpuart_is_32(sport))
  		lpuart32_setup_watermark_enable(sport);
-@@ -2915,13 +2969,23 @@ static int lpuart_resume(struct device *
+@@ -2918,13 +2972,23 @@ static int lpuart_resume(struct device *
  	if (lpuart_is_32(sport))
  		lpuart32_configure(sport);
  
@@ -188,7 +188,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  
  static struct platform_driver lpuart_driver = {
  	.probe		= lpuart_probe,
-@@ -2929,7 +2993,7 @@ static struct platform_driver lpuart_dri
+@@ -2932,7 +2996,7 @@ static struct platform_driver lpuart_dri
  	.driver		= {
  		.name	= "fsl-lpuart",
  		.of_match_table = lpuart_dt_ids,
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch
index 69dc1b465a..1f42e5cb5d 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch
@@ -117,7 +117,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
  	return 0;
  }
  
-@@ -2876,108 +2890,205 @@ static int lpuart_runtime_resume(struct
+@@ -2879,108 +2893,205 @@ static int lpuart_runtime_resume(struct
  	return lpuart_enable_clks(sport);
  };
  
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch
index 4223d1e2f2..522d7023ca 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch
@@ -24,7 +24,7 @@ Signed-off-by: Peng Fan <peng.fan at nxp.com>
 
 --- a/drivers/tty/serial/fsl_lpuart.c
 +++ b/drivers/tty/serial/fsl_lpuart.c
-@@ -2614,7 +2614,9 @@ static int __init lpuart32_early_console
+@@ -2617,7 +2617,9 @@ static int __init lpuart32_early_console
  	if (!device->port.membase)
  		return -ENODEV;
  


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:48 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:48 -0400
Subject: [openwrt/openwrt]  kernel/generic: sort the 5.10 kconfig symbols
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9920.1627214331.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/fb6b824bff466f6782f54e5a1543eb2cddec11c8

commit fb6b824bff466f6782f54e5a1543eb2cddec11c8
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Mon Jul 19 00:48:55 2021 +0100

    kernel/generic: sort the 5.10 kconfig symbols
    
    Sort the kernel configuration using scripts/kconfig.pl.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 target/linux/generic/config-5.10 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index 04b9d04531..889f914aa5 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -1005,8 +1005,8 @@ CONFIG_CROSS_COMPILE=""
 # CONFIG_CROSS_MEMORY_ATTACH is not set
 CONFIG_CRYPTO=y
 # CONFIG_CRYPTO_842 is not set
-# CONFIG_CRYPTO_ADIANTUM is not set
 CONFIG_CRYPTO_ACOMP2=y
+# CONFIG_CRYPTO_ADIANTUM is not set
 CONFIG_CRYPTO_AEAD=y
 CONFIG_CRYPTO_AEAD2=y
 # CONFIG_CRYPTO_AEGIS128 is not set
@@ -1124,9 +1124,9 @@ CONFIG_CRYPTO_HASH2=y
 # CONFIG_CRYPTO_HW is not set
 # CONFIG_CRYPTO_JITTERENTROPY is not set
 # CONFIG_CRYPTO_KEYWRAP is not set
+# CONFIG_CRYPTO_KHAZAD is not set
 CONFIG_CRYPTO_KPP=y
 CONFIG_CRYPTO_KPP2=y
-# CONFIG_CRYPTO_KHAZAD is not set
 CONFIG_CRYPTO_LIB_AES=y
 CONFIG_CRYPTO_LIB_ARC4=y
 # CONFIG_CRYPTO_LIB_BLAKE2S is not set
@@ -3563,8 +3563,8 @@ CONFIG_MTD_NAND_IDS=y
 # CONFIG_MTD_NAND_PLATFORM is not set
 # CONFIG_MTD_NAND_PXA3xx is not set
 # CONFIG_MTD_NAND_RB4XX is not set
-# CONFIG_MTD_NAND_RB91X is not set
 # CONFIG_MTD_NAND_RB750 is not set
+# CONFIG_MTD_NAND_RB91X is not set
 # CONFIG_MTD_NAND_RICOH is not set
 # CONFIG_MTD_NAND_S3C2410 is not set
 # CONFIG_MTD_NAND_SHARPSL is not set


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:43 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:43 -0400
Subject: [openwrt/openwrt]  kernel: Add support for XTX XT26G02A SPI NAND
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9921.1627214331.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/92012dd8677a48bf77a69c17fd2b65abd4388f9b

commit 92012dd8677a48bf77a69c17fd2b65abd4388f9b
Author: Felix Matouschek <felix at matouschek.org>
AuthorDate: Fri Jul 2 22:22:02 2021 +0200

    kernel: Add support for XTX XT26G02A SPI NAND
    
    This chip is used on Teltonika RUTX boards.
    
    Signed-off-by: Felix Matouschek <felix at matouschek.org>
---
 ...-mtd-spinand-add-support-for-xtx-xt26g0xa.patch | 178 +++++++++++++++++++
 ...-mtd-spinand-add-support-for-xtx-xt26g0xa.patch | 195 +++++++++++++++++++++
 2 files changed, 373 insertions(+)

diff --git a/target/linux/generic/pending-5.10/483-mtd-spinand-add-support-for-xtx-xt26g0xa.patch b/target/linux/generic/pending-5.10/483-mtd-spinand-add-support-for-xtx-xt26g0xa.patch
new file mode 100644
index 0000000000..11590770cd
--- /dev/null
+++ b/target/linux/generic/pending-5.10/483-mtd-spinand-add-support-for-xtx-xt26g0xa.patch
@@ -0,0 +1,178 @@
+From a07e31adf2753cad2fd9790db5bfc047c81e8152 Mon Sep 17 00:00:00 2001
+From: Felix Matouschek <felix at matouschek.org>
+Date: Fri, 2 Jul 2021 20:31:23 +0200
+Subject: [PATCH] mtd: spinand: Add support for XTX XT26G0xA
+
+Add support for XTX Technology XT26G01AXXXXX, XTX26G02AXXXXX and
+XTX26G04AXXXXX SPI NAND.
+
+These are 3V, 1G/2G/4Gbit serial SLC NAND flash devices with on-die ECC
+(8bit strength per 512bytes).
+
+Tested on Teltonika RUTX10 flashed with OpenWrt.
+
+Datasheets available at
+http://www.xtxtech.com/download/?AId=225
+https://datasheet.lcsc.com/szlcsc/2005251034_XTX-XT26G01AWSEGA_C558841.pdf
+
+Signed-off-by: Felix Matouschek <felix at matouschek.org>
+---
+ drivers/mtd/nand/spi/Makefile |   2 +-
+ drivers/mtd/nand/spi/core.c   |   1 +
+ drivers/mtd/nand/spi/xtx.c    | 122 ++++++++++++++++++++++++++++++++++
+ include/linux/mtd/spinand.h   |   1 +
+ 4 files changed, 125 insertions(+), 1 deletion(-)
+ create mode 100644 drivers/mtd/nand/spi/xtx.c
+
+--- a/drivers/mtd/nand/spi/Makefile
++++ b/drivers/mtd/nand/spi/Makefile
+@@ -1,3 +1,3 @@
+ # SPDX-License-Identifier: GPL-2.0
+-spinand-objs := core.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o
++spinand-objs := core.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o xtx.o
+ obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
+--- a/drivers/mtd/nand/spi/core.c
++++ b/drivers/mtd/nand/spi/core.c
+@@ -760,6 +760,7 @@ static const struct spinand_manufacturer
+ 	&paragon_spinand_manufacturer,
+ 	&toshiba_spinand_manufacturer,
+ 	&winbond_spinand_manufacturer,
++	&xtx_spinand_manufacturer,
+ };
+ 
+ static int spinand_manufacturer_match(struct spinand_device *spinand,
+--- /dev/null
++++ b/drivers/mtd/nand/spi/xtx.c
+@@ -0,0 +1,122 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * Author:
++ * Felix Matouschek <felix at matouschek.org>
++ */
++
++#include <linux/device.h>
++#include <linux/kernel.h>
++#include <linux/mtd/spinand.h>
++
++#define SPINAND_MFR_XTX	0x0B
++
++#define XT26G0XA_STATUS_ECC_MASK	GENMASK(5, 2)
++#define XT26G0XA_STATUS_ECC_NO_DETECTED	(0 << 2)
++#define XT26G0XA_STATUS_ECC_8_CORRECTED	(3 << 4)
++#define XT26G0XA_STATUS_ECC_UNCOR_ERROR	(2 << 4)
++
++static SPINAND_OP_VARIANTS(read_cache_variants,
++		SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 1, NULL, 0),
++		SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
++		SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(0, 1, NULL, 0),
++		SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0),
++		SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0),
++		SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0));
++
++static SPINAND_OP_VARIANTS(write_cache_variants,
++		SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
++		SPINAND_PROG_LOAD(true, 0, NULL, 0));
++
++static SPINAND_OP_VARIANTS(update_cache_variants,
++		SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
++		SPINAND_PROG_LOAD(false, 0, NULL, 0));
++
++static int xt26g0xa_ooblayout_ecc(struct mtd_info *mtd, int section,
++				   struct mtd_oob_region *region)
++{
++	if (section)
++		return -ERANGE;
++
++	region->offset = 8;
++	region->length = 40;
++
++	return 0;
++}
++
++static int xt26g0xa_ooblayout_free(struct mtd_info *mtd, int section,
++				   struct mtd_oob_region *region)
++{
++	if (section)
++		return -ERANGE;
++
++	region->offset = 1;
++	region->length = 7;
++
++	return 0;
++}
++
++static const struct mtd_ooblayout_ops xt26g0xa_ooblayout = {
++	.ecc = xt26g0xa_ooblayout_ecc,
++	.free = xt26g0xa_ooblayout_free,
++};
++
++static int xt26g0xa_ecc_get_status(struct spinand_device *spinand,
++					 u8 status)
++{
++	switch (status & XT26G0XA_STATUS_ECC_MASK) {
++	case XT26G0XA_STATUS_ECC_NO_DETECTED:
++		return 0;
++	case XT26G0XA_STATUS_ECC_8_CORRECTED:
++		return 8;
++	case XT26G0XA_STATUS_ECC_UNCOR_ERROR:
++		return -EBADMSG;
++	default: /* (1 << 2) through (7 << 2) are 1-7 corrected errors */
++		return (status & XT26G0XA_STATUS_ECC_MASK) >> 2;
++	}
++
++	return -EINVAL;
++}
++
++static const struct spinand_info xtx_spinand_table[] = {
++	SPINAND_INFO("XT26G01A",
++		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xE1),
++		     NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
++		     NAND_ECCREQ(8, 512),
++		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
++					      &write_cache_variants,
++					      &update_cache_variants),
++		     SPINAND_HAS_QE_BIT,
++		     SPINAND_ECCINFO(&xt26g0xa_ooblayout,
++				     xt26g0xa_ecc_get_status)),
++	SPINAND_INFO("XT26G02A",
++		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xE2),
++		     NAND_MEMORG(1, 2048, 64, 64, 2048, 40, 1, 1, 1),
++		     NAND_ECCREQ(8, 512),
++		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
++					      &write_cache_variants,
++					      &update_cache_variants),
++		     SPINAND_HAS_QE_BIT,
++		     SPINAND_ECCINFO(&xt26g0xa_ooblayout,
++				     xt26g0xa_ecc_get_status)),
++	SPINAND_INFO("XT26G04A",
++		     SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0xE3),
++		     NAND_MEMORG(1, 2048, 64, 128, 2048, 40, 1, 1, 1),
++		     NAND_ECCREQ(8, 512),
++		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
++					      &write_cache_variants,
++					      &update_cache_variants),
++		     SPINAND_HAS_QE_BIT,
++		     SPINAND_ECCINFO(&xt26g0xa_ooblayout,
++				     xt26g0xa_ecc_get_status)),
++};
++
++static const struct spinand_manufacturer_ops xtx_spinand_manuf_ops = {
++};
++
++const struct spinand_manufacturer xtx_spinand_manufacturer = {
++	.id = SPINAND_MFR_XTX,
++	.name = "XTX",
++	.chips = xtx_spinand_table,
++	.nchips = ARRAY_SIZE(xtx_spinand_table),
++	.ops = &xtx_spinand_manuf_ops,
++};
+--- a/include/linux/mtd/spinand.h
++++ b/include/linux/mtd/spinand.h
+@@ -244,6 +244,7 @@ extern const struct spinand_manufacturer
+ extern const struct spinand_manufacturer paragon_spinand_manufacturer;
+ extern const struct spinand_manufacturer toshiba_spinand_manufacturer;
+ extern const struct spinand_manufacturer winbond_spinand_manufacturer;
++extern const struct spinand_manufacturer xtx_spinand_manufacturer;
+ 
+ /**
+  * struct spinand_op_variants - SPI NAND operation variants
diff --git a/target/linux/generic/pending-5.4/483-mtd-spinand-add-support-for-xtx-xt26g0xa.patch b/target/linux/generic/pending-5.4/483-mtd-spinand-add-support-for-xtx-xt26g0xa.patch
new file mode 100644
index 0000000000..56cfc93c46
--- /dev/null
+++ b/target/linux/generic/pending-5.4/483-mtd-spinand-add-support-for-xtx-xt26g0xa.patch
@@ -0,0 +1,195 @@
+From 8ffe91b6b429277bd7bd79267ba836edf951dce2 Mon Sep 17 00:00:00 2001
+From: Felix Matouschek <felix at matouschek.org>
+Date: Fri, 2 Jul 2021 20:31:23 +0200
+Subject: [PATCH] mtd: spinand: Add support for XTX XT26G0xA
+
+Add support for XTX Technology XT26G01AXXXXX, XTX26G02AXXXXX and
+XTX26G04AXXXXX SPI NAND.
+
+These are 3V, 1G/2G/4Gbit serial SLC NAND flash devices with on-die ECC
+(8bit strength per 512bytes).
+
+Tested on Teltonika RUTX10 flashed with OpenWrt.
+
+Datasheets available at
+http://www.xtxtech.com/download/?AId=225
+https://datasheet.lcsc.com/szlcsc/2005251034_XTX-XT26G01AWSEGA_C558841.pdf
+
+Signed-off-by: Felix Matouschek <felix at matouschek.org>
+---
+ drivers/mtd/nand/spi/Makefile |   2 +-
+ drivers/mtd/nand/spi/core.c   |   1 +
+ drivers/mtd/nand/spi/xtx.c    | 139 ++++++++++++++++++++++++++++++++++
+ include/linux/mtd/spinand.h   |   1 +
+ 4 files changed, 142 insertions(+), 1 deletion(-)
+ create mode 100644 drivers/mtd/nand/spi/xtx.c
+
+--- a/drivers/mtd/nand/spi/Makefile
++++ b/drivers/mtd/nand/spi/Makefile
+@@ -1,3 +1,3 @@
+ # SPDX-License-Identifier: GPL-2.0
+-spinand-objs := core.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o
++spinand-objs := core.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o xtx.o
+ obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
+--- a/drivers/mtd/nand/spi/core.c
++++ b/drivers/mtd/nand/spi/core.c
+@@ -758,6 +758,7 @@ static const struct spinand_manufacturer
+ 	&paragon_spinand_manufacturer,
+ 	&toshiba_spinand_manufacturer,
+ 	&winbond_spinand_manufacturer,
++	&xtx_spinand_manufacturer,
+ };
+ 
+ static int spinand_manufacturer_detect(struct spinand_device *spinand)
+--- /dev/null
++++ b/drivers/mtd/nand/spi/xtx.c
+@@ -0,0 +1,139 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * Author:
++ * Felix Matouschek <felix at matouschek.org>
++ */
++
++#include <linux/device.h>
++#include <linux/kernel.h>
++#include <linux/mtd/spinand.h>
++
++#define SPINAND_MFR_XTX	0x0B
++
++#define XT26G0XA_STATUS_ECC_MASK	GENMASK(5, 2)
++#define XT26G0XA_STATUS_ECC_NO_DETECTED	(0 << 2)
++#define XT26G0XA_STATUS_ECC_8_CORRECTED	(3 << 4)
++#define XT26G0XA_STATUS_ECC_UNCOR_ERROR	(2 << 4)
++
++static SPINAND_OP_VARIANTS(read_cache_variants,
++		SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 1, NULL, 0),
++		SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
++		SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(0, 1, NULL, 0),
++		SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0),
++		SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0),
++		SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0));
++
++static SPINAND_OP_VARIANTS(write_cache_variants,
++		SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
++		SPINAND_PROG_LOAD(true, 0, NULL, 0));
++
++static SPINAND_OP_VARIANTS(update_cache_variants,
++		SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
++		SPINAND_PROG_LOAD(false, 0, NULL, 0));
++
++static int xt26g0xa_ooblayout_ecc(struct mtd_info *mtd, int section,
++				   struct mtd_oob_region *region)
++{
++	if (section)
++		return -ERANGE;
++
++	region->offset = 8;
++	region->length = 40;
++
++	return 0;
++}
++
++static int xt26g0xa_ooblayout_free(struct mtd_info *mtd, int section,
++				   struct mtd_oob_region *region)
++{
++	if (section)
++		return -ERANGE;
++
++	region->offset = 1;
++	region->length = 7;
++
++	return 0;
++}
++
++static const struct mtd_ooblayout_ops xt26g0xa_ooblayout = {
++	.ecc = xt26g0xa_ooblayout_ecc,
++	.free = xt26g0xa_ooblayout_free,
++};
++
++static int xt26g0xa_ecc_get_status(struct spinand_device *spinand,
++					 u8 status)
++{
++	switch (status & XT26G0XA_STATUS_ECC_MASK) {
++	case XT26G0XA_STATUS_ECC_NO_DETECTED:
++		return 0;
++	case XT26G0XA_STATUS_ECC_8_CORRECTED:
++		return 8;
++	case XT26G0XA_STATUS_ECC_UNCOR_ERROR:
++		return -EBADMSG;
++	default: /* (1 << 2) through (7 << 2) are 1-7 corrected errors */
++		return (status & XT26G0XA_STATUS_ECC_MASK) >> 2;
++	}
++
++	return -EINVAL;
++}
++
++static const struct spinand_info xtx_spinand_table[] = {
++	SPINAND_INFO("XT26G01A", 0xE1,
++		     NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
++		     NAND_ECCREQ(8, 512),
++		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
++					      &write_cache_variants,
++					      &update_cache_variants),
++		     SPINAND_HAS_QE_BIT,
++		     SPINAND_ECCINFO(&xt26g0xa_ooblayout,
++				     xt26g0xa_ecc_get_status)),
++	SPINAND_INFO("XT26G02A", 0xE2,
++		     NAND_MEMORG(1, 2048, 64, 64, 2048, 40, 1, 1, 1),
++		     NAND_ECCREQ(8, 512),
++		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
++					      &write_cache_variants,
++					      &update_cache_variants),
++		     SPINAND_HAS_QE_BIT,
++		     SPINAND_ECCINFO(&xt26g0xa_ooblayout,
++				     xt26g0xa_ecc_get_status)),
++	SPINAND_INFO("XT26G04A", 0xE3,
++		     NAND_MEMORG(1, 2048, 64, 128, 2048, 40, 1, 1, 1),
++		     NAND_ECCREQ(8, 512),
++		     SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
++					      &write_cache_variants,
++					      &update_cache_variants),
++		     SPINAND_HAS_QE_BIT,
++		     SPINAND_ECCINFO(&xt26g0xa_ooblayout,
++				     xt26g0xa_ecc_get_status)),
++};
++
++static int xtx_spinand_detect(struct spinand_device *spinand)
++{
++	u8 *id = spinand->id.data;
++	int ret;
++
++	/*
++	 * XTX SPI NAND read ID needs a dummy byte, so the first byte in
++	 * raw_id is garbage.
++	 */
++	if (id[1] != SPINAND_MFR_XTX)
++		return 0;
++
++	ret = spinand_match_and_init(spinand, xtx_spinand_table,
++				     ARRAY_SIZE(xtx_spinand_table),
++				     id[2]);
++	if (ret)
++		return ret;
++
++	return 1;
++}
++
++static const struct spinand_manufacturer_ops xtx_spinand_manuf_ops = {
++	.detect = xtx_spinand_detect,
++};
++
++const struct spinand_manufacturer xtx_spinand_manufacturer = {
++	.id = SPINAND_MFR_XTX,
++	.name = "XTX",
++	.ops = &xtx_spinand_manuf_ops,
++};
+--- a/include/linux/mtd/spinand.h
++++ b/include/linux/mtd/spinand.h
+@@ -230,6 +230,7 @@ extern const struct spinand_manufacturer
+ extern const struct spinand_manufacturer paragon_spinand_manufacturer;
+ extern const struct spinand_manufacturer toshiba_spinand_manufacturer;
+ extern const struct spinand_manufacturer winbond_spinand_manufacturer;
++extern const struct spinand_manufacturer xtx_spinand_manufacturer;
+ 
+ /**
+  * struct spinand_op_variants - SPI NAND operation variants


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:42 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:42 -0400
Subject: [openwrt/openwrt] kernel: backport workaround for Realtek RTL8672
 and RTL9601C chips
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9924.1627214333.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f032601ed7d70fe1f468219b68750230b6ea1906

commit f032601ed7d70fe1f468219b68750230b6ea1906
Author: Vladimir Markovets <abam_a at yahoo.com>
AuthorDate: Thu Jul 22 00:09:22 2021 +0200

    kernel: backport workaround for Realtek RTL8672 and RTL9601C chips
    
    Adds support for GPON SFP modules based on the Realtek RTL8672 and
    RTL9601C chips, including but not limited to:
    * V-SOL V2801F
    * C-Data FD511GX-RM0
    * OPTON GP801R
    * BAUDCOM BD-1234-SFM
    * CPGOS03-0490 v2.0
    * Ubiquiti U-Fiber Instant
    * EXOT EGS1
    
    Signed-off-by: Vladimir Markovets <abam_a at yahoo.com>
---
 ...L-V2801F-CarlitoxxPro-CPGOS03-0490-v2.0-w.patch | 144 ++++++++++++++
 ...-workaround-for-Realtek-RTL8672-and-RTL96.patch | 211 +++++++++++++++++++++
 ...net-avoid-tx-fault-with-Nokia-GPON-module.patch |  12 +-
 ...ove-incomplete-100BASE-FX-and-100BASE-LX-.patch |   2 +-
 ...et-sfp-add-more-extended-compliance-codes.patch |   4 +-
 ...-module-start-stop-upstream-notifications.patch |   4 +-
 ...et-sfp-move-phy_start-phy_stop-to-phylink.patch |   4 +-
 ...53-net-sfp-add-support-for-Clause-45-PHYs.patch |   8 +-
 .../pending-5.4/754-net-sfp-fix-unbind.patch       |   2 +-
 .../pending-5.4/755-net-sfp-fix-hwmon.patch        |   4 +-
 ...-a-definition-for-the-fault-recovery-atte.patch |   6 +-
 .../757-net-sfp-rename-sm_retries.patch            |  10 +-
 .../758-net-sfp-error-handling-for-phy-probe.patch |  10 +-
 .../759-net-sfp-re-attempt-probing-for-phy.patch   |   8 +-
 14 files changed, 392 insertions(+), 37 deletions(-)

diff --git a/target/linux/generic/backport-5.4/852-v5.10-0001-net-sfp-VSOL-V2801F-CarlitoxxPro-CPGOS03-0490-v2.0-w.patch b/target/linux/generic/backport-5.4/852-v5.10-0001-net-sfp-VSOL-V2801F-CarlitoxxPro-CPGOS03-0490-v2.0-w.patch
new file mode 100644
index 0000000000..1901054a10
--- /dev/null
+++ b/target/linux/generic/backport-5.4/852-v5.10-0001-net-sfp-VSOL-V2801F-CarlitoxxPro-CPGOS03-0490-v2.0-w.patch
@@ -0,0 +1,144 @@
+From 0d035bed2a4a6c4878518749348be61bf082d12a Mon Sep 17 00:00:00 2001
+From: Russell King <rmk+kernel at armlinux.org.uk>
+Date: Wed, 9 Dec 2020 11:22:49 +0000
+Subject: [PATCH] net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0
+ workaround
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add a workaround for the detection of VSOL V2801F / CarlitoxxPro
+CPGOS03-0490 v2.0 GPON module which CarlitoxxPro states needs single
+byte I2C reads to the EEPROM.
+
+Pali Roh?r reports that he also has a CarlitoxxPro-based V2801F module,
+which reports a manufacturer of "OEM". This manufacturer can't be
+matched as it appears in many different modules, so also match the part
+number too.
+
+Reported-by: Thomas Schreiber <tschreibe at gmail.com>
+Reported-by: Pali Roh?r <pali at kernel.org>
+Tested-by: Pali Roh?r <pali at kernel.org>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/phy/sfp.c | 63 +++++++++++++++++++++++++++++++++++++++----
+ 1 file changed, 58 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/phy/sfp.c
++++ b/drivers/net/phy/sfp.c
+@@ -191,6 +191,7 @@ struct sfp {
+ 	struct sfp_bus *sfp_bus;
+ 	struct phy_device *mod_phy;
+ 	const struct sff_data *type;
++	size_t i2c_block_size;
+ 	u32 max_power_mW;
+ 
+ 	unsigned int (*get_state)(struct sfp *);
+@@ -305,10 +306,19 @@ static int sfp_i2c_read(struct sfp *sfp,
+ 			size_t len)
+ {
+ 	struct i2c_msg msgs[2];
+-	u8 bus_addr = a2 ? 0x51 : 0x50;
++	size_t block_size;
+ 	size_t this_len;
++	u8 bus_addr;
+ 	int ret;
+ 
++	if (a2) {
++		block_size = 16;
++		bus_addr = 0x51;
++	} else {
++		block_size = sfp->i2c_block_size;
++		bus_addr = 0x50;
++	}
++
+ 	msgs[0].addr = bus_addr;
+ 	msgs[0].flags = 0;
+ 	msgs[0].len = 1;
+@@ -320,8 +330,8 @@ static int sfp_i2c_read(struct sfp *sfp,
+ 
+ 	while (len) {
+ 		this_len = len;
+-		if (this_len > 16)
+-			this_len = 16;
++		if (this_len > block_size)
++			this_len = block_size;
+ 
+ 		msgs[1].len = this_len;
+ 
+@@ -1569,6 +1579,28 @@ static int sfp_sm_mod_hpower(struct sfp
+ 	return 0;
+ }
+ 
++/* Some modules (Nokia 3FE46541AA) lock up if byte 0x51 is read as a
++ * single read. Switch back to reading 16 byte blocks unless we have
++ * a CarlitoxxPro module (rebranded VSOL V2801F). Even more annoyingly,
++ * some VSOL V2801F have the vendor name changed to OEM.
++ */
++static int sfp_quirk_i2c_block_size(const struct sfp_eeprom_base *base)
++{
++	if (!memcmp(base->vendor_name, "VSOL            ", 16))
++		return 1;
++	if (!memcmp(base->vendor_name, "OEM             ", 16) &&
++	    !memcmp(base->vendor_pn,   "V2801F          ", 16))
++		return 1;
++
++	/* Some modules can't cope with long reads */
++	return 16;
++}
++
++static void sfp_quirks_base(struct sfp *sfp, const struct sfp_eeprom_base *base)
++{
++	sfp->i2c_block_size = sfp_quirk_i2c_block_size(base);
++}
++
+ static int sfp_sm_mod_probe(struct sfp *sfp, bool report)
+ {
+ 	/* SFP module inserted - read I2C data */
+@@ -1577,14 +1609,20 @@ static int sfp_sm_mod_probe(struct sfp *
+ 	u8 check;
+ 	int ret;
+ 
+-	ret = sfp_read(sfp, false, 0, &id, sizeof(id));
++	/* Some modules (CarlitoxxPro CPGOS03-0490) do not support multibyte
++	 * reads from the EEPROM, so start by reading the base identifying
++	 * information one byte at a time.
++	 */
++	sfp->i2c_block_size = 1;
++
++	ret = sfp_read(sfp, false, 0, &id.base, sizeof(id.base));
+ 	if (ret < 0) {
+ 		if (report)
+ 			dev_err(sfp->dev, "failed to read EEPROM: %d\n", ret);
+ 		return -EAGAIN;
+ 	}
+ 
+-	if (ret != sizeof(id)) {
++	if (ret != sizeof(id.base)) {
+ 		dev_err(sfp->dev, "EEPROM short read: %d\n", ret);
+ 		return -EAGAIN;
+ 	}
+@@ -1612,6 +1650,21 @@ static int sfp_sm_mod_probe(struct sfp *
+ 		}
+ 	}
+ 
++	/* Apply any early module-specific quirks */
++	sfp_quirks_base(sfp, &id.base);
++
++	ret = sfp_read(sfp, false, SFP_CC_BASE + 1, &id.ext, sizeof(id.ext));
++	if (ret < 0) {
++		if (report)
++			dev_err(sfp->dev, "failed to read EEPROM: %d\n", ret);
++		return -EAGAIN;
++	}
++
++	if (ret != sizeof(id.ext)) {
++		dev_err(sfp->dev, "EEPROM short read: %d\n", ret);
++		return -EAGAIN;
++	}
++
+ 	check = sfp_check(&id.ext, sizeof(id.ext) - 1);
+ 	if (check != id.ext.cc_ext) {
+ 		if (cotsworks) {
diff --git a/target/linux/generic/backport-5.4/852-v5.10-0002-net-sfp-add-workaround-for-Realtek-RTL8672-and-RTL96.patch b/target/linux/generic/backport-5.4/852-v5.10-0002-net-sfp-add-workaround-for-Realtek-RTL8672-and-RTL96.patch
new file mode 100644
index 0000000000..27ae97cee7
--- /dev/null
+++ b/target/linux/generic/backport-5.4/852-v5.10-0002-net-sfp-add-workaround-for-Realtek-RTL8672-and-RTL96.patch
@@ -0,0 +1,211 @@
+From 426c6cbc409cbda9ab1a9dbf15d3c2ef947eb8c1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali at kernel.org>
+Date: Mon, 25 Jan 2021 16:02:27 +0100
+Subject: [PATCH] net: sfp: add workaround for Realtek RTL8672 and RTL9601C
+ chips
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The workaround for VSOL V2801F brand based GPON SFP modules added in commit
+0d035bed2a4a ("net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0
+workaround") works only for IDs added explicitly to the list. Since there
+are rebranded modules where OEM vendors put different strings into the
+vendor name field, we cannot base workaround on IDs only.
+
+Moreover the issue which the above mentioned commit tried to work around is
+generic not only to VSOL based modules, but rather to all GPON modules
+based on Realtek RTL8672 and RTL9601C chips.
+
+These include at least the following GPON modules:
+* V-SOL V2801F
+* C-Data FD511GX-RM0
+* OPTON GP801R
+* BAUDCOM BD-1234-SFM
+* CPGOS03-0490 v2.0
+* Ubiquiti U-Fiber Instant
+* EXOT EGS1
+
+These Realtek chips have broken EEPROM emulator which for N-byte read
+operation returns just the first byte of EEPROM data, followed by N-1
+zeros.
+
+Introduce a new function, sfp_id_needs_byte_io(), which detects SFP modules
+with broken EEPROM emulator based on N-1 zeros and switch to 1 byte EEPROM
+reading operation.
+
+Function sfp_i2c_read() now always uses single byte reading when it is
+required and when function sfp_hwmon_probe() detects single byte access,
+it disables registration of hwmon device, because in this case we cannot
+reliably and atomically read 2 bytes as is required by the standard for
+retrieving values from diagnostic area.
+
+(These Realtek chips are broken in a way that violates SFP standards for
+diagnostic interface. Kernel in this case simply cannot do anything less
+of skipping registration of the hwmon interface.)
+
+This patch fixes reading of EEPROM content from SFP modules based on
+Realtek RTL8672 and RTL9601C chips. Diagnostic interface of EEPROM stays
+broken and cannot be fixed.
+
+Fixes: 0d035bed2a4a ("net: sfp: VSOL V2801F / CarlitoxxPro CPGOS03-0490 v2.0 workaround")
+Co-developed-by: Russell King <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Pali Roh?r <pali at kernel.org>
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/phy/sfp.c | 100 ++++++++++++++++++++++++++++--------------
+ 1 file changed, 67 insertions(+), 33 deletions(-)
+
+--- a/drivers/net/phy/sfp.c
++++ b/drivers/net/phy/sfp.c
+@@ -306,19 +306,11 @@ static int sfp_i2c_read(struct sfp *sfp,
+ 			size_t len)
+ {
+ 	struct i2c_msg msgs[2];
+-	size_t block_size;
++	u8 bus_addr = a2 ? 0x51 : 0x50;
++	size_t block_size = sfp->i2c_block_size;
+ 	size_t this_len;
+-	u8 bus_addr;
+ 	int ret;
+ 
+-	if (a2) {
+-		block_size = 16;
+-		bus_addr = 0x51;
+-	} else {
+-		block_size = sfp->i2c_block_size;
+-		bus_addr = 0x50;
+-	}
+-
+ 	msgs[0].addr = bus_addr;
+ 	msgs[0].flags = 0;
+ 	msgs[0].len = 1;
+@@ -1245,6 +1237,20 @@ static void sfp_hwmon_probe(struct work_
+ 	struct sfp *sfp = container_of(work, struct sfp, hwmon_probe.work);
+ 	int err, i;
+ 
++	/* hwmon interface needs to access 16bit registers in atomic way to
++	 * guarantee coherency of the diagnostic monitoring data. If it is not
++	 * possible to guarantee coherency because EEPROM is broken in such way
++	 * that does not support atomic 16bit read operation then we have to
++	 * skip registration of hwmon device.
++	 */
++	if (sfp->i2c_block_size < 2) {
++		dev_info(sfp->dev,
++			 "skipping hwmon device registration due to broken EEPROM\n");
++		dev_info(sfp->dev,
++			 "diagnostic EEPROM area cannot be read atomically to guarantee data coherency\n");
++		return;
++	}
++
+ 	err = sfp_read(sfp, true, 0, &sfp->diag, sizeof(sfp->diag));
+ 	if (err < 0) {
+ 		if (sfp->hwmon_tries--) {
+@@ -1579,26 +1585,30 @@ static int sfp_sm_mod_hpower(struct sfp
+ 	return 0;
+ }
+ 
+-/* Some modules (Nokia 3FE46541AA) lock up if byte 0x51 is read as a
+- * single read. Switch back to reading 16 byte blocks unless we have
+- * a CarlitoxxPro module (rebranded VSOL V2801F). Even more annoyingly,
+- * some VSOL V2801F have the vendor name changed to OEM.
++/* GPON modules based on Realtek RTL8672 and RTL9601C chips (e.g. V-SOL
++ * V2801F, CarlitoxxPro CPGOS03-0490, Ubiquiti U-Fiber Instant, ...) do
++ * not support multibyte reads from the EEPROM. Each multi-byte read
++ * operation returns just one byte of EEPROM followed by zeros. There is
++ * no way to identify which modules are using Realtek RTL8672 and RTL9601C
++ * chips. Moreover every OEM of V-SOL V2801F module puts its own vendor
++ * name and vendor id into EEPROM, so there is even no way to detect if
++ * module is V-SOL V2801F. Therefore check for those zeros in the read
++ * data and then based on check switch to reading EEPROM to one byte
++ * at a time.
+  */
+-static int sfp_quirk_i2c_block_size(const struct sfp_eeprom_base *base)
++static bool sfp_id_needs_byte_io(struct sfp *sfp, void *buf, size_t len)
+ {
+-	if (!memcmp(base->vendor_name, "VSOL            ", 16))
+-		return 1;
+-	if (!memcmp(base->vendor_name, "OEM             ", 16) &&
+-	    !memcmp(base->vendor_pn,   "V2801F          ", 16))
+-		return 1;
++	size_t i, block_size = sfp->i2c_block_size;
+ 
+-	/* Some modules can't cope with long reads */
+-	return 16;
+-}
++	/* Already using byte IO */
++	if (block_size == 1)
++		return false;
+ 
+-static void sfp_quirks_base(struct sfp *sfp, const struct sfp_eeprom_base *base)
+-{
+-	sfp->i2c_block_size = sfp_quirk_i2c_block_size(base);
++	for (i = 1; i < len; i += block_size) {
++		if (memchr_inv(buf + i, '\0', min(block_size - 1, len - i)))
++			return false;
++	}
++	return true;
+ }
+ 
+ static int sfp_sm_mod_probe(struct sfp *sfp, bool report)
+@@ -1609,11 +1619,11 @@ static int sfp_sm_mod_probe(struct sfp *
+ 	u8 check;
+ 	int ret;
+ 
+-	/* Some modules (CarlitoxxPro CPGOS03-0490) do not support multibyte
+-	 * reads from the EEPROM, so start by reading the base identifying
+-	 * information one byte at a time.
++	/* Some SFP modules and also some Linux I2C drivers do not like reads
++	 * longer than 16 bytes, so read the EEPROM in chunks of 16 bytes at
++	 * a time.
+ 	 */
+-	sfp->i2c_block_size = 1;
++	sfp->i2c_block_size = 16;
+ 
+ 	ret = sfp_read(sfp, false, 0, &id.base, sizeof(id.base));
+ 	if (ret < 0) {
+@@ -1627,6 +1637,33 @@ static int sfp_sm_mod_probe(struct sfp *
+ 		return -EAGAIN;
+ 	}
+ 
++	/* Some SFP modules (e.g. Nokia 3FE46541AA) lock up if read from
++	 * address 0x51 is just one byte at a time. Also SFF-8472 requires
++	 * that EEPROM supports atomic 16bit read operation for diagnostic
++	 * fields, so do not switch to one byte reading at a time unless it
++	 * is really required and we have no other option.
++	 */
++	if (sfp_id_needs_byte_io(sfp, &id.base, sizeof(id.base))) {
++		dev_info(sfp->dev,
++			 "Detected broken RTL8672/RTL9601C emulated EEPROM\n");
++		dev_info(sfp->dev,
++			 "Switching to reading EEPROM to one byte at a time\n");
++		sfp->i2c_block_size = 1;
++
++		ret = sfp_read(sfp, false, 0, &id.base, sizeof(id.base));
++		if (ret < 0) {
++			if (report)
++				dev_err(sfp->dev, "failed to read EEPROM: %d\n",
++					ret);
++			return -EAGAIN;
++		}
++
++		if (ret != sizeof(id.base)) {
++			dev_err(sfp->dev, "EEPROM short read: %d\n", ret);
++			return -EAGAIN;
++		}
++	}
++
+ 	/* Cotsworks do not seem to update the checksums when they
+ 	 * do the final programming with the final module part number,
+ 	 * serial number and date code.
+@@ -1650,9 +1687,6 @@ static int sfp_sm_mod_probe(struct sfp *
+ 		}
+ 	}
+ 
+-	/* Apply any early module-specific quirks */
+-	sfp_quirks_base(sfp, &id.base);
+-
+ 	ret = sfp_read(sfp, false, SFP_CC_BASE + 1, &id.ext, sizeof(id.ext));
+ 	if (ret < 0) {
+ 		if (report)
diff --git a/target/linux/generic/pending-5.4/739-net-avoid-tx-fault-with-Nokia-GPON-module.patch b/target/linux/generic/pending-5.4/739-net-avoid-tx-fault-with-Nokia-GPON-module.patch
index 627d33e2ea..6648d10c81 100644
--- a/target/linux/generic/pending-5.4/739-net-avoid-tx-fault-with-Nokia-GPON-module.patch
+++ b/target/linux/generic/pending-5.4/739-net-avoid-tx-fault-with-Nokia-GPON-module.patch
@@ -39,7 +39,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  
  /* SFP module presence detection is poor: the three MOD DEF signals are
   * the same length on the PCB, which means it's possible for MOD DEF 0 to
-@@ -218,6 +228,7 @@ struct sfp {
+@@ -219,6 +229,7 @@ struct sfp {
  
  	struct sfp_eeprom_id id;
  	unsigned int module_power_mW;
@@ -47,7 +47,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  
  #if IS_ENABLED(CONFIG_HWMON)
  	struct sfp_diag diag;
-@@ -1655,6 +1666,12 @@ static int sfp_sm_mod_probe(struct sfp *
+@@ -1742,6 +1753,12 @@ static int sfp_sm_mod_probe(struct sfp *
  	if (ret < 0)
  		return ret;
  
@@ -60,7 +60,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	return 0;
  }
  
-@@ -1860,11 +1877,12 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1947,11 +1964,12 @@ static void sfp_sm_main(struct sfp *sfp,
  			break;
  
  		if (sfp->state & SFP_F_TX_FAULT) {
@@ -77,7 +77,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  			if (timeout > T_WAIT)
  				timeout -= T_WAIT;
  			else
-@@ -1881,8 +1899,8 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1968,8 +1986,8 @@ static void sfp_sm_main(struct sfp *sfp,
  
  	case SFP_S_INIT:
  		if (event == SFP_E_TIMEOUT && sfp->state & SFP_F_TX_FAULT) {
@@ -88,7 +88,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  			 */
  			sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
  				     sfp->sm_retries == 5);
-@@ -1901,7 +1919,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1988,7 +2006,7 @@ static void sfp_sm_main(struct sfp *sfp,
  	case SFP_S_INIT_TX_FAULT:
  		if (event == SFP_E_TIMEOUT) {
  			sfp_module_tx_fault_reset(sfp);
@@ -97,7 +97,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  		}
  		break;
  
-@@ -1925,7 +1943,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2012,7 +2030,7 @@ static void sfp_sm_main(struct sfp *sfp,
  	case SFP_S_TX_FAULT:
  		if (event == SFP_E_TIMEOUT) {
  			sfp_module_tx_fault_reset(sfp);
diff --git a/target/linux/generic/pending-5.4/740-net-sfp-remove-incomplete-100BASE-FX-and-100BASE-LX-.patch b/target/linux/generic/pending-5.4/740-net-sfp-remove-incomplete-100BASE-FX-and-100BASE-LX-.patch
index 4de6305827..1abc34e94b 100644
--- a/target/linux/generic/pending-5.4/740-net-sfp-remove-incomplete-100BASE-FX-and-100BASE-LX-.patch
+++ b/target/linux/generic/pending-5.4/740-net-sfp-remove-incomplete-100BASE-FX-and-100BASE-LX-.patch
@@ -30,7 +30,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	if (phylink_test(link_modes, 1000baseX_Full))
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -1489,18 +1489,7 @@ static void sfp_sm_fault(struct sfp *sfp
+@@ -1505,18 +1505,7 @@ static void sfp_sm_fault(struct sfp *sfp
  
  static void sfp_sm_probe_for_phy(struct sfp *sfp)
  {
diff --git a/target/linux/generic/pending-5.4/742-net-sfp-add-more-extended-compliance-codes.patch b/target/linux/generic/pending-5.4/742-net-sfp-add-more-extended-compliance-codes.patch
index 0ddca287b9..868e14520b 100644
--- a/target/linux/generic/pending-5.4/742-net-sfp-add-more-extended-compliance-codes.patch
+++ b/target/linux/generic/pending-5.4/742-net-sfp-add-more-extended-compliance-codes.patch
@@ -132,7 +132,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	if (phylink_test(link_modes, 2500baseX_Full))
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -242,7 +242,7 @@ struct sfp {
+@@ -243,7 +243,7 @@ struct sfp {
  
  static bool sff_module_supported(const struct sfp_eeprom_id *id)
  {
@@ -141,7 +141,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	       id->base.phys_ext_id == SFP_PHYS_EXT_ID_SFP;
  }
  
-@@ -253,7 +253,7 @@ static const struct sff_data sff_data =
+@@ -254,7 +254,7 @@ static const struct sff_data sff_data =
  
  static bool sfp_module_supported(const struct sfp_eeprom_id *id)
  {
diff --git a/target/linux/generic/pending-5.4/743-net-sfp-add-module-start-stop-upstream-notifications.patch b/target/linux/generic/pending-5.4/743-net-sfp-add-module-start-stop-upstream-notifications.patch
index 44de1b2a32..3dc8f60020 100644
--- a/target/linux/generic/pending-5.4/743-net-sfp-add-module-start-stop-upstream-notifications.patch
+++ b/target/linux/generic/pending-5.4/743-net-sfp-add-module-start-stop-upstream-notifications.patch
@@ -78,7 +78,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	[SFP_S_WAIT] = "wait",
  	[SFP_S_INIT] = "init",
  	[SFP_S_INIT_TX_FAULT] = "init_tx_fault",
-@@ -1831,6 +1833,8 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1918,6 +1920,8 @@ static void sfp_sm_main(struct sfp *sfp,
  		if (sfp->sm_state == SFP_S_LINK_UP &&
  		    sfp->sm_dev_state == SFP_DEV_UP)
  			sfp_sm_link_down(sfp);
@@ -87,7 +87,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  		if (sfp->mod_phy)
  			sfp_sm_phy_detach(sfp);
  		sfp_module_tx_disable(sfp);
-@@ -1898,6 +1902,10 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1985,6 +1989,10 @@ static void sfp_sm_main(struct sfp *sfp,
  			 * clear.  Probe for the PHY and check the LOS state.
  			 */
  			sfp_sm_probe_for_phy(sfp);
diff --git a/target/linux/generic/pending-5.4/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch b/target/linux/generic/pending-5.4/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch
index e88a81df2d..98987d5a49 100644
--- a/target/linux/generic/pending-5.4/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch
+++ b/target/linux/generic/pending-5.4/744-net-sfp-move-phy_start-phy_stop-to-phylink.patch
@@ -54,7 +54,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	.connect_phy = phylink_sfp_connect_phy,
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -1396,7 +1396,6 @@ static void sfp_sm_mod_next(struct sfp *
+@@ -1412,7 +1412,6 @@ static void sfp_sm_mod_next(struct sfp *
  
  static void sfp_sm_phy_detach(struct sfp *sfp)
  {
@@ -62,7 +62,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	sfp_remove_phy(sfp->sfp_bus);
  	phy_device_remove(sfp->mod_phy);
  	phy_device_free(sfp->mod_phy);
-@@ -1427,7 +1426,6 @@ static void sfp_sm_probe_phy(struct sfp
+@@ -1443,7 +1442,6 @@ static void sfp_sm_probe_phy(struct sfp
  	}
  
  	sfp->mod_phy = phy;
diff --git a/target/linux/generic/pending-5.4/753-net-sfp-add-support-for-Clause-45-PHYs.patch b/target/linux/generic/pending-5.4/753-net-sfp-add-support-for-Clause-45-PHYs.patch
index 338ddc3761..dcd1ba7ef3 100644
--- a/target/linux/generic/pending-5.4/753-net-sfp-add-support-for-Clause-45-PHYs.patch
+++ b/target/linux/generic/pending-5.4/753-net-sfp-add-support-for-Clause-45-PHYs.patch
@@ -14,7 +14,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
 
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -1402,12 +1402,12 @@ static void sfp_sm_phy_detach(struct sfp
+@@ -1418,12 +1418,12 @@ static void sfp_sm_phy_detach(struct sfp
  	sfp->mod_phy = NULL;
  }
  
@@ -29,7 +29,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	if (phy == ERR_PTR(-ENODEV)) {
  		dev_info(sfp->dev, "no PHY detected\n");
  		return;
-@@ -1417,6 +1417,13 @@ static void sfp_sm_probe_phy(struct sfp
+@@ -1433,6 +1433,13 @@ static void sfp_sm_probe_phy(struct sfp
  		return;
  	}
  
@@ -43,7 +43,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	err = sfp_add_phy(sfp->sfp_bus, phy);
  	if (err) {
  		phy_device_remove(phy);
-@@ -1487,10 +1494,32 @@ static void sfp_sm_fault(struct sfp *sfp
+@@ -1503,10 +1510,32 @@ static void sfp_sm_fault(struct sfp *sfp
  	}
  }
  
@@ -78,7 +78,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  }
  
  static int sfp_module_parse_power(struct sfp *sfp)
-@@ -1550,6 +1579,13 @@ static int sfp_sm_mod_hpower(struct sfp
+@@ -1566,6 +1595,13 @@ static int sfp_sm_mod_hpower(struct sfp
  		return -EAGAIN;
  	}
  
diff --git a/target/linux/generic/pending-5.4/754-net-sfp-fix-unbind.patch b/target/linux/generic/pending-5.4/754-net-sfp-fix-unbind.patch
index 8d98a5d7a1..c31922e021 100644
--- a/target/linux/generic/pending-5.4/754-net-sfp-fix-unbind.patch
+++ b/target/linux/generic/pending-5.4/754-net-sfp-fix-unbind.patch
@@ -15,7 +15,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
 
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -2344,6 +2344,10 @@ static int sfp_remove(struct platform_de
+@@ -2431,6 +2431,10 @@ static int sfp_remove(struct platform_de
  
  	sfp_unregister_socket(sfp->sfp_bus);
  
diff --git a/target/linux/generic/pending-5.4/755-net-sfp-fix-hwmon.patch b/target/linux/generic/pending-5.4/755-net-sfp-fix-hwmon.patch
index 8bfe37bf4c..a18e4801a2 100644
--- a/target/linux/generic/pending-5.4/755-net-sfp-fix-hwmon.patch
+++ b/target/linux/generic/pending-5.4/755-net-sfp-fix-hwmon.patch
@@ -15,7 +15,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
 
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -1796,6 +1796,10 @@ static void sfp_sm_module(struct sfp *sf
+@@ -1883,6 +1883,10 @@ static void sfp_sm_module(struct sfp *sf
  			break;
  		}
  
@@ -26,7 +26,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  		sfp_sm_mod_next(sfp, SFP_MOD_WAITDEV, 0);
  		/* fall through */
  	case SFP_MOD_WAITDEV:
-@@ -1845,15 +1849,6 @@ static void sfp_sm_module(struct sfp *sf
+@@ -1932,15 +1936,6 @@ static void sfp_sm_module(struct sfp *sf
  	case SFP_MOD_ERROR:
  		break;
  	}
diff --git a/target/linux/generic/pending-5.4/756-net-sfp-use-a-definition-for-the-fault-recovery-atte.patch b/target/linux/generic/pending-5.4/756-net-sfp-use-a-definition-for-the-fault-recovery-atte.patch
index 47d807813a..ba4f8c40c4 100644
--- a/target/linux/generic/pending-5.4/756-net-sfp-use-a-definition-for-the-fault-recovery-atte.patch
+++ b/target/linux/generic/pending-5.4/756-net-sfp-use-a-definition-for-the-fault-recovery-atte.patch
@@ -26,7 +26,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  /* SFP module presence detection is poor: the three MOD DEF signals are
   * the same length on the PCB, which means it's possible for MOD DEF 0 to
   * connect before the I2C bus on MOD DEF 1/2.
-@@ -1885,7 +1893,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1972,7 +1980,7 @@ static void sfp_sm_main(struct sfp *sfp,
  		sfp_module_tx_enable(sfp);
  
  		/* Initialise the fault clearance retries */
@@ -35,7 +35,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  
  		/* We need to check the TX_FAULT state, which is not defined
  		 * while TX_DISABLE is asserted. The earliest we want to do
-@@ -1925,7 +1933,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2012,7 +2020,7 @@ static void sfp_sm_main(struct sfp *sfp,
  			 * or t_start_up, so assume there is a fault.
  			 */
  			sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
@@ -44,7 +44,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  		} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
  	init_done:	/* TX_FAULT deasserted or we timed out with TX_FAULT
  			 * clear.  Probe for the PHY and check the LOS state.
-@@ -1938,7 +1946,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2025,7 +2033,7 @@ static void sfp_sm_main(struct sfp *sfp,
  			sfp_sm_link_check_los(sfp);
  
  			/* Reset the fault retry count */
diff --git a/target/linux/generic/pending-5.4/757-net-sfp-rename-sm_retries.patch b/target/linux/generic/pending-5.4/757-net-sfp-rename-sm_retries.patch
index 0ca73c9266..13f3b6ccff 100644
--- a/target/linux/generic/pending-5.4/757-net-sfp-rename-sm_retries.patch
+++ b/target/linux/generic/pending-5.4/757-net-sfp-rename-sm_retries.patch
@@ -13,7 +13,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
 
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -234,7 +234,7 @@ struct sfp {
+@@ -235,7 +235,7 @@ struct sfp {
  	unsigned char sm_mod_tries;
  	unsigned char sm_dev_state;
  	unsigned short sm_state;
@@ -22,7 +22,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  
  	struct sfp_eeprom_id id;
  	unsigned int module_power_mW;
-@@ -1490,7 +1490,7 @@ static bool sfp_los_event_inactive(struc
+@@ -1506,7 +1506,7 @@ static bool sfp_los_event_inactive(struc
  
  static void sfp_sm_fault(struct sfp *sfp, unsigned int next_state, bool warn)
  {
@@ -31,7 +31,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  		dev_err(sfp->dev,
  			"module persistently indicates fault, disabling\n");
  		sfp_sm_next(sfp, SFP_S_TX_DISABLE, 0);
-@@ -1893,7 +1893,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -1980,7 +1980,7 @@ static void sfp_sm_main(struct sfp *sfp,
  		sfp_module_tx_enable(sfp);
  
  		/* Initialise the fault clearance retries */
@@ -40,7 +40,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  
  		/* We need to check the TX_FAULT state, which is not defined
  		 * while TX_DISABLE is asserted. The earliest we want to do
-@@ -1933,7 +1933,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2020,7 +2020,7 @@ static void sfp_sm_main(struct sfp *sfp,
  			 * or t_start_up, so assume there is a fault.
  			 */
  			sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
@@ -49,7 +49,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  		} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
  	init_done:	/* TX_FAULT deasserted or we timed out with TX_FAULT
  			 * clear.  Probe for the PHY and check the LOS state.
-@@ -1946,7 +1946,7 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2033,7 +2033,7 @@ static void sfp_sm_main(struct sfp *sfp,
  			sfp_sm_link_check_los(sfp);
  
  			/* Reset the fault retry count */
diff --git a/target/linux/generic/pending-5.4/758-net-sfp-error-handling-for-phy-probe.patch b/target/linux/generic/pending-5.4/758-net-sfp-error-handling-for-phy-probe.patch
index b0bb905fec..dfa772dc72 100644
--- a/target/linux/generic/pending-5.4/758-net-sfp-error-handling-for-phy-probe.patch
+++ b/target/linux/generic/pending-5.4/758-net-sfp-error-handling-for-phy-probe.patch
@@ -10,7 +10,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
 
 --- a/drivers/net/phy/sfp.c
 +++ b/drivers/net/phy/sfp.c
-@@ -1410,7 +1410,7 @@ static void sfp_sm_phy_detach(struct sfp
+@@ -1426,7 +1426,7 @@ static void sfp_sm_phy_detach(struct sfp
  	sfp->mod_phy = NULL;
  }
  
@@ -19,7 +19,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  {
  	struct phy_device *phy;
  	int err;
-@@ -1418,18 +1418,18 @@ static void sfp_sm_probe_phy(struct sfp
+@@ -1434,18 +1434,18 @@ static void sfp_sm_probe_phy(struct sfp
  	phy = get_phy_device(sfp->i2c_mii, SFP_PHY_ADDR, is_c45);
  	if (phy == ERR_PTR(-ENODEV)) {
  		dev_info(sfp->dev, "no PHY detected\n");
@@ -41,7 +41,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	}
  
  	err = sfp_add_phy(sfp->sfp_bus, phy);
-@@ -1437,10 +1437,12 @@ static void sfp_sm_probe_phy(struct sfp
+@@ -1453,10 +1453,12 @@ static void sfp_sm_probe_phy(struct sfp
  		phy_device_remove(phy);
  		phy_device_free(phy);
  		dev_err(sfp->dev, "sfp_add_phy failed: %d\n", err);
@@ -55,7 +55,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  }
  
  static void sfp_sm_link_up(struct sfp *sfp)
-@@ -1513,21 +1515,24 @@ static void sfp_sm_fault(struct sfp *sfp
+@@ -1529,21 +1531,24 @@ static void sfp_sm_fault(struct sfp *sfp
   * Clause 45 copper SFP+ modules (10G) appear to switch their interface
   * mode according to the negotiated line speed.
   */
@@ -83,7 +83,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  }
  
  static int sfp_module_parse_power(struct sfp *sfp)
-@@ -1938,7 +1943,10 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2025,7 +2030,10 @@ static void sfp_sm_main(struct sfp *sfp,
  	init_done:	/* TX_FAULT deasserted or we timed out with TX_FAULT
  			 * clear.  Probe for the PHY and check the LOS state.
  			 */
diff --git a/target/linux/generic/pending-5.4/759-net-sfp-re-attempt-probing-for-phy.patch b/target/linux/generic/pending-5.4/759-net-sfp-re-attempt-probing-for-phy.patch
index d122bc7c62..aebb6b0398 100644
--- a/target/linux/generic/pending-5.4/759-net-sfp-re-attempt-probing-for-phy.patch
+++ b/target/linux/generic/pending-5.4/759-net-sfp-re-attempt-probing-for-phy.patch
@@ -48,7 +48,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  /* SFP module presence detection is poor: the three MOD DEF signals are
   * the same length on the PCB, which means it's possible for MOD DEF 0 to
   * connect before the I2C bus on MOD DEF 1/2.
-@@ -235,6 +243,7 @@ struct sfp {
+@@ -236,6 +244,7 @@ struct sfp {
  	unsigned char sm_dev_state;
  	unsigned short sm_state;
  	unsigned char sm_fault_retries;
@@ -56,7 +56,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  
  	struct sfp_eeprom_id id;
  	unsigned int module_power_mW;
-@@ -1416,10 +1425,8 @@ static int sfp_sm_probe_phy(struct sfp *
+@@ -1432,10 +1441,8 @@ static int sfp_sm_probe_phy(struct sfp *
  	int err;
  
  	phy = get_phy_device(sfp->i2c_mii, SFP_PHY_ADDR, is_c45);
@@ -69,7 +69,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	if (IS_ERR(phy)) {
  		dev_err(sfp->dev, "mdiobus scan returned %ld\n", PTR_ERR(phy));
  		return PTR_ERR(phy);
-@@ -1867,6 +1874,7 @@ static void sfp_sm_module(struct sfp *sf
+@@ -1954,6 +1961,7 @@ static void sfp_sm_module(struct sfp *sf
  static void sfp_sm_main(struct sfp *sfp, unsigned int event)
  {
  	unsigned long timeout;
@@ -77,7 +77,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  
  	/* Some events are global */
  	if (sfp->sm_state != SFP_S_DOWN &&
-@@ -1940,22 +1948,39 @@ static void sfp_sm_main(struct sfp *sfp,
+@@ -2027,22 +2035,39 @@ static void sfp_sm_main(struct sfp *sfp,
  			sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
  				     sfp->sm_fault_retries == N_FAULT_INIT);
  		} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:45 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:45 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.4 to 5.4.133
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9927.1627214333.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5408e811b29643e3fd5f2cd227f17263daa45a74

commit 5408e811b29643e3fd5f2cd227f17263daa45a74
Author: John Audia <graysky at archlinux.us>
AuthorDate: Mon Jul 19 05:17:10 2021 -0400

    kernel: bump 5.4 to 5.4.133
    
    Manually rebased:
      pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
    
    All other patches automatically rebased.
    
    Build system: x86_64
    Build-tested: ipq806x/R7800
    Run-tested: ipq806x/R7800
    
    No dmesg regressions, everything functional
    
    Signed-off-by: John Audia <graysky at archlinux.us>
---
 include/kernel-version.mk                          |  4 ++--
 ...950-0043-MMC-added-alternative-MMC-driver.patch |  2 +-
 ...f-Add-inbound-resource-parsing-to-helpers.patch |  2 +-
 .../950-0504-mmc-sdhci-Silence-MMC-warnings.patch  |  4 ++--
 ...subdev-Introduce-get-set-_mbus_config-pad.patch |  4 ++--
 ...-subdev-Remove-s-g-_mbus_config-video-ops.patch |  4 ++--
 .../683-NET-add-mac-address-property.patch         |  4 ++--
 ...-mediatek-register-of_platform-for-every-.patch |  7 +-----
 ...-dsa-register-every-port-with-of_platform.patch |  7 +-----
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch |  8 +++----
 ...-mac-address-support-to-of_get_mac_addres.patch | 13 ++++-------
 ...-of_net-add-mac-address-increment-support.patch |  9 ++------
 ...net-add-support-for-threaded-NAPI-polling.patch | 25 +++++++++++-----------
 .../810-pci_disable_common_quirks.patch            |  8 +++----
 ...CI-Disable-MSI-on-CYW4356-and-CYW4359-chi.patch |  2 +-
 ...CI-add-quirk-for-cyw4356-to-disable-D3-mo.patch |  2 +-
 ...e-MSI-on-marvel-88w9098-and-88w8997-chips.patch |  2 +-
 ...k-Wait-for-endpoint-to-be-ready-before-tr.patch |  2 +-
 ...k-Train-link-immediately-after-enabling-t.patch |  4 ++--
 .../017-PCI-aardvark-Improve-link-training.patch   | 12 +++++------
 .../018-PCI-aardvark-Issue-PERST-via-GPIO.patch    |  8 +++----
 .../019-PCI-aardvark-Add-PHY-support.patch         |  8 +++----
 ...k-Don-t-touch-PCIe-registers-if-no-card-c.patch |  2 +-
 ...k-Fix-initialization-with-old-Marvell-s-A.patch |  2 +-
 ...rk-for-Gateworks-PLX-PEX860x-switch-with-.patch |  4 ++--
 .../0031-uvc-add-iPassion-iP2970-support.patch     |  4 ++--
 26 files changed, 66 insertions(+), 87 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 5424e1a5f1..6dc4ad6133 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .132
+LINUX_VERSION-5.4 = .133
 LINUX_VERSION-5.10 = .52
 
-LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
+LINUX_KERNEL_HASH-5.4.133 = 89a366fbb8784f5bc296c9f3311094e9e4cffeb6dbdf7589168cc032cb950830
 LINUX_KERNEL_HASH-5.10.52 = 769e57a0fa218589fa2f8460b8682eb784a72718c7a3d95295f382a77902ae79
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
diff --git a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
index f70887855b..16db439b89 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
@@ -267,7 +267,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros at gmail.com>
  		goto out;
 --- a/drivers/mmc/core/core.c
 +++ b/drivers/mmc/core/core.c
-@@ -1922,7 +1922,8 @@ EXPORT_SYMBOL(mmc_erase);
+@@ -1925,7 +1925,8 @@ EXPORT_SYMBOL(mmc_erase);
  int mmc_can_erase(struct mmc_card *card)
  {
  	if ((card->host->caps & MMC_CAP_ERASE) &&
diff --git a/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch b/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch
index 6e04d425bf..86ef121230 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch
@@ -82,7 +82,7 @@ Cc: linux-rockchip at lists.infradead.org
  
 --- a/drivers/pci/controller/pci-aardvark.c
 +++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1049,7 +1049,8 @@ static int advk_pcie_probe(struct platfo
+@@ -1060,7 +1060,8 @@ static int advk_pcie_probe(struct platfo
  		return ret;
  	}
  
diff --git a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
index 8acdba434e..89fd58dca0 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
@@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  
  #define MAX_TUNING_LOOP 40
  
-@@ -2758,7 +2758,7 @@ static void sdhci_timeout_timer(struct t
+@@ -2762,7 +2762,7 @@ static void sdhci_timeout_timer(struct t
  	spin_lock_irqsave(&host->lock, flags);
  
  	if (host->cmd && !sdhci_data_line_cmd(host->cmd)) {
@@ -31,7 +31,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  		       mmc_hostname(host->mmc));
  		sdhci_dumpregs(host);
  
-@@ -2780,7 +2780,7 @@ static void sdhci_timeout_data_timer(str
+@@ -2784,7 +2784,7 @@ static void sdhci_timeout_data_timer(str
  
  	if (host->data || host->data_cmd ||
  	    (host->cmd && sdhci_data_line_cmd(host->cmd))) {
diff --git a/target/linux/bcm27xx/patches-5.4/950-0795-media-v4l2-subdev-Introduce-get-set-_mbus_config-pad.patch b/target/linux/bcm27xx/patches-5.4/950-0795-media-v4l2-subdev-Introduce-get-set-_mbus_config-pad.patch
index 910828421b..30ca593bcc 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0795-media-v4l2-subdev-Introduce-get-set-_mbus_config-pad.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0795-media-v4l2-subdev-Introduce-get-set-_mbus_config-pad.patch
@@ -20,7 +20,7 @@ Signed-off-by: Jacopo Mondi <jacopo+renesas at jmondi.org>
 
 --- a/include/media/v4l2-subdev.h
 +++ b/include/media/v4l2-subdev.h
-@@ -670,6 +670,29 @@ struct v4l2_subdev_pad_config {
+@@ -674,6 +674,29 @@ struct v4l2_subdev_pad_config {
   *
   * @set_frame_desc: set the low level media bus frame parameters, @fd array
   *                  may be adjusted by the subdev driver to device capabilities.
@@ -50,7 +50,7 @@ Signed-off-by: Jacopo Mondi <jacopo+renesas at jmondi.org>
   */
  struct v4l2_subdev_pad_ops {
  	int (*init_cfg)(struct v4l2_subdev *sd,
-@@ -710,6 +733,10 @@ struct v4l2_subdev_pad_ops {
+@@ -714,6 +737,10 @@ struct v4l2_subdev_pad_ops {
  			      struct v4l2_mbus_frame_desc *fd);
  	int (*set_frame_desc)(struct v4l2_subdev *sd, unsigned int pad,
  			      struct v4l2_mbus_frame_desc *fd);
diff --git a/target/linux/bcm27xx/patches-5.4/950-0799-media-v4l2-subdev-Remove-s-g-_mbus_config-video-ops.patch b/target/linux/bcm27xx/patches-5.4/950-0799-media-v4l2-subdev-Remove-s-g-_mbus_config-video-ops.patch
index a7186da342..0986fa63f5 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0799-media-v4l2-subdev-Remove-s-g-_mbus_config-video-ops.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0799-media-v4l2-subdev-Remove-s-g-_mbus_config-video-ops.patch
@@ -17,7 +17,7 @@ Signed-off-by: Jacopo Mondi <jacopo+renesas at jmondi.org>
 
 --- a/include/media/v4l2-subdev.h
 +++ b/include/media/v4l2-subdev.h
-@@ -402,12 +402,6 @@ struct v4l2_mbus_frame_desc {
+@@ -406,12 +406,6 @@ struct v4l2_mbus_frame_desc {
   *
   * @query_dv_timings: callback for VIDIOC_QUERY_DV_TIMINGS() ioctl handler code.
   *
@@ -30,7 +30,7 @@ Signed-off-by: Jacopo Mondi <jacopo+renesas at jmondi.org>
   * @s_rx_buffer: set a host allocated memory buffer for the subdev. The subdev
   *	can adjust @size to a lower value and must not write more data to the
   *	buffer starting at @data than the original value of @size.
-@@ -435,10 +429,6 @@ struct v4l2_subdev_video_ops {
+@@ -439,10 +433,6 @@ struct v4l2_subdev_video_ops {
  			struct v4l2_dv_timings *timings);
  	int (*query_dv_timings)(struct v4l2_subdev *sd,
  			struct v4l2_dv_timings *timings);
diff --git a/target/linux/generic/hack-5.4/683-NET-add-mac-address-property.patch b/target/linux/generic/hack-5.4/683-NET-add-mac-address-property.patch
index de561c5336..f0418dbb70 100644
--- a/target/linux/generic/hack-5.4/683-NET-add-mac-address-property.patch
+++ b/target/linux/generic/hack-5.4/683-NET-add-mac-address-property.patch
@@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
-@@ -61,6 +61,7 @@ static void *of_get_mac_addr_nvmem(struc
+@@ -55,6 +55,7 @@ static void *of_get_mac_addr_nvmem(struc
  	void *mac;
  	u8 nvmem_mac[ETH_ALEN];
  	struct platform_device *pdev = of_find_device_by_node(np);
@@ -26,7 +26,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  
  	if (!pdev) {
  		*err = -ENODEV;
-@@ -78,10 +79,29 @@ static void *of_get_mac_addr_nvmem(struc
+@@ -72,10 +73,29 @@ static void *of_get_mac_addr_nvmem(struc
  	put_device(&pdev->dev);
  	if (!mac) {
  		*err = -ENOMEM;
diff --git a/target/linux/generic/hack-5.4/780-drivers-net-mediatek-register-of_platform-for-every-.patch b/target/linux/generic/hack-5.4/780-drivers-net-mediatek-register-of_platform-for-every-.patch
index d1383cc2d1..09b413ea97 100644
--- a/target/linux/generic/hack-5.4/780-drivers-net-mediatek-register-of_platform-for-every-.patch
+++ b/target/linux/generic/hack-5.4/780-drivers-net-mediatek-register-of_platform-for-every-.patch
@@ -14,11 +14,9 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-index ed4eacef17ce..666803817540 100644
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3015,6 +3015,8 @@ static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
+@@ -3034,6 +3034,8 @@ static int mtk_add_mac(struct mtk_eth *e
  	eth->netdev[id]->dev.of_node = np;
  
  	eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;
@@ -27,6 +25,3 @@ index ed4eacef17ce..666803817540 100644
  
  	return 0;
  
--- 
-2.31.1
-
diff --git a/target/linux/generic/hack-5.4/781-dsa-register-every-port-with-of_platform.patch b/target/linux/generic/hack-5.4/781-dsa-register-every-port-with-of_platform.patch
index f9a684c093..bd7e190bff 100644
--- a/target/linux/generic/hack-5.4/781-dsa-register-every-port-with-of_platform.patch
+++ b/target/linux/generic/hack-5.4/781-dsa-register-every-port-with-of_platform.patch
@@ -15,8 +15,6 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  net/dsa/dsa2.c | 2 +
  1 file changed, 2 insertion(+)
 
-diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
-index b71e87909f0e..55bbc1a769ca 100644
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
 @@ -14,6 +14,7 @@
@@ -27,7 +25,7 @@ index b71e87909f0e..55bbc1a769ca 100644
  #include <net/devlink.h>
  
  #include "dsa_priv.h"
-@@ -392,6 +392,7 @@ static int dsa_port_setup(struct dsa_port *dp)
+@@ -318,6 +319,7 @@ static int dsa_port_setup(struct dsa_por
  			break;
  		devlink_port_registered = true;
  
@@ -35,6 +33,3 @@ index b71e87909f0e..55bbc1a769ca 100644
  		dp->mac = of_get_mac_address(dp->dn);
  		err = dsa_slave_create(dp);
  		if (err)
--- 
-2.31.1
-
diff --git a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 8871f3457a..4839ac5e70 100644
--- a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (netif_elide_gro(skb->dev))
  		goto normal;
  
-@@ -7284,6 +7287,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -7291,6 +7294,48 @@ static void __netdev_adjacent_dev_unlink
  					   &upper_dev->adj_list.lower);
  }
  
@@ -91,7 +91,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,
-@@ -7334,6 +7379,7 @@ static int __netdev_upper_dev_link(struc
+@@ -7341,6 +7386,7 @@ static int __netdev_upper_dev_link(struc
  	if (ret)
  		return ret;
  
@@ -99,7 +99,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);
-@@ -7427,6 +7473,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -7434,6 +7480,7 @@ void netdev_upper_dev_unlink(struct net_
  
  	__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
  
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
  				      &changeupper_info.info);
  
-@@ -8157,6 +8204,7 @@ int dev_set_mac_address(struct net_devic
+@@ -8164,6 +8211,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-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
index 44a6b6a047..01f940dec7 100644
--- a/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
+++ b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
@@ -15,8 +15,6 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  drivers/of/of_net.c | 75 ++++++++++++++++++++++++++++++++++++++++++++-
  1 file changed, 74 insertions(+), 1 deletion(-)
 
-diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
-index 6e411821583e..f072e2509cc9 100644
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
 @@ -11,6 +11,7 @@
@@ -27,7 +25,7 @@ index 6e411821583e..f072e2509cc9 100644
  
  /**
   * of_get_phy_mode - Get phy mode for given device_node
-@@ -45,7 +46,7 @@ int of_get_phy_mode(struct device_node *np, phy_interface_t *interface)
+@@ -39,7 +40,7 @@ int of_get_phy_mode(struct device_node *
  }
  EXPORT_SYMBOL_GPL(of_get_phy_mode);
  
@@ -36,7 +34,7 @@ index 6e411821583e..f072e2509cc9 100644
  {
  	struct property *pp = of_find_property(np, name, NULL);
  
-@@ -78,6 +79,70 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
+@@ -72,6 +73,70 @@ static const void *of_get_mac_addr_nvmem
  	return mac;
  }
  
@@ -107,7 +105,7 @@ index 6e411821583e..f072e2509cc9 100644
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
   * checked first, because that is supposed to contain to "most recent" MAC
-@@ -98,6 +163,10 @@ static const void *of_get_mac_addr_nvmem(struct device_node *np)
+@@ -92,6 +157,10 @@ static const void *of_get_mac_addr_nvmem
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
   *
@@ -118,7 +116,7 @@ index 6e411821583e..f072e2509cc9 100644
   * Return: Will be a valid pointer on success and ERR_PTR in case of error.
  */
  const void *of_get_mac_address(struct device_node *np)
-@@ -116,6 +185,10 @@ const void *of_get_mac_address(struct device_node *np)
+@@ -110,6 +179,10 @@ const void *of_get_mac_address(struct de
  	if (addr)
  		return addr;
  
@@ -129,6 +127,3 @@ index 6e411821583e..f072e2509cc9 100644
  	return of_get_mac_addr_nvmem(np);
  }
  EXPORT_SYMBOL(of_get_mac_address);
--- 
-2.30.2
-
diff --git a/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
index 1c08e23699..81f946ff7f 100644
--- a/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
+++ b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
@@ -18,11 +18,9 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  drivers/of/of_net.c | 59 ++++++++++++++++++++++++++++++++++-----------
  1 file changed, 45 insertions(+), 14 deletions(-)
 
-diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
-index f072e2509cc9..0dbd1f7ef396 100644
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
-@@ -55,31 +55,36 @@ static void *of_get_mac_addr(struct device_node *np, const char *name)
+@@ -49,31 +49,36 @@ static void *of_get_mac_addr(struct devi
  	return NULL;
  }
  
@@ -67,7 +65,7 @@ index f072e2509cc9..0dbd1f7ef396 100644
  {
  #ifdef CONFIG_MTD
  	struct device_node *mtd_np = NULL;
-@@ -167,28 +172,54 @@ static const void *of_get_mac_address_mtd(struct device_node *np)
+@@ -161,28 +166,54 @@ free:
   * If a mtd-mac-address property exists, try to fetch the MAC address from the
   * specified mtd device, and store it as a 'mac-address' property
   *
@@ -128,6 +126,3 @@ index f072e2509cc9..0dbd1f7ef396 100644
 +	return addr;
  }
  EXPORT_SYMBOL(of_get_mac_address);
--- 
-2.30.2
-
diff --git a/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch b/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
index b30482468b..7c9726b825 100644
--- a/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
+++ b/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	local_irq_save(flags);
  	____napi_schedule(this_cpu_ptr(&softnet_data), n);
  	local_irq_restore(flags);
-@@ -5978,6 +5984,11 @@ EXPORT_SYMBOL(napi_schedule_prep);
+@@ -5982,6 +5988,10 @@ EXPORT_SYMBOL(napi_schedule_prep);
   */
  void __napi_schedule_irqoff(struct napi_struct *n)
  {
@@ -115,11 +115,10 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +		queue_work(napi_workq, &n->work);
 +		return;
 +	}
-+
- 	____napi_schedule(this_cpu_ptr(&softnet_data), n);
- }
- EXPORT_SYMBOL(__napi_schedule_irqoff);
-@@ -6239,9 +6250,89 @@ static void init_gro_hash(struct napi_st
+ 	if (!IS_ENABLED(CONFIG_PREEMPT_RT))
+ 		____napi_schedule(this_cpu_ptr(&softnet_data), n);
+ 	else
+@@ -6246,9 +6256,89 @@ static void init_gro_hash(struct napi_st
  	napi->gro_bitmask = 0;
  }
  
@@ -209,7 +208,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	INIT_LIST_HEAD(&napi->poll_list);
  	hrtimer_init(&napi->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED);
  	napi->timer.function = napi_watchdog;
-@@ -6258,6 +6349,7 @@ void netif_napi_add(struct net_device *d
+@@ -6265,6 +6355,7 @@ void netif_napi_add(struct net_device *d
  #ifdef CONFIG_NETPOLL
  	napi->poll_owner = -1;
  #endif
@@ -217,7 +216,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	set_bit(NAPI_STATE_SCHED, &napi->state);
  	set_bit(NAPI_STATE_NPSVC, &napi->state);
  	list_add_rcu(&napi->dev_list, &dev->napi_list);
-@@ -6298,6 +6390,7 @@ static void flush_gro_hash(struct napi_s
+@@ -6305,6 +6396,7 @@ static void flush_gro_hash(struct napi_s
  void netif_napi_del(struct napi_struct *napi)
  {
  	might_sleep();
@@ -225,7 +224,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (napi_hash_del(napi))
  		synchronize_net();
  	list_del_init(&napi->dev_list);
-@@ -6310,50 +6403,18 @@ EXPORT_SYMBOL(netif_napi_del);
+@@ -6317,50 +6409,18 @@ EXPORT_SYMBOL(netif_napi_del);
  
  static int napi_poll(struct napi_struct *n, struct list_head *repoll)
  {
@@ -239,8 +238,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	have = netpoll_poll_lock(n);
  
 -	weight = n->weight;
-+	work = __napi_poll(n, &do_repoll);
- 
+-
 -	/* This NAPI_STATE_SCHED test is for avoiding a race
 -	 * with netpoll's poll_napi().  Only the entity which
 -	 * obtains the lock and sees NAPI_STATE_SCHED set will
@@ -254,7 +252,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 -	}
 -
 -	WARN_ON_ONCE(work > weight);
--
++	work = __napi_poll(n, &do_repoll);
+ 
 -	if (likely(work < weight))
 -		goto out_unlock;
 -
@@ -280,7 +279,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	/* Some drivers may have called napi_schedule
  	 * prior to exhausting their budget.
-@@ -10333,6 +10394,10 @@ static int __init net_dev_init(void)
+@@ -10340,6 +10400,10 @@ static int __init net_dev_init(void)
  		sd->backlog.weight = weight_p;
  	}
  
diff --git a/target/linux/generic/pending-5.4/810-pci_disable_common_quirks.patch b/target/linux/generic/pending-5.4/810-pci_disable_common_quirks.patch
index 3f89103fa2..c840a7e2c6 100644
--- a/target/linux/generic/pending-5.4/810-pci_disable_common_quirks.patch
+++ b/target/linux/generic/pending-5.4/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
-@@ -205,6 +205,7 @@ static void quirk_mmio_always_on(struct
+@@ -206,6 +206,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"
-@@ -3320,6 +3321,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -3321,6 +3322,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
-@@ -3345,6 +3348,8 @@ static void quirk_intel_ntb(struct pci_d
+@@ -3346,6 +3349,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
-@@ -3383,6 +3388,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3384,6 +3389,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/layerscape/patches-5.4/812-pcie-0005-MLK-20684-PCI-Disable-MSI-on-CYW4356-and-CYW4359-chi.patch b/target/linux/layerscape/patches-5.4/812-pcie-0005-MLK-20684-PCI-Disable-MSI-on-CYW4356-and-CYW4359-chi.patch
index 5a00cf765f..5163f5fd95 100644
--- a/target/linux/layerscape/patches-5.4/812-pcie-0005-MLK-20684-PCI-Disable-MSI-on-CYW4356-and-CYW4359-chi.patch
+++ b/target/linux/layerscape/patches-5.4/812-pcie-0005-MLK-20684-PCI-Disable-MSI-on-CYW4356-and-CYW4359-chi.patch
@@ -19,7 +19,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
 
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -2523,6 +2523,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VI
+@@ -2524,6 +2524,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VI
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3364, quirk_disable_all_msi);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8380_0, quirk_disable_all_msi);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, 0x0761, quirk_disable_all_msi);
diff --git a/target/linux/layerscape/patches-5.4/812-pcie-0006-MLK-20716-PCI-add-quirk-for-cyw4356-to-disable-D3-mo.patch b/target/linux/layerscape/patches-5.4/812-pcie-0006-MLK-20716-PCI-add-quirk-for-cyw4356-to-disable-D3-mo.patch
index cb81748844..1f9eb5c83c 100644
--- a/target/linux/layerscape/patches-5.4/812-pcie-0006-MLK-20716-PCI-add-quirk-for-cyw4356-to-disable-D3-mo.patch
+++ b/target/linux/layerscape/patches-5.4/812-pcie-0006-MLK-20716-PCI-add-quirk-for-cyw4356-to-disable-D3-mo.patch
@@ -17,7 +17,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade at mentor.com>
 
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -1356,6 +1356,10 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR
+@@ -1357,6 +1357,10 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR
     occur when mode detecting */
  DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID,
  				PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
diff --git a/target/linux/layerscape/patches-5.4/812-pcie-0007-PCI-Disable-MSI-on-marvel-88w9098-and-88w8997-chips.patch b/target/linux/layerscape/patches-5.4/812-pcie-0007-PCI-Disable-MSI-on-marvel-88w9098-and-88w8997-chips.patch
index 835b5cedb9..98d556386d 100644
--- a/target/linux/layerscape/patches-5.4/812-pcie-0007-PCI-Disable-MSI-on-marvel-88w9098-and-88w8997-chips.patch
+++ b/target/linux/layerscape/patches-5.4/812-pcie-0007-PCI-Disable-MSI-on-marvel-88w9098-and-88w8997-chips.patch
@@ -14,7 +14,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
 
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -2529,6 +2529,9 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VI
+@@ -2530,6 +2530,9 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VI
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, 0x0761, quirk_disable_all_msi);
  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x43ec, quirk_disable_all_msi);
  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x43ef, quirk_disable_all_msi);
diff --git a/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch b/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch
index 2df3306157..31f5accab6 100644
--- a/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch
+++ b/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch
@@ -33,7 +33,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
 
 --- a/drivers/pci/controller/pci-aardvark.c
 +++ b/drivers/pci/controller/pci-aardvark.c
-@@ -338,6 +338,14 @@ static void advk_pcie_setup_hw(struct ad
+@@ -349,6 +349,14 @@ static void advk_pcie_setup_hw(struct ad
  	reg |= PIO_CTRL_ADDR_WIN_DISABLE;
  	advk_writel(pcie, reg, PIO_CTRL);
  
diff --git a/target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch b/target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch
index c9e49ac2f1..3ff0dcb166 100644
--- a/target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch
+++ b/target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch
@@ -29,7 +29,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
 
 --- a/drivers/pci/controller/pci-aardvark.c
 +++ b/drivers/pci/controller/pci-aardvark.c
-@@ -300,11 +300,6 @@ static void advk_pcie_setup_hw(struct ad
+@@ -311,11 +311,6 @@ static void advk_pcie_setup_hw(struct ad
  	reg |= LANE_COUNT_1;
  	advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG);
  
@@ -41,7 +41,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	/* Enable MSI */
  	reg = advk_readl(pcie, PCIE_CORE_CTRL2_REG);
  	reg |= PCIE_CORE_CTRL2_MSI_ENABLE;
-@@ -346,7 +341,15 @@ static void advk_pcie_setup_hw(struct ad
+@@ -357,7 +352,15 @@ static void advk_pcie_setup_hw(struct ad
  	 */
  	msleep(PCI_PM_D3COLD_WAIT);
  
diff --git a/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch b/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch
index 19d0a5d513..e3a38740c3 100644
--- a/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch
+++ b/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch
@@ -42,7 +42,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  #define     PCIE_CORE_LINK_WIDTH_SHIFT				20
  #define PCIE_CORE_ERR_CAPCTL_REG				0x118
  #define     PCIE_CORE_ERR_CAPCTL_ECRC_CHK_TX			BIT(5)
-@@ -201,6 +202,7 @@ struct advk_pcie {
+@@ -202,6 +203,7 @@ struct advk_pcie {
  	struct mutex msi_used_lock;
  	u16 msi_msg;
  	int root_bus_nr;
@@ -50,7 +50,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	struct pci_bridge_emul bridge;
  };
  
-@@ -225,20 +227,16 @@ static int advk_pcie_link_up(struct advk
+@@ -226,20 +228,16 @@ static int advk_pcie_link_up(struct advk
  
  static int advk_pcie_wait_for_link(struct advk_pcie *pcie)
  {
@@ -72,7 +72,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	return -ETIMEDOUT;
  }
  
-@@ -253,6 +251,85 @@ static void advk_pcie_wait_for_retrain(s
+@@ -254,6 +252,85 @@ static void advk_pcie_wait_for_retrain(s
  	}
  }
  
@@ -158,7 +158,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  static void advk_pcie_setup_hw(struct advk_pcie *pcie)
  {
  	u32 reg;
-@@ -288,12 +365,6 @@ static void advk_pcie_setup_hw(struct ad
+@@ -299,12 +376,6 @@ static void advk_pcie_setup_hw(struct ad
  		PCIE_CORE_CTRL2_TD_ENABLE;
  	advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG);
  
@@ -171,7 +171,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	/* Set lane X1 */
  	reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG);
  	reg &= ~LANE_CNT_MSK;
-@@ -341,20 +412,7 @@ static void advk_pcie_setup_hw(struct ad
+@@ -352,20 +423,7 @@ static void advk_pcie_setup_hw(struct ad
  	 */
  	msleep(PCI_PM_D3COLD_WAIT);
  
@@ -193,7 +193,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  
  	reg = advk_readl(pcie, PCIE_CORE_CMD_STATUS_REG);
  	reg |= PCIE_CORE_CMD_MEM_ACCESS_EN |
-@@ -1066,6 +1124,12 @@ static int advk_pcie_probe(struct platfo
+@@ -1077,6 +1135,12 @@ static int advk_pcie_probe(struct platfo
  		return ret;
  	}
  
diff --git a/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch b/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch
index 0f2dab600b..fde01fa987 100644
--- a/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch
+++ b/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch
@@ -48,7 +48,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  #include <linux/of_pci.h>
  
  #include "../pci.h"
-@@ -204,6 +206,7 @@ struct advk_pcie {
+@@ -205,6 +207,7 @@ struct advk_pcie {
  	int root_bus_nr;
  	int link_gen;
  	struct pci_bridge_emul bridge;
@@ -56,7 +56,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  };
  
  static inline void advk_writel(struct advk_pcie *pcie, u32 val, u64 reg)
-@@ -330,10 +333,31 @@ err:
+@@ -331,10 +334,31 @@ err:
  	dev_err(dev, "link never came up\n");
  }
  
@@ -88,7 +88,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	/* Set to Direct mode */
  	reg = advk_readl(pcie, CTRL_CONFIG_REG);
  	reg &= ~(CTRL_MODE_MASK << CTRL_MODE_SHIFT);
-@@ -406,7 +430,8 @@ static void advk_pcie_setup_hw(struct ad
+@@ -417,7 +441,8 @@ static void advk_pcie_setup_hw(struct ad
  
  	/*
  	 * PERST# signal could have been asserted by pinctrl subsystem before
@@ -98,7 +98,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	 * fundamental reset. As required by PCI Express spec a delay for at
  	 * least 100ms after such a reset before link training is needed.
  	 */
-@@ -1124,6 +1149,22 @@ static int advk_pcie_probe(struct platfo
+@@ -1135,6 +1160,22 @@ static int advk_pcie_probe(struct platfo
  		return ret;
  	}
  
diff --git a/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch b/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch
index 640e4eb57c..edff5c4a9c 100644
--- a/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch
+++ b/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch
@@ -56,7 +56,7 @@ Cc: Miqu?l Raynal <miquel.raynal at bootlin.com>
  #define PCIE_MSG_LOG_REG			(CONTROL_BASE_ADDR + 0x30)
  #define PCIE_ISR0_REG				(CONTROL_BASE_ADDR + 0x40)
  #define PCIE_MSG_PM_PME_MASK			BIT(7)
-@@ -207,6 +210,7 @@ struct advk_pcie {
+@@ -208,6 +211,7 @@ struct advk_pcie {
  	int link_gen;
  	struct pci_bridge_emul bridge;
  	struct gpio_desc *reset_gpio;
@@ -64,7 +64,7 @@ Cc: Miqu?l Raynal <miquel.raynal at bootlin.com>
  };
  
  static inline void advk_writel(struct advk_pcie *pcie, u32 val, u64 reg)
-@@ -358,6 +362,11 @@ static void advk_pcie_setup_hw(struct ad
+@@ -359,6 +363,11 @@ static void advk_pcie_setup_hw(struct ad
  
  	advk_pcie_issue_perst(pcie);
  
@@ -76,7 +76,7 @@ Cc: Miqu?l Raynal <miquel.raynal at bootlin.com>
  	/* Set to Direct mode */
  	reg = advk_readl(pcie, CTRL_CONFIG_REG);
  	reg &= ~(CTRL_MODE_MASK << CTRL_MODE_SHIFT);
-@@ -1114,6 +1123,62 @@ out_release_res:
+@@ -1125,6 +1134,62 @@ out_release_res:
  	return err;
  }
  
@@ -139,7 +139,7 @@ Cc: Miqu?l Raynal <miquel.raynal at bootlin.com>
  static int advk_pcie_probe(struct platform_device *pdev)
  {
  	struct device *dev = &pdev->dev;
-@@ -1171,6 +1236,10 @@ static int advk_pcie_probe(struct platfo
+@@ -1182,6 +1247,10 @@ static int advk_pcie_probe(struct platfo
  	else
  		pcie->link_gen = ret;
  
diff --git a/target/linux/mvebu/patches-5.4/024-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch b/target/linux/mvebu/patches-5.4/024-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch
index dfc068c8cb..04803c90d8 100644
--- a/target/linux/mvebu/patches-5.4/024-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch
+++ b/target/linux/mvebu/patches-5.4/024-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch
@@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
 
 --- a/drivers/pci/controller/pci-aardvark.c
 +++ b/drivers/pci/controller/pci-aardvark.c
-@@ -639,6 +639,13 @@ static bool advk_pcie_valid_device(struc
+@@ -650,6 +650,13 @@ static bool advk_pcie_valid_device(struc
  	if ((bus->number == pcie->root_bus_nr) && PCI_SLOT(devfn) != 0)
  		return false;
  
diff --git a/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch b/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch
index 41fed6aded..ff67c9c02f 100644
--- a/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch
+++ b/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch
@@ -31,7 +31,7 @@ Cc: <stable at vger.kernel.org> # 5.8+: ea17a0f153af: phy: marvell: comphy: Convert
 
 --- a/drivers/pci/controller/pci-aardvark.c
 +++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1154,7 +1154,9 @@ static int advk_pcie_enable_phy(struct a
+@@ -1165,7 +1165,9 @@ static int advk_pcie_enable_phy(struct a
  	}
  
  	ret = phy_power_on(pcie->phy);
diff --git a/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch b/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
index c19e4cf90d..086fc0ab96 100644
--- a/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
+++ b/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
@@ -21,8 +21,8 @@ Signed-off-by: Tim Harvey <tharvey at gateworks.com>
 +#include <linux/of.h>
  #include <linux/platform_data/x86/apple.h>
  #include <linux/pm_runtime.h>
- #include <linux/switchtec.h>
-@@ -5714,3 +5715,34 @@ static void apex_pci_fixup_class(struct
+ #include <linux/suspend.h>
+@@ -5725,3 +5726,34 @@ static void apex_pci_fixup_class(struct
  }
  DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a,
  			       PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);
diff --git a/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch
index dbeee8a78b..306ae6cfda 100644
--- a/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch
+++ b/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch
@@ -64,7 +64,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  #include <media/v4l2-common.h>
  
-@@ -1156,9 +1161,149 @@ static void uvc_video_decode_data(struct
+@@ -1183,9 +1188,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_trace(UVC_TRACE_FRAME, "Frame complete (EOF found).\n");
-@@ -1715,6 +1860,8 @@ static int uvc_init_video_isoc(struct uv
+@@ -1742,6 +1887,8 @@ static int uvc_init_video_isoc(struct uv
  	if (npackets == 0)
  		return -ENOMEM;
  


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:54 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:54 -0400
Subject: [openwrt/openwrt]  layerscape: fix config restore for FRWY-LS1046A
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9930.1627215705.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3f97a04e6c92ddd46f86cc202fd0f0f0857692d1

commit 3f97a04e6c92ddd46f86cc202fd0f0f0857692d1
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Tue Jul 20 09:47:59 2021 +0200

    layerscape: fix config restore for FRWY-LS1046A
    
    commit 2c2d77bd3bd4 ("layerscape: add FRWY-LS1046A board support")
    missed to add an entry to the 79_move_config preinit script.
    
    Therefore, the config transfer on sysupgrade wass broken for this device.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 target/linux/layerscape/base-files/lib/preinit/79_move_config | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/layerscape/base-files/lib/preinit/79_move_config b/target/linux/layerscape/base-files/lib/preinit/79_move_config
index d691fa99f1..901a289b66 100644
--- a/target/linux/layerscape/base-files/lib/preinit/79_move_config
+++ b/target/linux/layerscape/base-files/lib/preinit/79_move_config
@@ -11,6 +11,7 @@ move_config() {
 	fsl,ls1021a-iot-sdboot | \
 	fsl,ls1021a-twr-sdboot | \
 	fsl,ls1043a-rdb-sdboot | \
+	fsl,ls1046a-frwy-sdboot | \
 	fsl,ls1046a-rdb-sdboot | \
 	fsl,ls1088a-rdb-sdboot)
 		if [ -b $BOOTPART ]; then


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:51 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:51 -0400
Subject: [openwrt/openwrt] linux-firmware: add 2G and 5G precal binaries for
 QCA99X0
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9931.1627215708.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d996b47be02dd6e9cef9987c4b26e3fe907bd324

commit d996b47be02dd6e9cef9987c4b26e3fe907bd324
Author: Damien Mascord <tusker at tusker.org>
AuthorDate: Tue Jul 13 11:07:36 2021 +1000

    linux-firmware: add 2G and 5G precal binaries for QCA99X0
    
    Some devices (such as Extreme Networks WS-AP3959i-ROW) do not contain
    precal binaries in ART, and the precal in the cards eeprom causes
    firmware load errors.
    
    These firmware files were previously in linux-firmware,
    so these are adding them back and renaming to be cleaner.
    
    Signed-off-by: Damien Mascord <tusker at tusker.org>
---
 package/firmware/linux-firmware/qca_ath10k.mk | 35 +++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/package/firmware/linux-firmware/qca_ath10k.mk b/package/firmware/linux-firmware/qca_ath10k.mk
index 3bc942b108..d30487441e 100644
--- a/package/firmware/linux-firmware/qca_ath10k.mk
+++ b/package/firmware/linux-firmware/qca_ath10k.mk
@@ -9,6 +9,22 @@ define Download/qca99x0-board
 endef
 $(eval $(call Download,qca99x0-board))
 
+define Download/qca99x0-board-5g
+  URL:=https://github.com/kvalo/ath10k-firmware/raw/master/QCA99X0/hw2.0/
+  URL_FILE:=boardData_AR900B_CUS239_5G_v2_001.bin
+  FILE:=boardData_AR900B_CUS239_5G_v2_001.bin
+  HASH:=3bf7561ee373b369025dcd366d276d038a97d3397ccae41ce841d98a58b30aff
+endef
+$(eval $(call Download,qca99x0-board-5g))
+
+define Download/qca99x0-board-2g
+  URL:=https://github.com/kvalo/ath10k-firmware/raw/master/QCA99X0/hw2.0/
+  URL_FILE:=boardData_AR900B_CUS260_2G_v2_002.bin
+  FILE:=boardData_AR900B_CUS260_2G_v2_002.bin
+  HASH:=fd91ddf93a271633c28fb1831a1dc5e829c345fbf2aa8980e816585cf9b9e9ed
+endef
+$(eval $(call Download,qca99x0-board-2g))
+
 Package/ath10k-board-qca4019 = $(call Package/firmware-default,ath10k qca4019 board firmware)
 define Package/ath10k-board-qca4019/install
 	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA4019/hw1.0
@@ -124,6 +140,25 @@ define Package/ath10k-board-qca99x0/install
 		$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board.bin
 endef
 $(eval $(call BuildPackage,ath10k-board-qca99x0))
+
+Package/ath10k-board-qca99x0-2g = $(call Package/firmware-default,ath10k qca99x0 board 2g precal firmware)
+define Package/ath10k-board-qca99x0-2g/install
+	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
+	$(INSTALL_DATA) \
+		$(DL_DIR)/boardData_AR900B_CUS260_2G_v2_002.bin \
+		$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-2g-precal.bin
+endef
+$(eval $(call BuildPackage,ath10k-board-qca99x0-2g))
+
+Package/ath10k-board-qca99x0-5g = $(call Package/firmware-default,ath10k qca99x0 board 5g precal firmware)
+define Package/ath10k-board-qca99x0-5g/install
+	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0
+	$(INSTALL_DATA) \
+		$(DL_DIR)/boardData_AR900B_CUS239_5G_v2_001.bin \
+		$(1)/lib/firmware/ath10k/QCA99X0/hw2.0/board-5g-precal.bin
+endef
+$(eval $(call BuildPackage,ath10k-board-qca99x0-5g))
+
 Package/ath10k-firmware-qca99x0 = $(call Package/firmware-default,ath10k qca99x0 firmware,+ath10k-board-qca99x0)
 define Package/ath10k-firmware-qca99x0/install
 	$(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA99X0/hw2.0


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:55 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:55 -0400
Subject: [openwrt/openwrt] layerscape: armv8_64b: enable Microsemi phy
 driver for FRWY-LS1046A
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9932.1627215711.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/bbfb142f2a57de46b9b8543cde8b2b171eb3b1c7

commit bbfb142f2a57de46b9b8543cde8b2b171eb3b1c7
Author: Martin Schiller <ms at dev.tdt.de>
AuthorDate: Wed Jul 21 10:22:39 2021 +0200

    layerscape: armv8_64b: enable Microsemi phy driver for FRWY-LS1046A
    
    Enable the Microsemi phy driver to support the VSC8514 QSGMII phy on the
    FRWY-LS1046A board.
    
    Otherwise, the "Generic PHY" driver is used.
    
    Signed-off-by: Martin Schiller <ms at dev.tdt.de>
---
 target/linux/layerscape/armv8_64b/config-5.4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/layerscape/armv8_64b/config-5.4 b/target/linux/layerscape/armv8_64b/config-5.4
index f72154f290..e2e998b38d 100644
--- a/target/linux/layerscape/armv8_64b/config-5.4
+++ b/target/linux/layerscape/armv8_64b/config-5.4
@@ -502,6 +502,7 @@ CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
 # CONFIG_MFD_VEXPRESS_SYSREG is not set
 CONFIG_MICREL_PHY=y
+CONFIG_MICROSEMI_PHY=y
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
 CONFIG_MMC_BLOCK=y


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:53 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:53 -0400
Subject: [openwrt/openwrt]  Revert "realtek: Fix failsafe mode"
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9933.1627215716.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/cdb5acac20a2c68d82db380ca65a6894b07416fb

commit cdb5acac20a2c68d82db380ca65a6894b07416fb
Author: Thomas Nixon <tom at tomn.co.uk>
AuthorDate: Sat Jun 26 13:05:16 2021 +0100

    Revert "realtek: Fix failsafe mode"
    
    This reverts commit b7ee0786b56d1088c195fe7c1cdb1ad7d20c9245.
    
    With the previous commit "realtek: remove rtl83xx vlan 1 special cases"
    this is no longer required.
    
    Signed-off-by: Thomas Nixon <tom at tomn.co.uk>
---
 .../base-files/lib/preinit/05_set_preinit_iface_realtek     | 13 -------------
 .../base-files/lib/preinit/98_remove_preinit_realtek        |  6 ------
 2 files changed, 19 deletions(-)

diff --git a/target/linux/realtek/base-files/lib/preinit/05_set_preinit_iface_realtek b/target/linux/realtek/base-files/lib/preinit/05_set_preinit_iface_realtek
deleted file mode 100644
index e2a7cf5a69..0000000000
--- a/target/linux/realtek/base-files/lib/preinit/05_set_preinit_iface_realtek
+++ /dev/null
@@ -1,13 +0,0 @@
-set_preinit_iface() {
-
-	# Create a switch on lan1 to configure the VLAN 1.
-	# Without configuring VLAN ID 1 RTL8380 - RTL9300 will not
-	# forward packets.
-	ip link add name switch type bridge vlan_filtering 1
-	ip link set dev lan1 master switch
-	ip link set lan1 up
-
-	pi_ifname=switch
-}
-
-boot_hook_add preinit_main set_preinit_iface
diff --git a/target/linux/realtek/base-files/lib/preinit/98_remove_preinit_realtek b/target/linux/realtek/base-files/lib/preinit/98_remove_preinit_realtek
deleted file mode 100644
index dc5fdb059b..0000000000
--- a/target/linux/realtek/base-files/lib/preinit/98_remove_preinit_realtek
+++ /dev/null
@@ -1,6 +0,0 @@
-remove_switch() {
-	# delete switch created in 05_set_preinit_iface_realtek again
-	ip link del name switch
-}
-
-boot_hook_add preinit_main remove_switch


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:58 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:58 -0400
Subject: [openwrt/openwrt]  uboot-mvebu: update to v2021.07
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9934.1627215719.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/0208b3ba56f67b9d6bfdf15b9e6942de5c0188c7

commit 0208b3ba56f67b9d6bfdf15b9e6942de5c0188c7
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Tue Jun 8 03:53:00 2021 +0200

    uboot-mvebu: update to v2021.07
    
    Refresh the patches.
    Switch to AUTORELEASE while at it.
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 package/boot/uboot-mvebu/Makefile                                | 6 +++---
 package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile
index 37e93d1f51..bf03fdd2b2 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:=2021.01
-PKG_RELEASE:=1
+PKG_VERSION:=2021.07
+PKG_RELEASE:=$(AUTORELEASE)
 
-PKG_HASH:=b407e1510a74e863b8b5cb42a24625344f0e0c2fc7582d8c866bd899367d0454
+PKG_HASH:=312b7eeae44581d1362c3a3f02c28d806647756c82ba8c72241c7cdbe68ba77e
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch b/package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch
index eb0b05e4c6..2e7cf6663b 100644
--- a/package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch
+++ b/package/boot/uboot-mvebu/patches/210-link-libcrypto-static.patch
@@ -3,7 +3,7 @@ needed dependencies are added too.
 
 --- a/tools/Makefile
 +++ b/tools/Makefile
-@@ -158,7 +158,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON
+@@ -168,7 +168,7 @@ ifneq ($(CONFIG_MX23)$(CONFIG_MX28)$(CON
  HOSTCFLAGS_kwbimage.o += \
  	$(shell pkg-config --cflags libssl libcrypto 2> /dev/null || echo "")
  HOSTLDLIBS_mkimage += \


From lede-commits at lists.infradead.org  Sun Jul 25 04:59:04 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:59:04 -0400
Subject: [openwrt/openwrt] arm-trusted-firmware-mvebu: switch to CZ.NIC's
 Secure Firmware
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9935.1627215723.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/896d49d10aab219b905ae844490954d51090ee2d

commit 896d49d10aab219b905ae844490954d51090ee2d
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Tue Jun 8 05:42:51 2021 +0200

    arm-trusted-firmware-mvebu: switch to CZ.NIC's Secure Firmware
    
    CZ.NIC as part of Turris project released free and open source WTMI
    application firmware wtmi_app.bin for all Armada 3720 devices.
    
    This firmware includes additional features like access to Hardware
    Random Number Generator of Armada 3720 SoC which original Marvell's
    fuse.bin image does not have.
    
    Add a patch which allows to pass the commit id, so the firmware is able
    to identify itself, see a04bffeb.
    Add a patch to disable linking with gold, since the ARM toolchain
    doesn't ship gold.
    Cherry-pick the 3 post-release fixes.
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 package/boot/arm-trusted-firmware-mvebu/Makefile   | 24 ++++++++
 .../patches-mox-boot-builder/001-version.patch     | 12 ++++
 .../patches-mox-boot-builder/002-no-gold.patch     | 13 +++++
 ...art-fix-UART-baudrate-divisor-calculation.patch | 66 ++++++++++++++++++++++
 ...3700-change-pwm-clock-for-600-600-and-120.patch | 48 ++++++++++++++++
 .../102-avs-Validate-VDD-value-from-OTP.patch      | 52 +++++++++++++++++
 6 files changed, 215 insertions(+)

diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile
index 9082fc63ad..2369a1930a 100644
--- a/package/boot/arm-trusted-firmware-mvebu/Makefile
+++ b/package/boot/arm-trusted-firmware-mvebu/Makefile
@@ -111,6 +111,7 @@ TFA_MAKE_FLAGS += \
 		BL33=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.bin \
 		MV_DDR_PATH=$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \
 		WTP=$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME) \
+		WTMI_IMG=$(STAGING_DIR_IMAGE)/$(MOX_BB_NAME)-$(MOX_BB_RELEASE)/wtmi_app.bin \
 		USE_COHERENT_MEM=0 \
 		FIP_ALIGN=0x100 \
 		DDR_TOPOLOGY=$(DDR_TOPOLOGY) \
@@ -147,6 +148,16 @@ define Download/mv-ddr-marvell
   SUBDIR:=$(MV_DDR_NAME)
 endef
 
+MOX_BB_NAME:=mox-boot-builder
+MOX_BB_RELEASE:=v2021.04.09
+MOX_BB_SOURCE:=$(MOX_BB_NAME)-$(MOX_BB_RELEASE).tar.bz2
+
+define Download/mox-boot-builder
+  FILE:=$(MOX_BB_SOURCE)
+  URL:=https://gitlab.nic.cz/turris/mox-boot-builder/-/archive/$(MOX_BB_RELEASE)
+  HASH:=f0ed4fa25006e36a07d4256f633e3f25d6f8898dbe2e081e578251a182885520
+endef
+
 CM3_GCC_NAME:=gcc-arm
 CM3_GCC_RELEASE:=10.2-2020.11
 CM3_GCC_VERSION:=$(HOST_ARCH)-arm-none-eabi
@@ -162,6 +173,7 @@ define Build/Clean
 	rm -rf \
 		$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME) \
 		$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \
+		$(STAGING_DIR_IMAGE)/$(MOX_BB_NAME)-$(MOX_BB_RELEASE) \
 		$(STAGING_DIR_IMAGE)/$(CM3_GCC_NAME)-$(CM3_GCC_RELEASE)-$(CM3_GCC_VERSION)
 endef
 
@@ -169,6 +181,7 @@ define Build/Prepare
 	# Download sources
 	$(eval $(call Download,a3700-utils))
 	$(eval $(call Download,mv-ddr-marvell))
+	$(eval $(call Download,mox-boot-builder))
 	$(eval $(call Download,cm3-gcc))
 
 	$(call Build/Prepare/Default,)
@@ -180,7 +193,18 @@ define Build/Prepare
 	$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(MV_DDR_SOURCE)
 	echo "master" > $(STAGING_DIR_IMAGE)/$(MV_DDR_NAME)/branch.txt
 	$(call PatchDir/Default,$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME),./patches-mv-ddr-marvell)
+	$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(MOX_BB_SOURCE)
+	$(call PatchDir/Default,$(STAGING_DIR_IMAGE)/$(MOX_BB_NAME)-$(MOX_BB_RELEASE),./patches-mox-boot-builder)
 	$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(CM3_GCC_SOURCE)
 endef
 
+define Build/Compile
+	+$(MAKE) \
+		CROSS_CM3=$(STAGING_DIR_IMAGE)/$(CM3_GCC_NAME)-$(CM3_GCC_RELEASE)-$(CM3_GCC_VERSION)/bin/arm-none-eabi- \
+		WTMI_VERSION=$(MOX_BB_RELEASE) \
+		-C $(STAGING_DIR_IMAGE)/$(MOX_BB_NAME)-$(MOX_BB_RELEASE) \
+		wtmi_app.bin
+	$(call Build/Compile/Default)
+endef
+
 $(eval $(call BuildPackage/Trusted-Firmware-A))
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/001-version.patch b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/001-version.patch
new file mode 100644
index 0000000000..eb6941d2ae
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/001-version.patch
@@ -0,0 +1,12 @@
+diff --git a/wtmi/Makefile b/wtmi/Makefile
+index 75754dc..3602ec3 100644
+--- a/wtmi/Makefile
++++ b/wtmi/Makefile
+@@ -41,7 +41,6 @@ else
+ 	LTO_FLAGS =
+ endif
+ 
+-override WTMI_VERSION = $(shell git describe --always --dirty --tags)
+ ifndef WTMI_VERSION
+ $(error Repository is without git tags, please do a full git clone again)
+ endif
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/002-no-gold.patch b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/002-no-gold.patch
new file mode 100644
index 0000000000..943a6e2f4d
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/002-no-gold.patch
@@ -0,0 +1,13 @@
+diff --git a/wtmi/Makefile b/wtmi/Makefile
+index 75754dc..0c6238f 100644
+--- a/wtmi/Makefile
++++ b/wtmi/Makefile
+@@ -36,7 +36,7 @@ LDSCRIPT = wtmi.ld
+ INCLUDE  = -I.
+ 
+ ifeq ($(LTO), 1)
+-	LTO_FLAGS = -flto -flto-partition=none -Wl,-fuse-ld=gold
++	LTO_FLAGS = -flto -flto-partition=none
+ else
+ 	LTO_FLAGS =
+ endif
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch
new file mode 100644
index 0000000000..4bd66f9107
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/100-wtmi-uart-fix-UART-baudrate-divisor-calculation.patch
@@ -0,0 +1,66 @@
+From fb5e436843614f93b30aec0a2a00e5e59a133aab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <marek.behun at nic.cz>
+Date: Sat, 15 May 2021 17:44:24 +0200
+Subject: [PATCH] wtmi: uart: fix UART baudrate divisor calculation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The UART code uses the xtal clock as parent for UART baudrate
+generation, but it assumes that xtal runs at 25 MHz, which isn't
+necessarily the case for all A3720 boards.
+
+Use get_ref_clk() to determine xtal clock rate.
+
+Use rounding division to compute the divisor value.
+
+Signed-off-by: Marek Beh?n <marek.behun at nic.cz>
+Suggested-by: Pali Roh?r <pali at kernel.org>
+---
+ wtmi/types.h | 5 +++++
+ wtmi/uart.c  | 7 ++++---
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/wtmi/types.h b/wtmi/types.h
+index 7a6c6c6..ea873fc 100644
+--- a/wtmi/types.h
++++ b/wtmi/types.h
+@@ -47,4 +47,9 @@ typedef u32			size_t;
+ 
+ #define maybe_unused __attribute__((unused))
+ 
++static inline u32 div_round_closest_u32(u32 x, u32 d)
++{
++	return (x + d / 2) / d;
++}
++
+ #endif /* __TYPES_H */
+diff --git a/wtmi/uart.c b/wtmi/uart.c
+index d40633d..75864b5 100644
+--- a/wtmi/uart.c
++++ b/wtmi/uart.c
+@@ -40,8 +40,6 @@
+ #include "stdio.h"
+ #include "debug.h"
+ 
+-#define UART_CLOCK_FREQ		25804800
+-
+ const struct uart_info uart1_info = {
+ 	.rx	= 0xc0012000,
+ 	.tx	= 0xc0012004,
+@@ -76,8 +74,11 @@ void uart_set_stdio(const struct uart_info *info)
+ 
+ void uart_reset(const struct uart_info *info, unsigned int baudrate)
+ {
++	u32 parent_rate = get_ref_clk() * 1000000;
++
+ 	/* set baudrate */
+-	writel((UART_CLOCK_FREQ / baudrate / 16), info->baud);
++	writel(div_round_closest_u32(parent_rate, baudrate * 16), info->baud);
++
+ 	/* set Programmable Oversampling Stack to 0, UART defaults to 16X scheme */
+ 	writel(0, info->possr);
+ 
+-- 
+2.30.2
+
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch
new file mode 100644
index 0000000000..6d74a053e2
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/101-fix-clock-a3700-change-pwm-clock-for-600-600-and-120.patch
@@ -0,0 +1,48 @@
+From 3f33626ac7037bd62df9391e899f50e076e58cf7 Mon Sep 17 00:00:00 2001
+From: zachary <zhangzg at marvell.com>
+Date: Wed, 25 Oct 2017 15:50:29 +0800
+Subject: [PATCH] fix: clock: a3700: change pwm clock for 600/600 and 1200/750
+ preset
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This patch is to change pwm clock from 100MHz to 50MHz for 600/600 and
+1200/750 preset to align with other presets.
+
+Change-Id: I067e189043be8c776bd3e7015a06f8ddf2590b96
+Signed-off-by: zachary <zhangzg at marvell.com>
+Reviewed-on: http://vgitil04.il.marvell.com:8080/45513
+Tested-by: iSoC Platform CI <ykjenk at marvell.com>
+Reviewed-by: Kostya Porotchkin <kostap at marvell.com>
+Reviewed-by: Hua Jing <jinghua at marvell.com>
+Signed-off-by: Marek Beh?n <marek.behun at nic.cz>
+---
+ wtmi/clock.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/wtmi/clock.c b/wtmi/clock.c
+index 97c2825..1a1f0c6 100644
+--- a/wtmi/clock.c
++++ b/wtmi/clock.c
+@@ -447,7 +447,7 @@ static struct clock_cfg clk_cfg_all[] = {\
+ 		/* NorthBridge */\
+ 		{{TBG_A_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_A_P, TBG_A_P, TBG_A_P,\
+ 		  TBG_B_S, TBG_B_S, TBG_A_P, TBG_B_S, TBG_A_P, TBG_B_S},\
+-		 {2, 5, 2, 4, 1, 2, 6, 2},		/* DIV0 */\
++		 {4, 5, 2, 4, 1, 2, 6, 2},		/* DIV0 */\
+ 		 {1, 5, 2, 5, 2, 3, 2, 2, 3},		/* DIV1 */\
+ 		 {4, 1, 5, 1, 3, 1, 2, 0, 0, 1} },	/* DIV2 */\
+ 		/* SouthBridge */\
+@@ -495,7 +495,7 @@ static struct clock_cfg clk_cfg_all[] = {\
+ 		/* NorthBridge */\
+ 		{{TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S, TBG_B_S,\
+ 		  TBG_B_S, TBG_A_S, TBG_B_S, TBG_A_P, TBG_B_S, TBG_A_S},\
+-		{3, 4, 3, 4, 1, 1, 5, 1},		/* DIV0 */\
++		{6, 4, 3, 4, 1, 1, 5, 1},		/* DIV0 */\
+ 		{1, 6, 3, 4, 1, 6, 1, 1, 6},		/* DIV1 */\
+ 		{4, 1, 6, 1, 3, 1, 3, 0, 0, 1} },	/* DIV2 */\
+ 		/* SouthBridge */\
+-- 
+2.30.2
+
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch
new file mode 100644
index 0000000000..d44eb21181
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-mvebu/patches-mox-boot-builder/102-avs-Validate-VDD-value-from-OTP.patch
@@ -0,0 +1,52 @@
+From 15ff10623c83ee2e626d93d16e022b115dcb608f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali at kernel.org>
+Date: Sat, 10 Apr 2021 16:56:12 +0200
+Subject: [PATCH] avs: Validate VDD value from OTP
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+CPU VDD voltage value for 1.2 GHz frequency on some Espressobin boards is
+not set and raw value 0x00 is returned. In this case init_avs() function
+calculated CPU VDD voltage value to 0x00 + AVS_VDD_BASE = 0.898 V, which is
+too low for any operation and Espressobin board immediately crashed
+init_avs() function set this low value.
+
+This patch fixes above issue by validating returned VDD value from OTP and
+using default VDD value when invalid value is in OTP. With this patch
+init_avs() function does cause CPU crash anymore.
+
+Signed-off-by: Pali Roh?r <pali at kernel.org>
+Signed-off-by: Marek Beh?n <marek.behun at nic.cz>
+---
+ wtmi/avs.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/wtmi/avs.c b/wtmi/avs.c
+index 36ca9fa..4624359 100644
+--- a/wtmi/avs.c
++++ b/wtmi/avs.c
+@@ -140,10 +140,16 @@ int init_avs(u32 speed)
+ 	}
+ 
+ 	if (svc_rev >= SVC_REVISION_2) {
+-		vdd_otp = ((otp_data[OTP_DATA_SVC_SPEED_ID] >> shift) +
+-			   AVS_VDD_BASE) & AVS_VDD_MASK;
+-		regval |= (vdd_otp << HIGH_VDD_LIMIT_OFF);
+-		regval |= (vdd_otp << LOW_VDD_LIMIT_OFF);
++		vdd_otp = (otp_data[OTP_DATA_SVC_SPEED_ID] >> shift) &
++			  AVS_VDD_MASK;
++		if (!vdd_otp || vdd_otp + AVS_VDD_BASE > AVS_VDD_MASK) {
++			regval |= (vdd_default << HIGH_VDD_LIMIT_OFF);
++			regval |= (vdd_default << LOW_VDD_LIMIT_OFF);
++		} else {
++			vdd_otp += AVS_VDD_BASE;
++			regval |= (vdd_otp << HIGH_VDD_LIMIT_OFF);
++			regval |= (vdd_otp << LOW_VDD_LIMIT_OFF);
++		}
+ 	} else {
+ 		regval |= (vdd_default << HIGH_VDD_LIMIT_OFF);
+ 		regval |= (vdd_default << LOW_VDD_LIMIT_OFF);
+-- 
+2.30.2
+


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:57 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:57 -0400
Subject: [openwrt/openwrt] uboot-envtools: mvebu: update uci defaults for
 Turris Omnia
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9938.1627215726.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/713be7543909b79fbbccdea297e306cb3d3adb0c

commit 713be7543909b79fbbccdea297e306cb3d3adb0c
Author: Marek Beh?n <marek.behun at nic.cz>
AuthorDate: Thu Jul 15 20:48:33 2021 +0200

    uboot-envtools: mvebu: update uci defaults for Turris Omnia
    
    From version 2021.09 U-Boot will fixup Turris Omnia's DTB before
    booting, separating U-Boot's environment into separate MTD partition
    "u-boot-env" [1].
    
    Check if "u-boot-env" MTD partition exists and set the uci defaults
    accordingly.
    
    [1] https://lists.denx.de/pipermail/u-boot/2021-July/455017.html
    
    Signed-off-by: Marek Beh?n <marek.behun at nic.cz>
---
 package/boot/uboot-envtools/files/mvebu | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/boot/uboot-envtools/files/mvebu b/package/boot/uboot-envtools/files/mvebu
index 25f29599a3..7136d5b4cd 100644
--- a/package/boot/uboot-envtools/files/mvebu
+++ b/package/boot/uboot-envtools/files/mvebu
@@ -17,7 +17,10 @@ buffalo,ls421de)
 	ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x10000"
 	;;
 cznic,turris-omnia)
-	if grep -q 'U-Boot 2015.10-rc2' /dev/mtd0; then
+	idx="$(find_mtd_index u-boot-env)"
+	if [ -n "$idx" ]; then
+		ubootenv_add_uci_config "/dev/mtd${idx}" "0x0" "0x10000" "0x10000"
+	elif grep -q 'U-Boot 2015.10-rc2' /dev/mtd0; then
 		ubootenv_add_uci_config "/dev/mtd0" "0xc0000" "0x10000" "0x40000"
 	else
 		ubootenv_add_uci_config "/dev/mtd0" "0xf0000" "0x10000" "0x10000"


From lede-commits at lists.infradead.org  Sun Jul 25 04:59:03 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:59:03 -0400
Subject: [openwrt/openwrt] arm-trusted-firmware-mvebu: update CM3 toolchain
 to v10.2
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9939.1627215729.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/ac42765dca2e2026ba1adad1b1d0739282d2d045

commit ac42765dca2e2026ba1adad1b1d0739282d2d045
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Tue Jun 8 08:31:39 2021 +0200

    arm-trusted-firmware-mvebu: update CM3 toolchain to v10.2
    
    Linaro stopped shipping binary toolchains quite some time ago, switch over to
    the ARM builds.
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 package/boot/arm-trusted-firmware-mvebu/Makefile | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile
index 1592e37f6d..9082fc63ad 100644
--- a/package/boot/arm-trusted-firmware-mvebu/Makefile
+++ b/package/boot/arm-trusted-firmware-mvebu/Makefile
@@ -107,7 +107,7 @@ TFA_TARGETS:= \
 	udpu
 
 TFA_MAKE_FLAGS += \
-		CROSS_CM3=$(STAGING_DIR_IMAGE)/$(LINARO_NAME)-$(LINARO_RELEASE).$(LINARO_VERSION)/bin/arm-linux-gnueabi- \
+		CROSS_CM3=$(STAGING_DIR_IMAGE)/$(CM3_GCC_NAME)-$(CM3_GCC_RELEASE)-$(CM3_GCC_VERSION)/bin/arm-none-eabi- \
 		BL33=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.bin \
 		MV_DDR_PATH=$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \
 		WTP=$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME) \
@@ -147,29 +147,29 @@ define Download/mv-ddr-marvell
   SUBDIR:=$(MV_DDR_NAME)
 endef
 
-LINARO_NAME:=gcc-linaro
-LINARO_RELEASE:=6
-LINARO_VERSION:=5.0-2018.12-$(HOST_ARCH)_arm-linux-gnueabi
-LINARO_SOURCE=$(LINARO_NAME)-$(LINARO_RELEASE).$(LINARO_VERSION).tar.xz
+CM3_GCC_NAME:=gcc-arm
+CM3_GCC_RELEASE:=10.2-2020.11
+CM3_GCC_VERSION:=$(HOST_ARCH)-arm-none-eabi
+CM3_GCC_SOURCE=$(CM3_GCC_NAME)-$(CM3_GCC_RELEASE)-$(CM3_GCC_VERSION).tar.xz
 
-define Download/gcc-linaro
-  FILE:=$(LINARO_SOURCE)
-  URL:=https://releases.linaro.org/components/toolchain/binaries/latest-$(LINARO_RELEASE)/arm-linux-gnueabi/
-  HASH:=2d4a92d6c8b384ae404b2e02c1c412e3ec18f9b714135acf046b2b1b510e9ace
+define Download/cm3-gcc
+  FILE:=$(CM3_GCC_SOURCE)
+  URL:=https://developer.arm.com/-/media/Files/downloads/gnu-a/$(CM3_GCC_RELEASE)/binrel
+  HASH:=bf7ee185936d22d787b80c8da573f72ead5675695331fb8b590f0133ef1f6bb9
 endef
 
 define Build/Clean
 	rm -rf \
 		$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME) \
 		$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \
-		$(STAGING_DIR_IMAGE)/$(LINARO_NAME)-$(LINARO_RELEASE).$(LINARO_VERSION)
+		$(STAGING_DIR_IMAGE)/$(CM3_GCC_NAME)-$(CM3_GCC_RELEASE)-$(CM3_GCC_VERSION)
 endef
 
 define Build/Prepare
 	# Download sources
 	$(eval $(call Download,a3700-utils))
 	$(eval $(call Download,mv-ddr-marvell))
-	$(eval $(call Download,gcc-linaro))
+	$(eval $(call Download,cm3-gcc))
 
 	$(call Build/Prepare/Default,)
 
@@ -180,7 +180,7 @@ define Build/Prepare
 	$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(MV_DDR_SOURCE)
 	echo "master" > $(STAGING_DIR_IMAGE)/$(MV_DDR_NAME)/branch.txt
 	$(call PatchDir/Default,$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME),./patches-mv-ddr-marvell)
-	$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(LINARO_SOURCE)
+	$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(CM3_GCC_SOURCE)
 endef
 
 $(eval $(call BuildPackage/Trusted-Firmware-A))


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:52 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:52 -0400
Subject: [openwrt/openwrt]  realtek: remove rtl83xx vlan 1 special cases
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9940.1627215743.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/ad712c71cea3b26d8a7c53200c742181d1d040e7

commit ad712c71cea3b26d8a7c53200c742181d1d040e7
Author: Thomas Nixon <tom at tomn.co.uk>
AuthorDate: Sat Jun 26 12:50:12 2021 +0000

    realtek: remove rtl83xx vlan 1 special cases
    
    On reset, the PVID of all ports is set to 1; if this is reset to 0,
    the special cases for VLAN 1 are no longer required.
    
    port_vlan_add is called with vid=0 when the DSA port interfaces are
    enabled with no VLAN; previously the VLAN was not configured in this
    case, relying on VLAN 1 being present, but with the PVID set to 0,
    configuring VLAN 0 as normal works as expected.
    
    Signed-off-by: Thomas Nixon <tom at tomn.co.uk>
---
 target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
index c5f243c55a..c2a230c4cb 100644
--- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/dsa.c
@@ -134,6 +134,10 @@ static void rtl83xx_vlan_setup(struct rtl838x_switch_priv *priv)
 	for (i = 0; i < MAX_VLANS; i ++)
 		priv->r->vlan_set_tagged(i, &info);
 
+	// reset PVIDs; defaults to 1 on reset
+	for (i = 0; i <= priv->ds->num_ports; i++)
+		sw_w32(0, priv->r->vlan_port_pb + (i << 2));
+
 	// Set forwarding action based on inner VLAN tag
 	for (i = 0; i < priv->cpu_port; i++)
 		priv->r->vlan_fwd_on_inner(i, true);
@@ -909,9 +913,6 @@ static void rtl83xx_vlan_add(struct dsa_switch *ds, int port,
 	}
 
 	for (v = vlan->vid_begin; v <= vlan->vid_end; v++) {
-		if (!v)
-			continue;
-
 		/* Get port memberships of this vlan */
 		priv->r->vlan_tables_read(v, &info);
 
@@ -971,9 +972,7 @@ static int rtl83xx_vlan_del(struct dsa_switch *ds, int port,
 
 		/* remove port from both tables */
 		info.untagged_ports &= (~BIT_ULL(port));
-		/* always leave vid 1 */
-		if (v != 1)
-			info.tagged_ports &= (~BIT_ULL(port));
+		info.tagged_ports &= (~BIT_ULL(port));
 
 		priv->r->vlan_set_untagged(v, info.untagged_ports);
 		pr_debug("Untagged ports, VLAN %d: %llx\n", v, info.untagged_ports);


From lede-commits at lists.infradead.org  Sun Jul 25 04:59:01 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:59:01 -0400
Subject: [openwrt/openwrt] arm-trusted-firmware-mvebu: update a3700-tools to
 current master
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9941.1627215746.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/6618e33f2633390d3572390616fe354ecd21bfb8

commit 6618e33f2633390d3572390616fe354ecd21bfb8
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Tue Jun 8 04:20:26 2021 +0200

    arm-trusted-firmware-mvebu: update a3700-tools to current master
    
    2efdb10 wtmi: Fix calculation of UART divider
    4247e39 fix: twin die ddr porting guide
    8ad7992 sys_init: Add missing newlines in debug mode
    4ddea19 avs: Validate VDD value from OTP
    c444aeb avs: Fix description for avs value 0x2e
    1915b78 tim: Optimize code generated by gettimver.sh and print newline
    21f566d tim: Print mv_ddr version and configuration on UART
    840b70b tim: Use variable $DDRFILE where possible
    c10e6ae tim: Fix waiting for UART TX ready
    7bf95cf wtmi: Wait 3ms for the TX on UART to be empty prior resetting TX FIFO
    63e8433 wtmi: Add "dirty" suffix to git commit and rebuild sys_init.bin binary when VERSION changes
    e949b58 wtmi: During setup clock phase print CPU and DDR speed
    10376b5 wtmi: Flush output on UART after the '\n' character
    509c647 Makefile: Check that specified DDR_TOPOLOGY option is valid
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 package/boot/arm-trusted-firmware-mvebu/Makefile              |  6 +++---
 .../patches-a3700-utils/001-version.patch                     | 11 ++++++-----
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile
index 7fefee3846..bd03a6a32e 100644
--- a/package/boot/arm-trusted-firmware-mvebu/Makefile
+++ b/package/boot/arm-trusted-firmware-mvebu/Makefile
@@ -122,15 +122,15 @@ TFA_MAKE_FLAGS += \
 		mrvl_uart
 
 A3700_UTILS_NAME:=a3700-utils
-A3700_UTILS_RELEASE:=5598e150
+A3700_UTILS_RELEASE:=2efdb10f
 A3700_UTILS_SOURCE=$(A3700_UTILS_NAME)-$(A3700_UTILS_RELEASE).tar.bz2
 
 define Download/a3700-utils
   FILE:=$(A3700_UTILS_SOURCE)
   PROTO:=git
   URL:=https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell.git
-  VERSION:=5598e150fa3a1568256c30223fd2b214d729f26a
-  MIRROR_HASH:=4c3a3bed97833d08af4e42995c0c5af6c107f990fd492cd90aa3e79134d2751e
+  VERSION:=2efdb10f3524c534d276002adf81fec06e0f1cf2
+  MIRROR_HASH:=4476e1bacfa7abb4a1303c6cf3aa7d067038b24090dfd5da13ca2a72a0d5c7a4
   SUBDIR:=$(A3700_UTILS_NAME)
 endef
 
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches-a3700-utils/001-version.patch b/package/boot/arm-trusted-firmware-mvebu/patches-a3700-utils/001-version.patch
index 745e615074..0519598a28 100644
--- a/package/boot/arm-trusted-firmware-mvebu/patches-a3700-utils/001-version.patch
+++ b/package/boot/arm-trusted-firmware-mvebu/patches-a3700-utils/001-version.patch
@@ -1,13 +1,14 @@
 diff --git a/wtmi/sys_init/Makefile b/wtmi/sys_init/Makefile
 --- a/wtmi/sys_init/Makefile
 +++ b/wtmi/sys_init/Makefile
-@@ -51,7 +51,8 @@ ECHO     = @echo
+@@ -51,8 +51,8 @@ ECHO     = @echo
  SED      = @sed
  
  LOCAL_VERSION_STRING	?= -armada
--BUILD_STRING		:= $(shell git log -n 1 --pretty=format:"%h")
-+A3700_UTILS_COMMIT_ID	?= $(shell git log -n 1 --pretty=format:"%h")
-+BUILD_STRING		:= $(A3700_UTILS_COMMIT_ID)
- VERSION_STRING		:= $(LOCAL_VERSION_STRING)-$(BUILD_STRING)
+-BUILD_STRING		:= $(shell git log -n 1 --pretty=format:"%h" && (git diff-index --quiet HEAD || echo -dirty))
+-VERSION_STRING		:= $(LOCAL_VERSION_STRING)-$(BUILD_STRING)
++A3700_UTILS_COMMIT_ID	?= $(shell git log -n 1 --pretty=format:"%h" && (git diff-index --quiet HEAD || echo -dirty))
++VERSION_STRING		:= $(LOCAL_VERSION_STRING)-$(A3700_UTILS_COMMIT_ID)
  
  CPUOPTS  = -mthumb -mcpu=cortex-m3 -mlittle-endian
+ BINPATH  = build


From lede-commits at lists.infradead.org  Sun Jul 25 04:59:00 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:59:00 -0400
Subject: [openwrt/openwrt]  arm-trusted-firmware-mvebu: update to v2.5
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9942.1627215750.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/b40705b677030c30896917b7d2aa050fe5865605

commit b40705b677030c30896917b7d2aa050fe5865605
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Tue Jun 8 04:19:59 2021 +0200

    arm-trusted-firmware-mvebu: update to v2.5
    
    Revert to using the checked in `tbb_linux` image tool binary since building
    it drags in the rather big Crypto++ project.
    
    Cherry-pick the post-release UART fixes.
    
    Switch to AUTORELEASE while at it.
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 package/boot/arm-trusted-firmware-mvebu/Makefile   |  13 +-
 .../patches/001-imagetool.patch                    |  20 +++
 ...rvell-a3720-uart-fix-UART-clock-rate-valu.patch |  60 +++++++
 ...rvell-a3720-uart-fix-configuring-UART-clo.patch |  53 ++++++
 ...at-marvell-uart-de-duplicate-PLAT_MARVELL.patch | 122 ++++++++++++++
 ...rvell-a3720-uart-fix-UART-parent-clock-ra.patch | 177 +++++++++++++++++++++
 6 files changed, 441 insertions(+), 4 deletions(-)

diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile
index 6fc5e44e1c..7fefee3846 100644
--- a/package/boot/arm-trusted-firmware-mvebu/Makefile
+++ b/package/boot/arm-trusted-firmware-mvebu/Makefile
@@ -7,9 +7,9 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_VERSION:=2.4
-PKG_RELEASE:=1
-PKG_HASH:=bf3eb3617a74cddd7fb0e0eacbfe38c3258ee07d4c8ed730deef7a175cc3d55b
+PKG_VERSION:=2.5
+PKG_RELEASE:=$(AUTORELEASE)
+PKG_HASH:=ad8a2ffcbcd12d919723da07630fc0840c3c2fba7656d1462e45488e42995d7c
 
 PKG_MAINTAINER:=Vladimir Vid <vladimir.vid at sartura.hr>
 
@@ -111,12 +111,15 @@ TFA_MAKE_FLAGS += \
 		BL33=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot.bin \
 		MV_DDR_PATH=$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \
 		WTP=$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME) \
+		USE_COHERENT_MEM=0 \
+		FIP_ALIGN=0x100 \
 		DDR_TOPOLOGY=$(DDR_TOPOLOGY) \
 		CLOCKSPRESET=$(CLOCKSPRESET) \
 		A3700_UTILS_COMMIT_ID=$(A3700_UTILS_RELEASE) \
 		MV_DDR_COMMIT_ID=$(MV_DDR_RELEASE) \
 		all \
-		mrvl_flash
+		mrvl_flash \
+		mrvl_uart
 
 A3700_UTILS_NAME:=a3700-utils
 A3700_UTILS_RELEASE:=5598e150
@@ -172,8 +175,10 @@ define Build/Prepare
 
 	mkdir -p $(STAGING_DIR_IMAGE)
 	$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(A3700_UTILS_SOURCE)
+	echo "master" > $(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME)/branch.txt
 	$(call PatchDir/Default,$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME),./patches-a3700-utils)
 	$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(MV_DDR_SOURCE)
+	echo "master" > $(STAGING_DIR_IMAGE)/$(MV_DDR_NAME)/branch.txt
 	$(call PatchDir/Default,$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME),./patches-mv-ddr-marvell)
 	$(TAR) -C $(STAGING_DIR_IMAGE) -xf $(DL_DIR)/$(LINARO_SOURCE)
 endef
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches/001-imagetool.patch b/package/boot/arm-trusted-firmware-mvebu/patches/001-imagetool.patch
new file mode 100644
index 0000000000..1b4bb09c8c
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-mvebu/patches/001-imagetool.patch
@@ -0,0 +1,20 @@
+--- a/plat/marvell/armada/a3k/common/a3700_common.mk
++++ b/plat/marvell/armada/a3k/common/a3700_common.mk
+@@ -76,7 +76,7 @@ $(if $(wildcard $(value WTP)/*),,$(error
+ $(if $(shell test -s "$(value WTP)/branch.txt" || git -C $(value WTP) rev-parse --show-cdup 2>&1),$(error "'WTP=$(value WTP)' was specified, but '$(value WTP)' does not contain valid Marvell a3700_utils release tarball nor git repository"))
+ 
+ DOIMAGEPATH	:= $(WTP)
+-DOIMAGETOOL	:= $(DOIMAGEPATH)/wtptp/src/TBB_Linux/release/TBB_linux
++DOIMAGETOOL	:= $(DOIMAGEPATH)/wtptp/linux/tbb_linux
+ 
+ BUILD_UART	:= uart-images
+ UART_IMAGE	:= $(BUILD_UART).tgz.bin
+@@ -132,7 +132,7 @@ TIMBLDUARTARGS		:= $(MARVELL_SECURE_BOOT
+ CRYPTOPP_LIBDIR		?= $(CRYPTOPP_PATH)
+ CRYPTOPP_INCDIR		?= $(CRYPTOPP_PATH)
+ 
+-$(DOIMAGETOOL): FORCE
++$(DOIMAGETOOL):
+ 	$(if $(CRYPTOPP_LIBDIR),,$(error "Platform '$(PLAT)' for WTP image tool requires CRYPTOPP_PATH or CRYPTOPP_LIBDIR. Please set CRYPTOPP_PATH or CRYPTOPP_LIBDIR to point to the right directory"))
+ 	$(if $(CRYPTOPP_INCDIR),,$(error "Platform '$(PLAT)' for WTP image tool requires CRYPTOPP_PATH or CRYPTOPP_INCDIR. Please set CRYPTOPP_PATH or CRYPTOPP_INCDIR to point to the right directory"))
+ 	$(if $(wildcard $(CRYPTOPP_LIBDIR)/*),,$(error "Either 'CRYPTOPP_PATH' or 'CRYPTOPP_LIB' was set to '$(CRYPTOPP_LIBDIR)', but '$(CRYPTOPP_LIBDIR)' does not exist"))
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches/100-fix-plat-marvell-a3720-uart-fix-UART-clock-rate-valu.patch b/package/boot/arm-trusted-firmware-mvebu/patches/100-fix-plat-marvell-a3720-uart-fix-UART-clock-rate-valu.patch
new file mode 100644
index 0000000000..6f887411b4
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-mvebu/patches/100-fix-plat-marvell-a3720-uart-fix-UART-clock-rate-valu.patch
@@ -0,0 +1,60 @@
+From 66a7752834382595d26214783ae4698fd1f00bd6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali at kernel.org>
+Date: Thu, 13 May 2021 14:53:44 +0200
+Subject: [PATCH] fix(plat/marvell/a3720/uart): fix UART clock rate value and
+ divisor calculation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+UART parent clock is by default the platform's xtal clock, which is
+25 MHz.
+
+The value defined in the driver, though, is 25.8048 MHz. This is a hack
+for the suboptimal divisor calculation
+  Divisor = UART clock / (16 * baudrate)
+which does not use rounding division, resulting in a suboptimal value
+for divisor if the correct parent clock rate was used.
+
+Change the code for divisor calculation to
+  Divisor = Round(UART clock / (16 * baudrate))
+and change the parent clock rate value to 25 MHz.
+
+The final UART divisor for default baudrate 115200 is not affected by
+this change.
+
+(Note that the parent clock rate should not be defined via a macro,
+since the xtal clock can also be 40 MHz. This is outside of the scope of
+this fix, though.)
+
+Signed-off-by: Pali Roh?r <pali at kernel.org>
+Change-Id: Iaa401173df87aec94f2dd1b38a90fb6ed0bf0ec6
+---
+ drivers/marvell/uart/a3700_console.S                  | 3 ++-
+ plat/marvell/armada/a3k/common/include/platform_def.h | 2 +-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/marvell/uart/a3700_console.S
++++ b/drivers/marvell/uart/a3700_console.S
+@@ -45,8 +45,9 @@ func console_a3700_core_init
+ 	cbz	w2, init_fail
+ 
+ 	/* Program the baudrate */
+-	/* Divisor =  Uart clock / (16 * baudrate) */
++	/* Divisor = Round(Uartclock / (16 * baudrate)) */
+ 	lsl	w2, w2, #4
++	add	w1, w1, w2, lsr #1
+ 	udiv	w2, w1, w2
+ 	and	w2, w2, #0x3ff
+ 
+--- a/plat/marvell/armada/a3k/common/include/platform_def.h
++++ b/plat/marvell/armada/a3k/common/include/platform_def.h
+@@ -164,7 +164,7 @@
+  * PL011 related constants
+  */
+ #define PLAT_MARVELL_BOOT_UART_BASE		(MVEBU_REGS_BASE + 0x12000)
+-#define PLAT_MARVELL_BOOT_UART_CLK_IN_HZ	25804800
++#define PLAT_MARVELL_BOOT_UART_CLK_IN_HZ	25000000
+ 
+ #define PLAT_MARVELL_CRASH_UART_BASE		PLAT_MARVELL_BOOT_UART_BASE
+ #define PLAT_MARVELL_CRASH_UART_CLK_IN_HZ	PLAT_MARVELL_BOOT_UART_CLK_IN_HZ
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches/101-fix-plat-marvell-a3720-uart-fix-configuring-UART-clo.patch b/package/boot/arm-trusted-firmware-mvebu/patches/101-fix-plat-marvell-a3720-uart-fix-configuring-UART-clo.patch
new file mode 100644
index 0000000000..dee4c63d3c
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-mvebu/patches/101-fix-plat-marvell-a3720-uart-fix-configuring-UART-clo.patch
@@ -0,0 +1,53 @@
+From b9185c75f7ec2b600ebe0d49281e216a2456b764 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali at kernel.org>
+Date: Thu, 13 May 2021 15:11:06 +0200
+Subject: [PATCH] fix(plat/marvell/a3720/uart): fix configuring UART clock
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When configuring the UART_BAUD_REG register, the function
+console_a3700_core_init() currently only changes the baud divisor field,
+leaving other fields to their previous value.
+
+This is incorrect, because the baud divisor is computed with the
+assumption that the parent clock rate is 25 MHz, and since the other
+fields in this register configure the parent clock, which could have
+been changed by U-Boot or Linux.
+
+Fix this function to also configure the other fields so that the UART
+parent clock is selected to be the xtal clock.
+
+For example without this change TF-A prints only
+
+    ERROR: a3700_system_off needs to be implemented
+
+followed by garbage after plat_crash_console_init() is called.
+
+After applying this change instead of garbage it also print crash info:
+
+    PANIC at PC : 0x0000000004023800
+
+Signed-off-by: Pali Roh?r <pali at kernel.org>
+Change-Id: I72f338355cc60d939b8bb978d9c7fdd576416b81
+---
+ drivers/marvell/uart/a3700_console.S | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- a/drivers/marvell/uart/a3700_console.S
++++ b/drivers/marvell/uart/a3700_console.S
+@@ -49,12 +49,9 @@ func console_a3700_core_init
+ 	lsl	w2, w2, #4
+ 	add	w1, w1, w2, lsr #1
+ 	udiv	w2, w1, w2
+-	and	w2, w2, #0x3ff
++	and	w2, w2, #0x3ff /* clear all other bits to use default clock */
+ 
+-	ldr	w3, [x0, #UART_BAUD_REG]
+-	bic	w3, w3, 0x3ff
+-	orr	w3, w3, w2
+-	str	w3, [x0, #UART_BAUD_REG]/* set baud rate divisor */
++	str	w2, [x0, #UART_BAUD_REG]/* set baud rate divisor */
+ 
+ 	/* Set UART to default 16X scheme */
+ 	mov	w3, #0
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches/102-refactor-plat-marvell-uart-de-duplicate-PLAT_MARVELL.patch b/package/boot/arm-trusted-firmware-mvebu/patches/102-refactor-plat-marvell-uart-de-duplicate-PLAT_MARVELL.patch
new file mode 100644
index 0000000000..7a1f19a002
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-mvebu/patches/102-refactor-plat-marvell-uart-de-duplicate-PLAT_MARVELL.patch
@@ -0,0 +1,122 @@
+From 3133625859b74df42deddd80b705578af6fc2fea Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali at kernel.org>
+Date: Fri, 14 May 2021 13:21:56 +0200
+Subject: [PATCH] refactor(plat/marvell/uart): de-duplicate PLAT_MARVELL_UART
+ macros
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Macros PLAT_MARVELL_BOOT_UART* and PLAT_MARVELL_CRASH_UART* are defined
+to same values. De-duplicate them into PLAT_MARVELL_UART* macros.
+
+Signed-off-by: Pali Roh?r <pali at kernel.org>
+Change-Id: Iae5daf7cad6a971e6f3dbe561df3d0174106ca7f
+---
+ plat/marvell/armada/a3k/common/include/platform_def.h     | 7 ++-----
+ plat/marvell/armada/a8k/a80x0_puzzle/board/system_power.c | 4 ++--
+ plat/marvell/armada/a8k/common/include/platform_def.h     | 7 ++-----
+ plat/marvell/armada/common/aarch64/marvell_helpers.S      | 8 ++++----
+ plat/marvell/armada/common/marvell_console.c              | 8 ++++----
+ 5 files changed, 14 insertions(+), 20 deletions(-)
+
+--- a/plat/marvell/armada/a3k/common/include/platform_def.h
++++ b/plat/marvell/armada/a3k/common/include/platform_def.h
+@@ -163,11 +163,8 @@
+ /*
+  * PL011 related constants
+  */
+-#define PLAT_MARVELL_BOOT_UART_BASE		(MVEBU_REGS_BASE + 0x12000)
+-#define PLAT_MARVELL_BOOT_UART_CLK_IN_HZ	25000000
+-
+-#define PLAT_MARVELL_CRASH_UART_BASE		PLAT_MARVELL_BOOT_UART_BASE
+-#define PLAT_MARVELL_CRASH_UART_CLK_IN_HZ	PLAT_MARVELL_BOOT_UART_CLK_IN_HZ
++#define PLAT_MARVELL_UART_BASE			(MVEBU_REGS_BASE + 0x12000)
++#define PLAT_MARVELL_UART_CLK_IN_HZ		25000000
+ 
+ #define PLAT_MARVELL_BL31_RUN_UART_BASE		PLAT_MARVELL_BOOT_UART_BASE
+ #define PLAT_MARVELL_BL31_RUN_UART_CLK_IN_HZ	PLAT_MARVELL_BOOT_UART_CLK_IN_HZ
+--- a/plat/marvell/armada/a8k/a80x0_puzzle/board/system_power.c
++++ b/plat/marvell/armada/a8k/a80x0_puzzle/board/system_power.c
+@@ -41,8 +41,8 @@ int system_power_off(void)
+ 	len = sizeof(system_off_now);
+ 	system_off_now[len - 1] = add_xor_checksum(system_off_now, len);
+ 
+-	console_16550_register(PLAT_MARVELL_BOOT_UART_BASE + 0x100,
+-		PLAT_MARVELL_BOOT_UART_CLK_IN_HZ, 115200, &console);
++	console_16550_register(PLAT_MARVELL_UART_BASE + 0x100,
++		PLAT_MARVELL_UART_CLK_IN_HZ, 115200, &console);
+ 
+ 	/* Send system_off_now to console */
+ 	for (i = 0; i < len; i++) {
+--- a/plat/marvell/armada/a8k/common/include/platform_def.h
++++ b/plat/marvell/armada/a8k/common/include/platform_def.h
+@@ -168,11 +168,8 @@
+ /*
+  * PL011 related constants
+  */
+-#define PLAT_MARVELL_BOOT_UART_BASE		(MVEBU_REGS_BASE + 0x512000)
+-#define PLAT_MARVELL_BOOT_UART_CLK_IN_HZ	200000000
+-
+-#define PLAT_MARVELL_CRASH_UART_BASE		PLAT_MARVELL_BOOT_UART_BASE
+-#define PLAT_MARVELL_CRASH_UART_CLK_IN_HZ	PLAT_MARVELL_BOOT_UART_CLK_IN_HZ
++#define PLAT_MARVELL_UART_BASE			(MVEBU_REGS_BASE + 0x512000)
++#define PLAT_MARVELL_UART_CLK_IN_HZ		200000000
+ 
+ #define PLAT_MARVELL_BL31_RUN_UART_BASE		PLAT_MARVELL_BOOT_UART_BASE
+ #define PLAT_MARVELL_BL31_RUN_UART_CLK_IN_HZ	PLAT_MARVELL_BOOT_UART_CLK_IN_HZ
+--- a/plat/marvell/armada/common/aarch64/marvell_helpers.S
++++ b/plat/marvell/armada/common/aarch64/marvell_helpers.S
+@@ -63,8 +63,8 @@ endfunc plat_marvell_calc_core_pos
+ 	 * ---------------------------------------------
+ 	 */
+ func plat_crash_console_init
+-	mov_imm	x0, PLAT_MARVELL_CRASH_UART_BASE
+-	mov_imm	x1, PLAT_MARVELL_CRASH_UART_CLK_IN_HZ
++	mov_imm	x0, PLAT_MARVELL_UART_BASE
++	mov_imm	x1, PLAT_MARVELL_UART_CLK_IN_HZ
+ 	mov_imm	x2, MARVELL_CONSOLE_BAUDRATE
+ #ifdef PLAT_a3700
+ 	b	console_a3700_core_init
+@@ -81,7 +81,7 @@ endfunc plat_crash_console_init
+ 	 * ---------------------------------------------
+ 	 */
+ func plat_crash_console_putc
+-	mov_imm	x1, PLAT_MARVELL_CRASH_UART_BASE
++	mov_imm	x1, PLAT_MARVELL_UART_BASE
+ #ifdef PLAT_a3700
+ 
+ 	b	console_a3700_core_putc
+@@ -99,7 +99,7 @@ endfunc plat_crash_console_putc
+ 	 * ---------------------------------------------
+ 	 */
+ func plat_crash_console_flush
+-	mov_imm	x0, PLAT_MARVELL_CRASH_UART_BASE
++	mov_imm	x0, PLAT_MARVELL_UART_BASE
+ #ifdef PLAT_a3700
+ 	b	console_a3700_core_flush
+ #else
+--- a/plat/marvell/armada/common/marvell_console.c
++++ b/plat/marvell/armada/common/marvell_console.c
+@@ -31,8 +31,8 @@ static console_t marvell_runtime_console
+ void marvell_console_boot_init(void)
+ {
+ 	int rc =
+-	console_marvell_register(PLAT_MARVELL_BOOT_UART_BASE,
+-				 PLAT_MARVELL_BOOT_UART_CLK_IN_HZ,
++	console_marvell_register(PLAT_MARVELL_UART_BASE,
++				 PLAT_MARVELL_UART_CLK_IN_HZ,
+ 				 MARVELL_CONSOLE_BAUDRATE,
+ 				 &marvell_boot_console);
+ 	if (rc == 0) {
+@@ -58,8 +58,8 @@ void marvell_console_boot_end(void)
+ void marvell_console_runtime_init(void)
+ {
+ 	int rc =
+-	console_marvell_register(PLAT_MARVELL_BOOT_UART_BASE,
+-				 PLAT_MARVELL_BOOT_UART_CLK_IN_HZ,
++	console_marvell_register(PLAT_MARVELL_UART_BASE,
++				 PLAT_MARVELL_UART_CLK_IN_HZ,
+ 				 MARVELL_CONSOLE_BAUDRATE,
+ 				 &marvell_runtime_console);
+ 	if (rc == 0)
diff --git a/package/boot/arm-trusted-firmware-mvebu/patches/103-fix-plat-marvell-a3720-uart-fix-UART-parent-clock-ra.patch b/package/boot/arm-trusted-firmware-mvebu/patches/103-fix-plat-marvell-a3720-uart-fix-UART-parent-clock-ra.patch
new file mode 100644
index 0000000000..ab958a097a
--- /dev/null
+++ b/package/boot/arm-trusted-firmware-mvebu/patches/103-fix-plat-marvell-a3720-uart-fix-UART-parent-clock-ra.patch
@@ -0,0 +1,177 @@
+From 5a91c439cbeb1f64b8b9830de91efad5113d3c89 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali at kernel.org>
+Date: Fri, 14 May 2021 15:52:11 +0200
+Subject: [PATCH] fix(plat/marvell/a3720/uart): fix UART parent clock rate
+ determination
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The UART code for the A3K platform assumes that UART parent clock rate
+is always 25 MHz. This is incorrect, because the xtal clock can also run
+at 40 MHz (this is board specific).
+
+The frequency of the xtal clock is determined by a value on a strapping
+pin during SOC reset. The code to determine this frequency is already in
+A3K's comphy driver.
+
+Move the get_ref_clk() function from the comphy driver to a separate
+file and use it for UART parent clock rate determination.
+
+Signed-off-by: Pali Roh?r <pali at kernel.org>
+Change-Id: I8bb18a2d020ef18fe65aa06ffa4ab205c71be92e
+---
+ drivers/marvell/comphy/phy-comphy-3700.c      | 24 +------------
+ .../marvell/armada/a3k/common/plat_marvell.h  |  2 ++
+ .../marvell/armada/a3k/common/a3700_common.mk |  1 +
+ .../armada/a3k/common/aarch64/a3700_clock.S   | 35 +++++++++++++++++++
+ .../armada/a3k/common/include/platform_def.h  |  1 -
+ .../armada/common/aarch64/marvell_helpers.S   | 10 +++++-
+ plat/marvell/armada/common/marvell_console.c  |  1 +
+ 7 files changed, 49 insertions(+), 25 deletions(-)
+ create mode 100644 plat/marvell/armada/a3k/common/aarch64/a3700_clock.S
+
+--- a/drivers/marvell/comphy/phy-comphy-3700.c
++++ b/drivers/marvell/comphy/phy-comphy-3700.c
+@@ -14,6 +14,7 @@
+ 
+ #include <mvebu.h>
+ #include <mvebu_def.h>
++#include <plat_marvell.h>
+ 
+ #include "phy-comphy-3700.h"
+ #include "phy-comphy-common.h"
+@@ -29,15 +30,6 @@
+ #define USB3_GBE1_PHY		(MVEBU_REGS_BASE + 0x5C000)
+ #define COMPHY_SD_ADDR		(MVEBU_REGS_BASE + 0x1F000)
+ 
+-/*
+- * Below address in used only for reading, therefore no problem with concurrent
+- * Linux access.
+- */
+-#define MVEBU_TEST_PIN_LATCH_N (MVEBU_NB_GPIO_REG_BASE + 0x8)
+- #define MVEBU_XTAL_MODE_MASK		BIT(9)
+- #define MVEBU_XTAL_MODE_OFFS		9
+- #define MVEBU_XTAL_CLOCK_25MHZ		0x0
+-
+ struct sgmii_phy_init_data_fix {
+ 	uint16_t addr;
+ 	uint16_t value;
+@@ -125,20 +117,6 @@ static uint16_t sgmii_phy_init[512] = {
+ 	0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000	/*1F8 */
+ };
+ 
+-/* returns reference clock in MHz (25 or 40) */
+-static uint32_t get_ref_clk(void)
+-{
+-	uint32_t val;
+-
+-	val = (mmio_read_32(MVEBU_TEST_PIN_LATCH_N) & MVEBU_XTAL_MODE_MASK) >>
+-		MVEBU_XTAL_MODE_OFFS;
+-
+-	if (val == MVEBU_XTAL_CLOCK_25MHZ)
+-		return 25;
+-	else
+-		return 40;
+-}
+-
+ /* PHY selector configures with corresponding modes */
+ static void mvebu_a3700_comphy_set_phy_selector(uint8_t comphy_index,
+ 						uint32_t comphy_mode)
+--- a/include/plat/marvell/armada/a3k/common/plat_marvell.h
++++ b/include/plat/marvell/armada/a3k/common/plat_marvell.h
+@@ -100,4 +100,6 @@ void plat_marvell_interconnect_enter_coh
+ 
+ const mmap_region_t *plat_marvell_get_mmap(void);
+ 
++uint32_t get_ref_clk(void);
++
+ #endif /* PLAT_MARVELL_H */
+--- a/plat/marvell/armada/a3k/common/a3700_common.mk
++++ b/plat/marvell/armada/a3k/common/a3700_common.mk
+@@ -38,6 +38,7 @@ PLAT_INCLUDES		:=	-I$(PLAT_FAMILY_BASE)/
+ 				-I$/drivers/arm/gic/common/
+ 
+ PLAT_BL_COMMON_SOURCES	:=	$(PLAT_COMMON_BASE)/aarch64/a3700_common.c \
++				$(PLAT_COMMON_BASE)/aarch64/a3700_clock.S \
+ 				$(MARVELL_DRV_BASE)/uart/a3700_console.S
+ 
+ BL1_SOURCES		+=	$(PLAT_COMMON_BASE)/aarch64/plat_helpers.S \
+--- /dev/null
++++ b/plat/marvell/armada/a3k/common/aarch64/a3700_clock.S
+@@ -0,0 +1,35 @@
++/*
++ * Copyright (C) 2018 Marvell International Ltd.
++ *
++ * SPDX-License-Identifier:	BSD-3-Clause
++ * https://spdx.org/licenses
++ */
++
++#include <asm_macros.S>
++#include <platform_def.h>
++
++/*
++ * Below address in used only for reading, therefore no problem with concurrent
++ * Linux access.
++ */
++#define MVEBU_TEST_PIN_LATCH_N (MVEBU_NB_GPIO_REG_BASE + 0x8)
++ #define MVEBU_XTAL_MODE_MASK		BIT(9)
++
++	/* -----------------------------------------------------
++	 * uint32_t get_ref_clk (void);
++	 *
++	 * returns reference clock in MHz (25 or 40)
++	 * -----------------------------------------------------
++	 */
++.globl	get_ref_clk
++func get_ref_clk
++	mov_imm	x0, MVEBU_TEST_PIN_LATCH_N
++	ldr	w0, [x0]
++	tst	w0, #MVEBU_XTAL_MODE_MASK
++	bne	40
++	mov	w0, #25
++	ret
++40:
++	mov	w0, #40
++	ret
++endfunc get_ref_clk
+--- a/plat/marvell/armada/a3k/common/include/platform_def.h
++++ b/plat/marvell/armada/a3k/common/include/platform_def.h
+@@ -164,7 +164,6 @@
+  * PL011 related constants
+  */
+ #define PLAT_MARVELL_UART_BASE			(MVEBU_REGS_BASE + 0x12000)
+-#define PLAT_MARVELL_UART_CLK_IN_HZ		25000000
+ 
+ #define PLAT_MARVELL_BL31_RUN_UART_BASE		PLAT_MARVELL_BOOT_UART_BASE
+ #define PLAT_MARVELL_BL31_RUN_UART_CLK_IN_HZ	PLAT_MARVELL_BOOT_UART_CLK_IN_HZ
+--- a/plat/marvell/armada/common/aarch64/marvell_helpers.S
++++ b/plat/marvell/armada/common/aarch64/marvell_helpers.S
+@@ -63,8 +63,16 @@ endfunc plat_marvell_calc_core_pos
+ 	 * ---------------------------------------------
+ 	 */
+ func plat_crash_console_init
+-	mov_imm	x0, PLAT_MARVELL_UART_BASE
++#ifdef PLAT_a3700
++	mov	x1, x30
++	bl	get_ref_clk
++	mov	x30, x1
++	mov_imm	x1, 1000000
++	mul	x1, x0, x1
++#else
+ 	mov_imm	x1, PLAT_MARVELL_UART_CLK_IN_HZ
++#endif
++	mov_imm	x0, PLAT_MARVELL_UART_BASE
+ 	mov_imm	x2, MARVELL_CONSOLE_BAUDRATE
+ #ifdef PLAT_a3700
+ 	b	console_a3700_core_init
+--- a/plat/marvell/armada/common/marvell_console.c
++++ b/plat/marvell/armada/common/marvell_console.c
+@@ -14,6 +14,7 @@
+ 
+ #ifdef PLAT_a3700
+ #include <drivers/marvell/uart/a3700_console.h>
++#define PLAT_MARVELL_UART_CLK_IN_HZ (get_ref_clk() * 1000000)
+ #define console_marvell_register console_a3700_register
+ #else
+ #include <drivers/ti/uart/uart_16550.h>


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:59 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:59 -0400
Subject: [openwrt/openwrt] arm-trusted-firmware-mvebu: remove unpacked
 sources upon clean
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9945.1627215753.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/0c111ce237075c520684542f07f3cfe41f9c94a5

commit 0c111ce237075c520684542f07f3cfe41f9c94a5
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Tue Jun 8 04:19:16 2021 +0200

    arm-trusted-firmware-mvebu: remove unpacked sources upon clean
    
    These are all unpacked in the Build/Prepare step, clean up accordingly.
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 package/boot/arm-trusted-firmware-mvebu/Makefile | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile
index c4669edb52..6fc5e44e1c 100644
--- a/package/boot/arm-trusted-firmware-mvebu/Makefile
+++ b/package/boot/arm-trusted-firmware-mvebu/Makefile
@@ -155,6 +155,13 @@ define Download/gcc-linaro
   HASH:=2d4a92d6c8b384ae404b2e02c1c412e3ec18f9b714135acf046b2b1b510e9ace
 endef
 
+define Build/Clean
+	rm -rf \
+		$(STAGING_DIR_IMAGE)/$(A3700_UTILS_NAME) \
+		$(STAGING_DIR_IMAGE)/$(MV_DDR_NAME) \
+		$(STAGING_DIR_IMAGE)/$(LINARO_NAME)-$(LINARO_RELEASE).$(LINARO_VERSION)
+endef
+
 define Build/Prepare
 	# Download sources
 	$(eval $(call Download,a3700-utils))


From lede-commits at lists.infradead.org  Sun Jul 25 04:58:56 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:58:56 -0400
Subject: [openwrt/openwrt] mvebu: limit mvneta tx queue workaround to 32 bit
 SoC
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9946.1627215764.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/cbdd2b62e4d5e0572204c37d874d32dc8610840e

commit cbdd2b62e4d5e0572204c37d874d32dc8610840e
Author: Tomasz Maciej Nowak <tmn505 at gmail.com>
AuthorDate: Mon Jul 12 18:16:30 2021 +0200

    mvebu: limit mvneta tx queue workaround to 32 bit SoC
    
    This patch has been carried since introduction throughout every kernel
    major bump and no one has tested if the later kernels improved the
    situation. The Armada 3720 SoC can only process GbE interrupts on Core 0
    and this is already limited in all stable kernels, so ditch this
    workaround for 64 bit SoCs.
    
    Ref: https://git.kernel.org/torvalds/c/cf9bf871280d
    
    Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
---
 .../linux/mvebu/patches-5.10/700-mvneta-tx-queue-workaround.patch | 8 ++++++--
 .../linux/mvebu/patches-5.4/700-mvneta-tx-queue-workaround.patch  | 8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/target/linux/mvebu/patches-5.10/700-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-5.10/700-mvneta-tx-queue-workaround.patch
index da4705d90d..a0f15681f5 100644
--- a/target/linux/mvebu/patches-5.10/700-mvneta-tx-queue-workaround.patch
+++ b/target/linux/mvebu/patches-5.10/700-mvneta-tx-queue-workaround.patch
@@ -9,10 +9,11 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 ---
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -4903,6 +4903,14 @@ static int mvneta_ethtool_set_eee(struct
+@@ -4903,6 +4903,16 @@ static int mvneta_ethtool_set_eee(struct
  	return phylink_ethtool_set_eee(pp->phylink, eee);
  }
  
++#ifndef CONFIG_ARM64
 +static u16 mvneta_select_queue(struct net_device *dev, struct sk_buff *skb,
 +			       struct net_device *sb_dev)
 +{
@@ -20,15 +21,18 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +	 * use only one queue until it is fixed */
 +	return 0;
 +}
++#endif
 +
  static const struct net_device_ops mvneta_netdev_ops = {
  	.ndo_open            = mvneta_open,
  	.ndo_stop            = mvneta_stop,
-@@ -4913,6 +4921,7 @@ static const struct net_device_ops mvnet
+@@ -4913,6 +4923,9 @@ static const struct net_device_ops mvnet
  	.ndo_fix_features    = mvneta_fix_features,
  	.ndo_get_stats64     = mvneta_get_stats64,
  	.ndo_do_ioctl        = mvneta_ioctl,
++#ifndef CONFIG_ARM64
 +	.ndo_select_queue    = mvneta_select_queue,
++#endif
  	.ndo_bpf	     = mvneta_xdp,
  	.ndo_xdp_xmit        = mvneta_xdp_xmit,
  };
diff --git a/target/linux/mvebu/patches-5.4/700-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-5.4/700-mvneta-tx-queue-workaround.patch
index a83d891ff8..201864eef1 100644
--- a/target/linux/mvebu/patches-5.4/700-mvneta-tx-queue-workaround.patch
+++ b/target/linux/mvebu/patches-5.4/700-mvneta-tx-queue-workaround.patch
@@ -9,10 +9,11 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 ---
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -4691,6 +4691,14 @@ static int mvneta_ethtool_set_eee(struct
+@@ -4691,6 +4691,16 @@ static int mvneta_ethtool_set_eee(struct
  	return phylink_ethtool_set_eee(pp->phylink, eee);
  }
  
++#ifndef CONFIG_ARM64
 +static u16 mvneta_select_queue(struct net_device *dev, struct sk_buff *skb,
 +			       struct net_device *sb_dev)
 +{
@@ -20,15 +21,18 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +	 * use only one queue until it is fixed */
 +	return 0;
 +}
++#endif
 +
  static const struct net_device_ops mvneta_netdev_ops = {
  	.ndo_open            = mvneta_open,
  	.ndo_stop            = mvneta_stop,
-@@ -4701,6 +4709,7 @@ static const struct net_device_ops mvnet
+@@ -4701,6 +4711,9 @@ static const struct net_device_ops mvnet
  	.ndo_fix_features    = mvneta_fix_features,
  	.ndo_get_stats64     = mvneta_get_stats64,
  	.ndo_do_ioctl        = mvneta_ioctl,
++#ifndef CONFIG_ARM64
 +	.ndo_select_queue    = mvneta_select_queue,
++#endif
  	.ndo_bpf             = mvneta_xdp,
  	.ndo_xdp_xmit        = mvneta_xdp_xmit,
  };


From lede-commits at lists.infradead.org  Sun Jul 25 04:59:02 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 07:59:02 -0400
Subject: [openwrt/openwrt] arm-trusted-firmware-mvebu: update mv-ddr-marvell
 to current master
In-Reply-To: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
References: <162721432140.923.3693323917005116060@git-01.infra.openwrt.org>
Message-ID: <mailman.9947.1627215791.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/c552bbe00da4fc85d93a68b7aef7ecce9bbb8a2a

commit c552bbe00da4fc85d93a68b7aef7ecce9bbb8a2a
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Tue Jun 8 04:20:54 2021 +0200

    arm-trusted-firmware-mvebu: update mv-ddr-marvell to current master
    
    02e23db fix compilation errors popped up by GCC-10
    7c35173 Merge pull request #29 from pali/sync-a38x-uboot
    bb734f5 mv_ddr: a38x: Use SOC_REGS_PHY_BASE for INTER_REGS_BASE
    ee1ea84 mv_ddr: a38x: Fix ddr3 compilation
    70f3e2e mv_ddr: Fix comment typo
    dd960b4 mv_ddr: ddr3: Allow boards to specify CK_DELAY parameter
    a87f4f7 mv_ddr: ddr3: only use active chip-selects when tuning ODT
    3defcec mv_ddr: a38x: Add support for setting timing in hws_topology_map
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 package/boot/arm-trusted-firmware-mvebu/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile
index bd03a6a32e..1592e37f6d 100644
--- a/package/boot/arm-trusted-firmware-mvebu/Makefile
+++ b/package/boot/arm-trusted-firmware-mvebu/Makefile
@@ -135,15 +135,15 @@ define Download/a3700-utils
 endef
 
 MV_DDR_NAME:=mv-ddr-marvell
-MV_DDR_RELEASE:=6fb99002
+MV_DDR_RELEASE:=02e23dbc
 MV_DDR_SOURCE:=$(MV_DDR_NAME)-$(MV_DDR_RELEASE).tar.bz2
 
 define Download/mv-ddr-marvell
   FILE:=$(MV_DDR_SOURCE)
   PROTO:=git
   URL:=https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell.git
-  VERSION:=6fb99002be5dec9c7f5375b074f53148dbc0739c
-  MIRROR_HASH:=6836e5ea47618a7ee2f96a1a6bd8218f003789b877e521fdfcb008f2f6475dd6
+  VERSION:=02e23dbcf8dd22e038986052d99319a0eba8f25f
+  MIRROR_HASH:=d87dcc288b3895d1a1a78908fc607976d500b317ef81edfe667035579df0b440
   SUBDIR:=$(MV_DDR_NAME)
 endef
 


From lede-commits at lists.infradead.org  Sun Jul 25 05:53:51 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 08:53:51 -0400
Subject: [openwrt/openwrt]  procd: update to git HEAD
In-Reply-To: <162721763127.8923.6801938817260277381@git-01.infra.openwrt.org>
References: <162721763127.8923.6801938817260277381@git-01.infra.openwrt.org>
Message-ID: <mailman.9950.1627217635.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e11be055f137c4a3eb0bcb113a8e36a1c619dbb3

commit e11be055f137c4a3eb0bcb113a8e36a1c619dbb3
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Jul 25 14:51:22 2021 +0200

    procd: update to git HEAD
    
     f26233e watchdog: Add an info message if the watchdog reset the system
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/system/procd/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 7d2c0a4170..a7a3731f56 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -13,8 +13,8 @@ PKG_RELEASE:=$(AUTORELEASE)
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
 PKG_SOURCE_DATE:=2021-07-25
-PKG_SOURCE_VERSION:=3a9d9102aa29cd3522a457d6e961454dabdee7cc
-PKG_MIRROR_HASH:=bda7f10b7acfea3eba1d719edc038df30c783d813bca8440a578aa2438683d6f
+PKG_SOURCE_VERSION:=f26233edb6a550bf23d51d5d4c864baf093e46e1
+PKG_MIRROR_HASH:=6160291a1b94cf89e4e438440ef393119f88c6182937d557a9e2864e765322a6
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Sun Jul 25 07:13:45 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 25 Jul 2021 10:13:45 -0400
Subject: [openwrt/openwrt]  mediatek: Fix Fidelix-FM35X1GA patch
In-Reply-To: <162722242513.31251.2247958997520465284@git-01.infra.openwrt.org>
References: <162722242513.31251.2247958997520465284@git-01.infra.openwrt.org>
Message-ID: <mailman.9951.1627222433.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/8c2509dc5ff72ca47bd0787da407f5adc051a2b9

commit 8c2509dc5ff72ca47bd0787da407f5adc051a2b9
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Jul 25 16:11:29 2021 +0200

    mediatek: Fix Fidelix-FM35X1GA patch
    
    This patch did not apply cleanly any more after support for the XTX
    flash was added to the generic patches.
    
    Fixes: 92012dd8677a ("kernel: Add support for XTX XT26G02A SPI NAND")
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/mediatek/patches-5.10/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch b/target/linux/mediatek/patches-5.10/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch
index 69a9297e1f..3af929e5f0 100644
--- a/target/linux/mediatek/patches-5.10/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch
+++ b/target/linux/mediatek/patches-5.10/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch
@@ -18,8 +18,8 @@ Signed-off-by: Davide Fioravanti <pantanastyle at gmail.com>
 +++ b/drivers/mtd/nand/spi/Makefile
 @@ -1,3 +1,3 @@
  # SPDX-License-Identifier: GPL-2.0
--spinand-objs := core.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o
-+spinand-objs := core.o fidelix.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o
+-spinand-objs := core.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o xtx.o
++spinand-objs := core.o fidelix.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o xtx.o
  obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
 --- a/drivers/mtd/nand/spi/core.c
 +++ b/drivers/mtd/nand/spi/core.c


From lede-commits at lists.infradead.org  Mon Jul 26 11:43:38 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 26 Jul 2021 14:43:38 -0400
Subject: [openwrt/openwrt]  netifd: update to the latest version
In-Reply-To: <162732501809.31083.18294697446782220690@git-01.infra.openwrt.org>
References: <162732501809.31083.18294697446782220690@git-01.infra.openwrt.org>
Message-ID: <mailman.10216.1627325024.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/39f81b0bf687017b4d086255c94166e662ac177e

commit 39f81b0bf687017b4d086255c94166e662ac177e
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Jul 26 20:42:48 2021 +0200

    netifd: update to the latest version
    
    440eb0647708 bridge: fix regression in bringing up bridge ports
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 0b08f33e12..d835973624 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2021-07-23
-PKG_SOURCE_VERSION:=17e453bd68b41780b6564dafa8358efc29a00930
-PKG_MIRROR_HASH:=06b6e10a71e3002fa03579846b97af29be9503d61486486c639dbfae423b398f
+PKG_SOURCE_DATE:=2021-07-26
+PKG_SOURCE_VERSION:=440eb0647708274cc8d7d9e7c2bb0cfdfba90023
+PKG_MIRROR_HASH:=eed957036ab608fdc49bdf801fc5b4405fcd2a3a5e5d3343ec39898e156c10e9
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Mon Jul 26 11:44:22 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 26 Jul 2021 14:44:22 -0400
Subject: [openwrt/openwrt]  netifd: update to the latest version
In-Reply-To: <162732506287.31661.138988805524684734@git-01.infra.openwrt.org>
References: <162732506287.31661.138988805524684734@git-01.infra.openwrt.org>
Message-ID: <mailman.10219.1627325067.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/55d9c020a1d7bcf1f7dceebfc9417de1eb448d41

commit 55d9c020a1d7bcf1f7dceebfc9417de1eb448d41
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Jul 26 20:42:48 2021 +0200

    netifd: update to the latest version
    
    440eb0647708 bridge: fix regression in bringing up bridge ports
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry-picked from commit 39f81b0bf687017b4d086255c94166e662ac177e)
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 35035519f9..4b5f110da2 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2021-07-23
-PKG_SOURCE_VERSION:=17e453bd68b41780b6564dafa8358efc29a00930
-PKG_MIRROR_HASH:=06b6e10a71e3002fa03579846b97af29be9503d61486486c639dbfae423b398f
+PKG_SOURCE_DATE:=2021-07-26
+PKG_SOURCE_VERSION:=440eb0647708274cc8d7d9e7c2bb0cfdfba90023
+PKG_MIRROR_HASH:=eed957036ab608fdc49bdf801fc5b4405fcd2a3a5e5d3343ec39898e156c10e9
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Tue Jul 27 20:55:31 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 27 Jul 2021 23:55:31 -0400
Subject: [openwrt/openwrt]  hostapd: make proxyarp work with libnl-tiny
In-Reply-To: <162744452981.32585.17434983183155587547@git-01.infra.openwrt.org>
References: <162744452981.32585.17434983183155587547@git-01.infra.openwrt.org>
Message-ID: <mailman.10592.1627444536.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/ae1c5d0d6af60d0467899f5730a2f01aa72137f7

commit ae1c5d0d6af60d0467899f5730a2f01aa72137f7
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 28 05:54:29 2021 +0200

    hostapd: make proxyarp work with libnl-tiny
    
    Remove a dependency on libnl3-route
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...211-rewrite-neigh-code-to-not-depend-on-l.patch | 275 +++++++++++++++++++++
 1 file changed, 275 insertions(+)

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
new file mode 100644
index 0000000000..e8a78e355e
--- /dev/null
+++ b/package/network/services/hostapd/patches/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
@@ -0,0 +1,275 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 28 Jul 2021 05:49:46 +0200
+Subject: [PATCH] driver_nl80211: rewrite neigh code to not depend on
+ libnl3-route
+
+Removes an unnecessary dependency and also makes the code smaller
+
+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>
+ #include <netlink/genl/genl.h>
+ #include <netlink/genl/ctrl.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>
+@@ -5284,26 +5281,29 @@ fail:
+ 
+ static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
+ {
+-#ifdef CONFIG_LIBNL3_ROUTE
+ 	struct wpa_driver_nl80211_data *drv = bss->drv;
+-	struct rtnl_neigh *rn;
+-	struct nl_addr *nl_addr;
++	struct ndmsg nhdr = {
++		.ndm_state = NUD_PERMANENT,
++		.ndm_ifindex = bss->ifindex,
++		.ndm_family = AF_BRIDGE,
++	};
++	struct nl_msg *msg;
+ 	int err;
+ 
+-	rn = rtnl_neigh_alloc();
+-	if (!rn)
++	msg = nlmsg_alloc_simple(RTM_DELNEIGH, NLM_F_CREATE);
++	if (!msg)
+ 		return;
+ 
+-	rtnl_neigh_set_family(rn, AF_BRIDGE);
+-	rtnl_neigh_set_ifindex(rn, bss->ifindex);
+-	nl_addr = nl_addr_build(AF_BRIDGE, (void *) addr, ETH_ALEN);
+-	if (!nl_addr) {
+-		rtnl_neigh_put(rn);
+-		return;
+-	}
+-	rtnl_neigh_set_lladdr(rn, nl_addr);
++	if (nlmsg_append(msg, &nhdr, sizeof(nhdr), NLMSG_ALIGNTO) < 0)
++		goto errout;
++
++	if (nla_put(msg, NDA_LLADDR, ETH_ALEN, (void *)addr))
++		goto errout;
++
++	if (nl_send_auto_complete(drv->rtnl_sk, msg) < 0)
++		goto errout;
+ 
+-	err = rtnl_neigh_delete(drv->rtnl_sk, rn, 0);
++	err = nl_wait_for_ack(drv->rtnl_sk);
+ 	if (err < 0) {
+ 		wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for "
+ 			   MACSTR " ifindex=%d failed: %s", MAC2STR(addr),
+@@ -5313,9 +5313,8 @@ static void rtnl_neigh_delete_fdb_entry(
+ 			   MACSTR, MAC2STR(addr));
+ 	}
+ 
+-	nl_addr_put(nl_addr);
+-	rtnl_neigh_put(rn);
+-#endif /* CONFIG_LIBNL3_ROUTE */
++errout:
++	nlmsg_free(msg);
+ }
+ 
+ 
+@@ -7691,7 +7690,6 @@ static void *i802_init(struct hostapd_da
+ 	    (params->num_bridge == 0 || !params->bridge[0]))
+ 		add_ifidx(drv, br_ifindex, drv->ifindex);
+ 
+-#ifdef CONFIG_LIBNL3_ROUTE
+ 	if (bss->added_if_into_bridge || bss->already_in_bridge) {
+ 		int err;
+ 
+@@ -7708,7 +7706,6 @@ static void *i802_init(struct hostapd_da
+ 			goto failed;
+ 		}
+ 	}
+-#endif /* CONFIG_LIBNL3_ROUTE */
+ 
+ 	if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
+ 		wpa_printf(MSG_DEBUG,
+@@ -10655,13 +10652,14 @@ static int wpa_driver_br_add_ip_neigh(vo
+ 				      const u8 *ipaddr, int prefixlen,
+ 				      const u8 *addr)
+ {
+-#ifdef CONFIG_LIBNL3_ROUTE
+ 	struct i802_bss *bss = priv;
+ 	struct wpa_driver_nl80211_data *drv = bss->drv;
+-	struct rtnl_neigh *rn;
+-	struct nl_addr *nl_ipaddr = NULL;
+-	struct nl_addr *nl_lladdr = NULL;
+-	int family, addrsize;
++	struct ndmsg nhdr = {
++		.ndm_state = NUD_PERMANENT,
++		.ndm_ifindex = bss->br_ifindex,
++	};
++	struct nl_msg *msg;
++	int addrsize;
+ 	int res;
+ 
+ 	if (!ipaddr || prefixlen == 0 || !addr)
+@@ -10680,85 +10678,66 @@ static int wpa_driver_br_add_ip_neigh(vo
+ 	}
+ 
+ 	if (version == 4) {
+-		family = AF_INET;
++		nhdr.ndm_family = AF_INET;
+ 		addrsize = 4;
+ 	} else if (version == 6) {
+-		family = AF_INET6;
++		nhdr.ndm_family = AF_INET6;
+ 		addrsize = 16;
+ 	} else {
+ 		return -EINVAL;
+ 	}
+ 
+-	rn = rtnl_neigh_alloc();
+-	if (rn == NULL)
++	msg = nlmsg_alloc_simple(RTM_NEWNEIGH, NLM_F_CREATE);
++	if (!msg)
+ 		return -ENOMEM;
+ 
+-	/* set the destination ip address for neigh */
+-	nl_ipaddr = nl_addr_build(family, (void *) ipaddr, addrsize);
+-	if (nl_ipaddr == NULL) {
+-		wpa_printf(MSG_DEBUG, "nl80211: nl_ipaddr build failed");
+-		res = -ENOMEM;
++	res = -ENOMEM;
++	if (nlmsg_append(msg, &nhdr, sizeof(nhdr), NLMSG_ALIGNTO) < 0)
+ 		goto errout;
+-	}
+-	nl_addr_set_prefixlen(nl_ipaddr, prefixlen);
+-	res = rtnl_neigh_set_dst(rn, nl_ipaddr);
+-	if (res) {
+-		wpa_printf(MSG_DEBUG,
+-			   "nl80211: neigh set destination addr failed");
++
++	if (nla_put(msg, NDA_DST, addrsize, (void *)ipaddr))
+ 		goto errout;
+-	}
+ 
+-	/* set the corresponding lladdr for neigh */
+-	nl_lladdr = nl_addr_build(AF_BRIDGE, (u8 *) addr, ETH_ALEN);
+-	if (nl_lladdr == NULL) {
+-		wpa_printf(MSG_DEBUG, "nl80211: neigh set lladdr failed");
+-		res = -ENOMEM;
++	if (nla_put(msg, NDA_LLADDR, ETH_ALEN, (void *)addr))
+ 		goto errout;
+-	}
+-	rtnl_neigh_set_lladdr(rn, nl_lladdr);
+ 
+-	rtnl_neigh_set_ifindex(rn, bss->br_ifindex);
+-	rtnl_neigh_set_state(rn, NUD_PERMANENT);
++	res = nl_send_auto_complete(drv->rtnl_sk, msg);
++	if (res < 0)
++		goto errout;
+ 
+-	res = rtnl_neigh_add(drv->rtnl_sk, rn, NLM_F_CREATE);
++	res = nl_wait_for_ack(drv->rtnl_sk);
+ 	if (res) {
+ 		wpa_printf(MSG_DEBUG,
+ 			   "nl80211: Adding bridge ip neigh failed: %s",
+ 			   nl_geterror(res));
+ 	}
+ errout:
+-	if (nl_lladdr)
+-		nl_addr_put(nl_lladdr);
+-	if (nl_ipaddr)
+-		nl_addr_put(nl_ipaddr);
+-	if (rn)
+-		rtnl_neigh_put(rn);
++	nlmsg_free(msg);
+ 	return res;
+-#else /* CONFIG_LIBNL3_ROUTE */
+-	return -1;
+-#endif /* CONFIG_LIBNL3_ROUTE */
+ }
+ 
+ 
+ static int wpa_driver_br_delete_ip_neigh(void *priv, u8 version,
+ 					 const u8 *ipaddr)
+ {
+-#ifdef CONFIG_LIBNL3_ROUTE
+ 	struct i802_bss *bss = priv;
+ 	struct wpa_driver_nl80211_data *drv = bss->drv;
+-	struct rtnl_neigh *rn;
+-	struct nl_addr *nl_ipaddr;
+-	int family, addrsize;
++	struct ndmsg nhdr = {
++		.ndm_state = NUD_PERMANENT,
++		.ndm_ifindex = bss->br_ifindex,
++	};
++	struct nl_msg *msg;
++	int addrsize;
+ 	int res;
+ 
+ 	if (!ipaddr)
+ 		return -EINVAL;
+ 
+ 	if (version == 4) {
+-		family = AF_INET;
++		nhdr.ndm_family = AF_INET;
+ 		addrsize = 4;
+ 	} else if (version == 6) {
+-		family = AF_INET6;
++		nhdr.ndm_family = AF_INET6;
+ 		addrsize = 16;
+ 	} else {
+ 		return -EINVAL;
+@@ -10776,41 +10755,30 @@ static int wpa_driver_br_delete_ip_neigh
+ 		return -1;
+ 	}
+ 
+-	rn = rtnl_neigh_alloc();
+-	if (rn == NULL)
++	msg = nlmsg_alloc_simple(RTM_DELNEIGH, NLM_F_CREATE);
++	if (!msg)
+ 		return -ENOMEM;
+ 
+-	/* set the destination ip address for neigh */
+-	nl_ipaddr = nl_addr_build(family, (void *) ipaddr, addrsize);
+-	if (nl_ipaddr == NULL) {
+-		wpa_printf(MSG_DEBUG, "nl80211: nl_ipaddr build failed");
+-		res = -ENOMEM;
++	res = -ENOMEM;
++	if (nlmsg_append(msg, &nhdr, sizeof(nhdr), NLMSG_ALIGNTO) < 0)
+ 		goto errout;
+-	}
+-	res = rtnl_neigh_set_dst(rn, nl_ipaddr);
+-	if (res) {
+-		wpa_printf(MSG_DEBUG,
+-			   "nl80211: neigh set destination addr failed");
++
++	if (nla_put(msg, NDA_DST, addrsize, (void *)ipaddr))
+ 		goto errout;
+-	}
+ 
+-	rtnl_neigh_set_ifindex(rn, bss->br_ifindex);
++	res = nl_send_auto_complete(drv->rtnl_sk, msg);
++	if (res < 0)
++		goto errout;
+ 
+-	res = rtnl_neigh_delete(drv->rtnl_sk, rn, 0);
++	res = nl_wait_for_ack(drv->rtnl_sk);
+ 	if (res) {
+ 		wpa_printf(MSG_DEBUG,
+ 			   "nl80211: Deleting bridge ip neigh failed: %s",
+ 			   nl_geterror(res));
+ 	}
+ errout:
+-	if (nl_ipaddr)
+-		nl_addr_put(nl_ipaddr);
+-	if (rn)
+-		rtnl_neigh_put(rn);
++	nlmsg_free(msg);
+ 	return res;
+-#else /* CONFIG_LIBNL3_ROUTE */
+-	return -1;
+-#endif /* CONFIG_LIBNL3_ROUTE */
+ }
+ 
+ 


From lede-commits at lists.infradead.org  Tue Jul 27 20:55:30 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 27 Jul 2021 23:55:30 -0400
Subject: [openwrt/openwrt] hostapd: fix a segfault on sta disconnect with
 proxy arp enabled
In-Reply-To: <162744452981.32585.17434983183155587547@git-01.infra.openwrt.org>
References: <162744452981.32585.17434983183155587547@git-01.infra.openwrt.org>
Message-ID: <mailman.10593.1627444538.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5dd1bd5b80feb2dbaad8bdf93779acad74ed199a

commit 5dd1bd5b80feb2dbaad8bdf93779acad74ed199a
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 28 05:48:38 2021 +0200

    hostapd: fix a segfault on sta disconnect with proxy arp enabled
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...oop-call-dl_list_del-before-freeing-ipv6-add.patch | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/package/network/services/hostapd/patches/023-ndisc_snoop-call-dl_list_del-before-freeing-ipv6-add.patch b/package/network/services/hostapd/patches/023-ndisc_snoop-call-dl_list_del-before-freeing-ipv6-add.patch
new file mode 100644
index 0000000000..9ff9b2398d
--- /dev/null
+++ b/package/network/services/hostapd/patches/023-ndisc_snoop-call-dl_list_del-before-freeing-ipv6-add.patch
@@ -0,0 +1,19 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 28 Jul 2021 05:43:29 +0200
+Subject: [PATCH] ndisc_snoop: call dl_list_del before freeing ipv6 addresses
+
+Fixes a segmentation fault on sta disconnect
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/src/ap/ndisc_snoop.c
++++ b/src/ap/ndisc_snoop.c
+@@ -61,6 +61,7 @@ void sta_ip6addr_del(struct hostapd_data
+ 	dl_list_for_each_safe(ip6addr, prev, &sta->ip6addr, struct ip6addr,
+ 			      list) {
+ 		hostapd_drv_br_delete_ip_neigh(hapd, 6, (u8 *) &ip6addr->addr);
++		dl_list_del(&ip6addr->list);
+ 		os_free(ip6addr);
+ 	}
+ }


From lede-commits at lists.infradead.org  Tue Jul 27 20:55:29 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 27 Jul 2021 23:55:29 -0400
Subject: [openwrt/openwrt] hostapd: make the snooping interface (for
 proxyarp) configurable
In-Reply-To: <162744452981.32585.17434983183155587547@git-01.infra.openwrt.org>
References: <162744452981.32585.17434983183155587547@git-01.infra.openwrt.org>
Message-ID: <mailman.10594.1627444541.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/7b46377a0cd9d809a3c340358121de77f005d4cc

commit 7b46377a0cd9d809a3c340358121de77f005d4cc
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Jul 27 20:28:58 2021 +0200

    hostapd: make the snooping interface (for proxyarp) configurable
    
    Use the VLAN interface instead of the bridge, to ensure that hostapd receives
    untagged DHCP packets
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/hostapd/files/hostapd.sh  |  1 +
 .../services/hostapd/patches/740-snoop_iface.patch | 34 ++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh
index 7d035a299b..d65565d801 100644
--- a/package/network/services/hostapd/files/hostapd.sh
+++ b/package/network/services/hostapd/files/hostapd.sh
@@ -754,6 +754,7 @@ hostapd_set_bss_options() {
 
 	append bss_conf "ssid=$ssid" "$N"
 	[ -n "$network_bridge" ] && append bss_conf "bridge=$network_bridge" "$N"
+	[ -n "$network_ifname" ] && append bss_conf "snoop_iface=$network_ifname" "$N"
 	[ -n "$iapp_interface" ] && {
 		local ifname
 		network_get_device ifname "$iapp_interface" || ifname="$iapp_interface"
diff --git a/package/network/services/hostapd/patches/740-snoop_iface.patch b/package/network/services/hostapd/patches/740-snoop_iface.patch
new file mode 100644
index 0000000000..ded9d33f79
--- /dev/null
+++ b/package/network/services/hostapd/patches/740-snoop_iface.patch
@@ -0,0 +1,34 @@
+--- a/src/ap/ap_config.h
++++ b/src/ap/ap_config.h
+@@ -278,6 +278,7 @@ struct hostapd_bss_config {
+ 	char iface[IFNAMSIZ + 1];
+ 	char bridge[IFNAMSIZ + 1];
+ 	char ft_iface[IFNAMSIZ + 1];
++	char snoop_iface[IFNAMSIZ + 1];
+ 	char vlan_bridge[IFNAMSIZ + 1];
+ 	char wds_bridge[IFNAMSIZ + 1];
+ 
+--- a/src/ap/x_snoop.c
++++ b/src/ap/x_snoop.c
+@@ -71,6 +71,10 @@ x_snoop_get_l2_packet(struct hostapd_dat
+ {
+ 	struct hostapd_bss_config *conf = hapd->conf;
+ 	struct l2_packet_data *l2;
++	const char *ifname = conf->bridge;
++
++	if (conf->snoop_iface[0])
++		ifname = conf->snoop_iface;
+ 
+ 	l2 = l2_packet_init(conf->bridge, NULL, ETH_P_ALL, handler, hapd, 1);
+ 	if (l2 == NULL) {
+--- a/hostapd/config_file.c
++++ b/hostapd/config_file.c
+@@ -2357,6 +2357,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));
++	} 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) {


From lede-commits at lists.infradead.org  Wed Jul 28 03:41:46 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 28 Jul 2021 06:41:46 -0400
Subject: [openwrt/openwrt] hostapd: add missing chunk for the snoop
 interface fix
In-Reply-To: <162746890659.19152.9527938014943857500@git-01.infra.openwrt.org>
References: <162746890659.19152.9527938014943857500@git-01.infra.openwrt.org>
Message-ID: <mailman.10677.1627468911.1072.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f1b98fa4fa8a86a9daf2a7177235f28cbd7c53ef

commit f1b98fa4fa8a86a9daf2a7177235f28cbd7c53ef
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Jul 28 12:08:47 2021 +0200

    hostapd: add missing chunk for the snoop interface fix
    
    Fixes: 7b46377a0cd9 ("hostapd: make the snooping interface (for proxyarp) configurable")
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../network/services/hostapd/patches/740-snoop_iface.patch    | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/package/network/services/hostapd/patches/740-snoop_iface.patch b/package/network/services/hostapd/patches/740-snoop_iface.patch
index ded9d33f79..722d1e713a 100644
--- a/package/network/services/hostapd/patches/740-snoop_iface.patch
+++ b/package/network/services/hostapd/patches/740-snoop_iface.patch
@@ -10,17 +10,20 @@
  
 --- a/src/ap/x_snoop.c
 +++ b/src/ap/x_snoop.c
-@@ -71,6 +71,10 @@ x_snoop_get_l2_packet(struct hostapd_dat
+@@ -71,8 +71,12 @@ x_snoop_get_l2_packet(struct hostapd_dat
  {
  	struct hostapd_bss_config *conf = hapd->conf;
  	struct l2_packet_data *l2;
 +	const char *ifname = conf->bridge;
-+
+ 
+-	l2 = l2_packet_init(conf->bridge, NULL, ETH_P_ALL, handler, hapd, 1);
 +	if (conf->snoop_iface[0])
 +		ifname = conf->snoop_iface;
- 
- 	l2 = l2_packet_init(conf->bridge, NULL, ETH_P_ALL, handler, hapd, 1);
++
++	l2 = l2_packet_init(ifname, NULL, ETH_P_ALL, handler, hapd, 1);
  	if (l2 == NULL) {
+ 		wpa_printf(MSG_DEBUG,
+ 			   "x_snoop: Failed to initialize L2 packet processing %s",
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
 @@ -2357,6 +2357,8 @@ static int hostapd_config_fill(struct ho


From lede-commits at lists.infradead.org  Wed Jul 28 04:48:11 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 28 Jul 2021 07:48:11 -0400
Subject: [openwrt/openwrt] Revert "generic: add mac-address property for
 NVMEM mac addresses"
In-Reply-To: <162747289038.32399.3617898790912887965@git-01.infra.openwrt.org>
References: <162747289038.32399.3617898790912887965@git-01.infra.openwrt.org>
Message-ID: <mailman.10690.1627472894.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/bd521f2a832ef1b4ea1a7680c0c087787df93278

commit bd521f2a832ef1b4ea1a7680c0c087787df93278
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed Jul 28 13:38:07 2021 +0200

    Revert "generic: add mac-address property for NVMEM mac addresses"
    
    This reverts commit b30924873062be47250e6b872347461c8221688d.
    
    This commit could create a property without allocated memory, breaking
    subsequent reads over a nodes property. Also, the mac-address-increment
    was not applied when reading from nvmem.
    
    Revert this commit for now, which breaks the label-mac-address logic.
    Possibly, traversing the device-tree from the netdev side is easier
    anyways.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 .../683-NET-add-mac-address-property.patch         | 59 ----------------------
 .../683-NET-add-mac-address-property.patch         | 59 ----------------------
 2 files changed, 118 deletions(-)

diff --git a/target/linux/generic/hack-5.10/683-NET-add-mac-address-property.patch b/target/linux/generic/hack-5.10/683-NET-add-mac-address-property.patch
deleted file mode 100644
index de561c5336..0000000000
--- a/target/linux/generic/hack-5.10/683-NET-add-mac-address-property.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From: David Bauer <mail at david-bauer.net>
-Date: Tue, 20 Jul 2021 22:00:10 +0200
-Subject: [PATCH] generic: add mac-address property for NVMEM mac addresses
-
-Traversing the device-tree by referencing a network device to determine
-a devices labe-mac does not work with the generic nvmem implementation,
-as the userspace expects the MAC-address to be available as a
-device-tree property.
-
-The legacy mtd-mac-address implementation did create such a node. Do the
-same when using the nvmem implementation to allow reading the MAC
-address.
-
-Fixes commit d284e6ef0f06 ("treewide: convert mtd-mac-address-increment*
-to generic implementation")
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
-
---- a/drivers/of/of_net.c
-+++ b/drivers/of/of_net.c
-@@ -61,6 +61,7 @@ static void *of_get_mac_addr_nvmem(struc
- 	void *mac;
- 	u8 nvmem_mac[ETH_ALEN];
- 	struct platform_device *pdev = of_find_device_by_node(np);
-+	struct property *prop;
- 
- 	if (!pdev) {
- 		*err = -ENODEV;
-@@ -78,10 +79,29 @@ static void *of_get_mac_addr_nvmem(struc
- 	put_device(&pdev->dev);
- 	if (!mac) {
- 		*err = -ENOMEM;
--		return NULL;
-+		goto out_err;
-+	}
-+
-+	prop = devm_kzalloc(&pdev->dev, sizeof(*prop), GFP_KERNEL);
-+	if (!prop) {
-+		*err = -ENOMEM;
-+		goto out_err;
-+	}
-+	prop->name = "mac-address";
-+	prop->length = ETH_ALEN;
-+	prop->value = devm_kmemdup(&pdev->dev, mac, ETH_ALEN, GFP_KERNEL);
-+	if (!prop->value || of_add_property(np, prop)) {
-+		*err = -ENOMEM;
-+		goto out_err;
- 	}
- 
- 	return mac;
-+
-+out_err:
-+	devm_kfree(&pdev->dev, prop->value);
-+	devm_kfree(&pdev->dev, prop);
-+	devm_kfree(&pdev->dev, mac);
-+	return NULL;
- }
- 
- static void *of_get_mac_address_mtd(struct device_node *np)
diff --git a/target/linux/generic/hack-5.4/683-NET-add-mac-address-property.patch b/target/linux/generic/hack-5.4/683-NET-add-mac-address-property.patch
deleted file mode 100644
index f0418dbb70..0000000000
--- a/target/linux/generic/hack-5.4/683-NET-add-mac-address-property.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From: David Bauer <mail at david-bauer.net>
-Date: Tue, 20 Jul 2021 22:00:10 +0200
-Subject: [PATCH] generic: add mac-address property for NVMEM mac addresses
-
-Traversing the device-tree by referencing a network device to determine
-a devices labe-mac does not work with the generic nvmem implementation,
-as the userspace expects the MAC-address to be available as a
-device-tree property.
-
-The legacy mtd-mac-address implementation did create such a node. Do the
-same when using the nvmem implementation to allow reading the MAC
-address.
-
-Fixes commit d284e6ef0f06 ("treewide: convert mtd-mac-address-increment*
-to generic implementation")
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
-
---- a/drivers/of/of_net.c
-+++ b/drivers/of/of_net.c
-@@ -55,6 +55,7 @@ static void *of_get_mac_addr_nvmem(struc
- 	void *mac;
- 	u8 nvmem_mac[ETH_ALEN];
- 	struct platform_device *pdev = of_find_device_by_node(np);
-+	struct property *prop;
- 
- 	if (!pdev) {
- 		*err = -ENODEV;
-@@ -72,10 +73,29 @@ static void *of_get_mac_addr_nvmem(struc
- 	put_device(&pdev->dev);
- 	if (!mac) {
- 		*err = -ENOMEM;
--		return NULL;
-+		goto out_err;
-+	}
-+
-+	prop = devm_kzalloc(&pdev->dev, sizeof(*prop), GFP_KERNEL);
-+	if (!prop) {
-+		*err = -ENOMEM;
-+		goto out_err;
-+	}
-+	prop->name = "mac-address";
-+	prop->length = ETH_ALEN;
-+	prop->value = devm_kmemdup(&pdev->dev, mac, ETH_ALEN, GFP_KERNEL);
-+	if (!prop->value || of_add_property(np, prop)) {
-+		*err = -ENOMEM;
-+		goto out_err;
- 	}
- 
- 	return mac;
-+
-+out_err:
-+	devm_kfree(&pdev->dev, prop->value);
-+	devm_kfree(&pdev->dev, prop);
-+	devm_kfree(&pdev->dev, mac);
-+	return NULL;
- }
- 
- static void *of_get_mac_address_mtd(struct device_node *np)


From lede-commits at lists.infradead.org  Wed Jul 28 04:48:10 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 28 Jul 2021 07:48:10 -0400
Subject: [openwrt/openwrt]  ath79: add support for Joy-IT JT-OR750i
In-Reply-To: <162747289038.32399.3617898790912887965@git-01.infra.openwrt.org>
References: <162747289038.32399.3617898790912887965@git-01.infra.openwrt.org>
Message-ID: <mailman.10693.1627472895.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/55b4b3655263984b92e4b9fc515a5e6b8003c655

commit 55b4b3655263984b92e4b9fc515a5e6b8003c655
Author: Vincent Wiemann <vincent.wiemann at ironai.com>
AuthorDate: Sun Jun 20 16:56:21 2021 +0200

    ath79: add support for Joy-IT JT-OR750i
    
    Specifications:
     * QCA9531, 16 MiB flash (Winbond W25Q128JVSQ), 128 MiB RAM
     * 802.11n 2T2R (external antennas)
     * QCA9887, 802.11ac 1T1R (connected with diplexer to one of the antennas)
     * 3x 10/100 LAN, 1x 10/100 WAN
     * UART header with pinout printed on PCB
    
    Installation:
     * The device comes with a bootloader installed only
     * The bootloader offers DHCP and is reachable at http://10.123.123.1
     * Accept the agreement and flash sysupgrade.bin
     * Use Firefox if flashing does not work
    
    TFTP recovery with static IP:
     * Rename sysupgrade.bin to jt-or750i_firmware.bin
     * Offer it via TFTP server at 192.168.0.66
     * Keep the reset button pressed for 4 seconds after connecting power
    
    TFTP recovery with dynamic IP:
     * Rename sysupgrade.bin to jt-or750i_firmware.bin
     * Offer it via TFTP server with a DHCP server running at the same address
     * Keep the reset button pressed for 6 seconds after connecting power
    
    Co-authored-by: Sebastian Schaper <openwrt at sebastianschaper.net>
    Signed-off-by: Vincent Wiemann <vincent.wiemann at ironai.com>
---
 target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts | 135 +++++++++++++++++++++
 .../ath79/generic/base-files/etc/board.d/01_leds   |   3 +
 .../generic/base-files/etc/board.d/02_network      |   5 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata       |   1 +
 target/linux/ath79/image/generic.mk                |   9 ++
 5 files changed, 153 insertions(+)

diff --git a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
new file mode 100644
index 0000000000..0332ebef2c
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
@@ -0,0 +1,135 @@
+// 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>
+
+/ {
+	compatible = "joyit,jt-or750i", "qca,qca9531";
+	model = "Joy-IT JT-OR750i";
+
+	aliases {
+		led-boot = &led_status_green;
+		led-failsafe = &led_status_red;
+		led-running = &led_status_green;
+		led-upgrade = &led_status_red;
+		label-mac-device = &eth0;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_status_green: status_green {
+			label = "green:status";
+			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+		};
+
+		led_status_red: status_red {
+			label = "red:status";
+			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&pinmux {
+	pinmux_led_eth_pins: pinmux_led_eth_pins {
+		pinctrl-single,bits = \
+			/* GPIO 4: LED_LINK_5 (WAN) */     \
+			<0x04 0x0000002d 0x000000ff>,      \
+			/* GPIO 14: LED_LINK_2 (LAN 3) */  \
+			/* GPIO 15: LED_LINK_3 (LAN 2) */  \
+			<0x0c 0x2b2c0000 0xffff0000>,      \
+			/* GPIO 16: LED_LINK_4 (LAN 1) */  \
+			<0x10 0x0000002a 0x000000ff>;
+	};
+};
+
+&spi {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x40000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "u-boot-env";
+				reg = <0x40000 0x10000>;
+				read-only;
+			};
+
+			partition at 50000 {
+				label = "firmware";
+				reg = <0x50000 0xfa0000>;
+				compatible = "denx,uimage";
+			};
+
+			art: partition at ff0000 {
+				label = "art";
+				reg = <0xff0000 0x10000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	phy-handle = <&swphy4>;
+
+	nvmem-cells = <&macaddr_art_0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+	nvmem-cells = <&macaddr_art_6>;
+	nvmem-cell-names = "mac-address";
+};
+
+&pcie0 {
+	status = "okay";
+};
+
+&wmac {
+	status = "okay";
+
+	mtd-cal-data = <&art 0x1000>;
+};
+
+&art {
+	compatible = "nvmem-cells";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	macaddr_art_0: macaddr at 0 {
+		reg = <0x0 0x6>;
+	};
+
+	macaddr_art_6: macaddr at 6 {
+		reg = <0x6 0x6>;
+	};
+};
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 5e5ccca32f..8fa8b48562 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
@@ -225,6 +225,9 @@ glinet,gl-x750)
 hak5,lan-turtle)
 	ucidef_set_led_netdev "wan" "WAN" "orange:system" "eth1"
 	;;
+joyit,jt-or750i)
+	ucidef_set_led_default "ath10k" "ath10k-disable" "ath10k-phy0" "0"
+	;;
 meraki,mr12|\
 tplink,cpe210-v2|\
 tplink,cpe210-v3)
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 1731f141af..af8619845b 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
@@ -282,6 +282,11 @@ ath79_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
 		;;
+	joyit,jt-or750i)
+		ucidef_set_interface_wan "eth1"
+		ucidef_add_switch "switch0" \
+			"0 at eth0" "2:lan:3" "3:lan:2" "4:lan:1"
+		;;
 	librerouter,librerouter-v1)
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "5:wan" "6 at eth1" "4:lan"
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 59d692c3d0..a01cd9f6f8 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -25,6 +25,7 @@ case "$FIRMWARE" in
 	comfast,cf-wr650ac-v2|\
 	devolo,dlan-pro-1200plus-ac|\
 	devolo,magic-2-wifi|\
+	joyit,jt-or750i|\
 	qxwlan,e1700ac-v2-8m|\
 	qxwlan,e1700ac-v2-16m|\
 	qxwlan,e600gac-v2-8m|\
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index fbcc9d186a..b33a578f19 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -1369,6 +1369,15 @@ define Device/jjplus_ja76pf2
 endef
 TARGET_DEVICES += jjplus_ja76pf2
 
+define Device/joyit_jt-or750i
+  SOC := qca9531
+  DEVICE_VENDOR := Joy-IT
+  DEVICE_MODEL := JT-OR750i
+  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
+  IMAGE_SIZE := 16000k
+endef
+TARGET_DEVICES += joyit_jt-or750i
+
 define Device/librerouter_librerouter-v1
   SOC := qca9558
   DEVICE_VENDOR := Librerouter


From lede-commits at lists.infradead.org  Wed Jul 28 05:25:23 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 28 Jul 2021 08:25:23 -0400
Subject: [openwrt/openwrt]  ath79: enable missing pinmux for JT-OR750i
In-Reply-To: <162747512312.30885.5202954502493240071@git-01.infra.openwrt.org>
References: <162747512312.30885.5202954502493240071@git-01.infra.openwrt.org>
Message-ID: <mailman.10700.1627475127.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/4feb9a4211d4c8e118e6b8f01fa0bbd4eab5d35c

commit 4feb9a4211d4c8e118e6b8f01fa0bbd4eab5d35c
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed Jul 28 13:52:22 2021 +0200

    ath79: enable missing pinmux for JT-OR750i
    
    Without explicit configuration of these pins the ethernet as well as
    status LED of the device do not work correctly.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
index 0332ebef2c..84443949b5 100644
--- a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
+++ b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
@@ -30,6 +30,9 @@
 	leds {
 		compatible = "gpio-leds";
 
+		pinctrl-names = "default";
+		pinctrl-0 = <&jtag_disable_pins &pinmux_led_eth_pins>;
+
 		led_status_green: status_green {
 			label = "green:status";
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;


From lede-commits at lists.infradead.org  Wed Jul 28 05:25:24 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 28 Jul 2021 08:25:24 -0400
Subject: [openwrt/openwrt]  ath79: fix JT-OR750i switch LED assignment
In-Reply-To: <162747512312.30885.5202954502493240071@git-01.infra.openwrt.org>
References: <162747512312.30885.5202954502493240071@git-01.infra.openwrt.org>
Message-ID: <mailman.10701.1627475129.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f0a885ed8636b9762d12f2eb2755f63297ff0cb5

commit f0a885ed8636b9762d12f2eb2755f63297ff0cb5
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed Jul 28 14:17:13 2021 +0200

    ath79: fix JT-OR750i switch LED assignment
    
    The LEDs for LAN1 and LAN3 were swapped. Link on port 1 would illuminate
    the LED on port 3 and vice versa.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
index 84443949b5..2838b9c82d 100644
--- a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
+++ b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
@@ -53,9 +53,9 @@
 			<0x04 0x0000002d 0x000000ff>,      \
 			/* GPIO 14: LED_LINK_2 (LAN 3) */  \
 			/* GPIO 15: LED_LINK_3 (LAN 2) */  \
-			<0x0c 0x2b2c0000 0xffff0000>,      \
+			<0x0c 0x2b2a0000 0xffff0000>,      \
 			/* GPIO 16: LED_LINK_4 (LAN 1) */  \
-			<0x10 0x0000002a 0x000000ff>;
+			<0x10 0x0000002c 0x000000ff>;
 	};
 };
 


From lede-commits at lists.infradead.org  Wed Jul 28 08:23:27 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 28 Jul 2021 11:23:27 -0400
Subject: [openwrt/openwrt]  kernel: bump 4.14 to 4.14.241
In-Reply-To: <162748580748.32143.8533729644572028647@git-01.infra.openwrt.org>
References: <162748580748.32143.8533729644572028647@git-01.infra.openwrt.org>
Message-ID: <mailman.10788.1627485818.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-19.07:
https://git.openwrt.org/e902d11de96889fc9cf09b5743ebb6dea8ad399c

commit e902d11de96889fc9cf09b5743ebb6dea8ad399c
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed Jul 28 16:09:27 2021 +0200

    kernel: bump 4.14 to 4.14.241
    
    Refreshed all patches
    
    Compile-tested: ath79-generic brcm2708-bcm2708
    Run-tested: ath79-generic brcm2708-bcm2708
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 include/kernel-version.mk                          |  4 +--
 .../802-usb-xhci-force-msi-renesas-xhci.patch      |  2 +-
 .../patches-4.14/910-unaligned_access_hacks.patch  |  6 ++--
 .../950-add-boardinfo-platform-data.patch          |  6 ++--
 .../patches-4.14/910-unaligned_access_hacks.patch  |  4 +--
 ...-add-support-for-performing-fake-doorbell.patch |  2 +-
 ...cm2835-Load-driver-early-and-support-lega.patch |  2 +-
 .../patches-4.14/950-0037-Add-dwc_otg-driver.patch |  2 +-
 ...50-0039-dmaengine-Add-support-for-BCM2708.patch |  4 +--
 ...950-0040-MMC-added-alternative-MMC-driver.patch |  2 +-
 ...6-cgroup-Disable-cgroup-memory-by-default.patch | 41 +++++++++++++++-------
 ...0-0292-net-mdiobus-add-unlocked-accessors.patch | 10 +++---
 ...fix-connected-active-CSI-2-lane-reporting.patch |  2 +-
 ...58743-Add-support-for-972Mbit-s-link-freq.patch |  2 +-
 ...tc358743-Check-I2C-succeeded-during-probe.patch |  4 +--
 ...ARM-dts-Add-TVE200-to-the-Gemini-SoC-DTSI.patch |  2 +-
 ...23-ARM-dts-Add-ethernet-to-the-Gemini-SoC.patch |  2 +-
 ...RM-dts-Add-the-FOTG210-USB-host-to-Gemini.patch |  2 +-
 .../025-tcp-allow-drivers-to-tweak-TSQ-logic.patch |  4 +--
 ...ial-option-fix-dwm-158-3g-modem-interface.patch |  2 +-
 ...r-nf_conntrack-add-IPS_OFFLOAD-status-bit.patch |  6 ++--
 target/linux/generic/config-4.14                   |  1 +
 .../generic/hack-4.14/207-disable-modorder.patch   |  4 +--
 .../linux/generic/hack-4.14/220-gc_sections.patch  |  2 +-
 .../linux/generic/hack-4.14/902-debloat_proc.patch |  2 +-
 .../pending-4.14/205-backtrace_module_info.patch   |  4 +--
 .../pending-4.14/630-packet_socket_type.patch      |  4 +--
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch |  8 ++---
 .../0002-dmaengine-Add-ADM-driver.patch            |  2 +-
 .../202-core-linux-support-layerscape.patch        | 14 ++++----
 .../patches-4.14/302-dts-support-layerscape.patch  | 26 +++++++-------
 .../patches-4.14/802-dma-support-layerscape.patch  |  6 ++--
 .../patches-4.14/807-usb-support-layerscape.patch  | 14 ++++----
 .../patches-4.14/816-pcie-support-layerscape.patch |  6 ++--
 .../patches-4.14/819-sdhc-support-layerscape.patch | 10 +++---
 .../patches-4.14/822-uart-support-layerscape.patch |  4 +--
 ...ci-allow-imod-interval-to-be-configurable.patch |  2 +-
 ...ediatek-Add-MediaTek-High-Speed-DMA-contr.patch |  2 +-
 ...t-and-device-to-the-same-MAX-payload-size.patch |  6 ++--
 ...aardvark-allow-to-specify-link-capability.patch |  4 +--
 .../0031-uvc-add-iPassion-iP2970-support.patch     |  4 +--
 .../700-net-mdiobus-add-unlocked-accessors.patch   | 10 +++---
 42 files changed, 131 insertions(+), 115 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index b56bdce480..8e40328746 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-4.14 = .236
+LINUX_VERSION-4.14 = .241
 
-LINUX_KERNEL_HASH-4.14.236 = e4eae297a6fefefd8ce4781d98178a7c1ee51ca0a4c8a7e46e61b121fbab8b2a
+LINUX_KERNEL_HASH-4.14.241 = b5bb04bb70154ba27a08bc1c067eb7c08fc3d513da58e6a33d6645b3a1889f7d
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
index a9ce750e80..c8eb2b420b 100644
--- a/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
+++ b/target/linux/apm821xx/patches-4.14/802-usb-xhci-force-msi-renesas-xhci.patch
@@ -44,7 +44,7 @@ produce a noisy warning.
  		hcd->msi_enabled = 1;
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1858,6 +1858,7 @@ struct xhci_hcd {
+@@ -1859,6 +1859,7 @@ struct xhci_hcd {
  	/* support xHCI 0.96 spec USB2 software LPM */
  	unsigned		sw_lpm_support:1;
  	/* support xHCI 1.0 spec USB2 hardware LPM */
diff --git a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch
index 6eee38df57..833b516a46 100644
--- a/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch
+++ b/target/linux/ar71xx/patches-4.14/910-unaligned_access_hacks.patch
@@ -223,7 +223,7 @@
  #include <linux/uaccess.h>
  #include <linux/ipv6.h>
  #include <linux/icmpv6.h>
-@@ -819,10 +820,10 @@ static void tcp_v6_send_response(const s
+@@ -835,10 +836,10 @@ static void tcp_v6_send_response(const s
  	topt = (__be32 *)(t1 + 1);
  
  	if (tsecr) {
@@ -325,7 +325,7 @@
  	for (p = *head; p; p = p->next) {
 --- a/net/ipv4/route.c
 +++ b/net/ipv4/route.c
-@@ -465,7 +465,7 @@ static struct neighbour *ipv4_neigh_look
+@@ -466,7 +466,7 @@ static struct neighbour *ipv4_neigh_look
  	else if (skb)
  		pkey = &ip_hdr(skb)->daddr;
  
@@ -850,7 +850,7 @@
  		*sum = csum_fold(csum_partial(diff, sizeof(diff),
 --- a/drivers/net/vxlan.c
 +++ b/drivers/net/vxlan.c
-@@ -1876,15 +1876,15 @@ static int vxlan_build_skb(struct sk_buf
+@@ -1878,15 +1878,15 @@ static int vxlan_build_skb(struct sk_buf
  		return err;
  
  	vxh = __skb_push(skb, sizeof(*vxh));
diff --git a/target/linux/ar71xx/patches-4.14/950-add-boardinfo-platform-data.patch b/target/linux/ar71xx/patches-4.14/950-add-boardinfo-platform-data.patch
index edeac838d9..6b0d300023 100644
--- a/target/linux/ar71xx/patches-4.14/950-add-boardinfo-platform-data.patch
+++ b/target/linux/ar71xx/patches-4.14/950-add-boardinfo-platform-data.patch
@@ -26,7 +26,7 @@
  #endif /* __MDIO_BOARD_INFO_H */
 --- a/drivers/net/phy/mdio_bus.c
 +++ b/drivers/net/phy/mdio_bus.c
-@@ -455,6 +455,17 @@ void mdiobus_free(struct mii_bus *bus)
+@@ -456,6 +456,17 @@ void mdiobus_free(struct mii_bus *bus)
  }
  EXPORT_SYMBOL(mdiobus_free);
  
@@ -44,7 +44,7 @@
  /**
   * mdiobus_scan - scan a bus for MDIO devices.
   * @bus: mii_bus to scan
-@@ -470,6 +481,7 @@ EXPORT_SYMBOL(mdiobus_free);
+@@ -471,6 +482,7 @@ EXPORT_SYMBOL(mdiobus_free);
  struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr)
  {
  	struct phy_device *phydev;
@@ -52,7 +52,7 @@
  	int err;
  
  	phydev = get_phy_device(bus, addr, false);
-@@ -482,6 +494,12 @@ struct phy_device *mdiobus_scan(struct m
+@@ -483,6 +495,12 @@ struct phy_device *mdiobus_scan(struct m
  	 */
  	of_mdiobus_link_mdiodev(bus, &phydev->mdio);
  
diff --git a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
index 89cca72eb3..16ccda9132 100644
--- a/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
@@ -214,7 +214,7 @@
  #include <linux/uaccess.h>
  #include <linux/ipv6.h>
  #include <linux/icmpv6.h>
-@@ -819,10 +820,10 @@ static void tcp_v6_send_response(const s
+@@ -835,10 +836,10 @@ static void tcp_v6_send_response(const s
  	topt = (__be32 *)(t1 + 1);
  
  	if (tsecr) {
@@ -316,7 +316,7 @@
  	for (p = *head; p; p = p->next) {
 --- a/net/ipv4/route.c
 +++ b/net/ipv4/route.c
-@@ -465,7 +465,7 @@ static struct neighbour *ipv4_neigh_look
+@@ -466,7 +466,7 @@ static struct neighbour *ipv4_neigh_look
  	else if (skb)
  		pkey = &ip_hdr(skb)->daddr;
  
diff --git a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
index 5784f5e5ab..4cddcb1d4b 100644
--- a/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
+++ b/target/linux/bcm53xx/patches-4.14/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
@@ -127,7 +127,7 @@ it on BCM4708 family.
  /*
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1840,6 +1840,7 @@ struct xhci_hcd {
+@@ -1841,6 +1841,7 @@ struct xhci_hcd {
  #define XHCI_INTEL_USB_ROLE_SW	BIT_ULL(31)
  #define XHCI_RESET_PLL_ON_DISCONNECT	BIT_ULL(34)
  #define XHCI_SNPS_BROKEN_SUSPEND    BIT_ULL(35)
diff --git a/target/linux/brcm2708/patches-4.14/950-0016-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch b/target/linux/brcm2708/patches-4.14/950-0016-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch
index a24a957ab1..afb42fad44 100644
--- a/target/linux/brcm2708/patches-4.14/950-0016-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch
+++ b/target/linux/brcm2708/patches-4.14/950-0016-dmaengine-bcm2835-Load-driver-early-and-support-lega.patch
@@ -20,7 +20,7 @@ Signed-off-by: Noralf Tr?nnes <noralf at tronnes.org>
 
 --- a/drivers/dma/Kconfig
 +++ b/drivers/dma/Kconfig
-@@ -131,7 +131,7 @@ config COH901318
+@@ -132,7 +132,7 @@ config COH901318
  
  config DMA_BCM2835
  	tristate "BCM2835 DMA engine support"
diff --git a/target/linux/brcm2708/patches-4.14/950-0037-Add-dwc_otg-driver.patch b/target/linux/brcm2708/patches-4.14/950-0037-Add-dwc_otg-driver.patch
index ee5c34cd55..ef19837e2f 100644
--- a/target/linux/brcm2708/patches-4.14/950-0037-Add-dwc_otg-driver.patch
+++ b/target/linux/brcm2708/patches-4.14/950-0037-Add-dwc_otg-driver.patch
@@ -841,7 +841,7 @@ Signed-off-by: Malik Olivier Boussejra <malik at boussejra.com>
  }
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -5131,7 +5131,7 @@ static void port_event(struct usb_hub *h
+@@ -5177,7 +5177,7 @@ static void port_event(struct usb_hub *h
  	if (portchange & USB_PORT_STAT_C_OVERCURRENT) {
  		u16 status = 0, unused;
  
diff --git a/target/linux/brcm2708/patches-4.14/950-0039-dmaengine-Add-support-for-BCM2708.patch b/target/linux/brcm2708/patches-4.14/950-0039-dmaengine-Add-support-for-BCM2708.patch
index 2c6373ac29..931b27375f 100644
--- a/target/linux/brcm2708/patches-4.14/950-0039-dmaengine-Add-support-for-BCM2708.patch
+++ b/target/linux/brcm2708/patches-4.14/950-0039-dmaengine-Add-support-for-BCM2708.patch
@@ -161,7 +161,7 @@ bcm2708-dmaengine - Fix arm64 portability/build issues
 
 --- a/drivers/dma/Kconfig
 +++ b/drivers/dma/Kconfig
-@@ -131,7 +131,7 @@ config COH901318
+@@ -132,7 +132,7 @@ config COH901318
  
  config DMA_BCM2835
  	tristate "BCM2835 DMA engine support"
@@ -170,7 +170,7 @@ bcm2708-dmaengine - Fix arm64 portability/build issues
  	select DMA_ENGINE
  	select DMA_VIRTUAL_CHANNELS
  
-@@ -535,6 +535,10 @@ config TIMB_DMA
+@@ -536,6 +536,10 @@ config TIMB_DMA
  	help
  	  Enable support for the Timberdale FPGA DMA engine.
  
diff --git a/target/linux/brcm2708/patches-4.14/950-0040-MMC-added-alternative-MMC-driver.patch b/target/linux/brcm2708/patches-4.14/950-0040-MMC-added-alternative-MMC-driver.patch
index 450b97ba3b..5b77eda043 100644
--- a/target/linux/brcm2708/patches-4.14/950-0040-MMC-added-alternative-MMC-driver.patch
+++ b/target/linux/brcm2708/patches-4.14/950-0040-MMC-added-alternative-MMC-driver.patch
@@ -156,7 +156,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
  		goto out;
 --- a/drivers/mmc/core/core.c
 +++ b/drivers/mmc/core/core.c
-@@ -2210,7 +2210,8 @@ EXPORT_SYMBOL(mmc_erase);
+@@ -2213,7 +2213,8 @@ EXPORT_SYMBOL(mmc_erase);
  int mmc_can_erase(struct mmc_card *card)
  {
  	if ((card->host->caps & MMC_CAP_ERASE) &&
diff --git a/target/linux/brcm2708/patches-4.14/950-0136-cgroup-Disable-cgroup-memory-by-default.patch b/target/linux/brcm2708/patches-4.14/950-0136-cgroup-Disable-cgroup-memory-by-default.patch
index ec964531cb..758d8f81c2 100644
--- a/target/linux/brcm2708/patches-4.14/950-0136-cgroup-Disable-cgroup-memory-by-default.patch
+++ b/target/linux/brcm2708/patches-4.14/950-0136-cgroup-Disable-cgroup-memory-by-default.patch
@@ -1,7 +1,7 @@
-From 584bc4a6093ceb9aea07673185ee0084edc8690b Mon Sep 17 00:00:00 2001
+From 66b3e537b50cd2b46b71edb6ffeef633d1224d10 Mon Sep 17 00:00:00 2001
 From: Phil Elwell <phil at raspberrypi.org>
 Date: Mon, 27 Nov 2017 17:14:54 +0000
-Subject: [PATCH 136/454] cgroup: Disable cgroup "memory" by default
+Subject: [PATCH] cgroup: Disable cgroup "memory" by default
 
 Some Raspberry Pis have limited RAM and most users won't use the
 cgroup memory support so it is disabled by default. Enable with:
@@ -12,34 +12,46 @@ See: https://github.com/raspberrypi/linux/issues/1950
 
 Signed-off-by: Phil Elwell <phil at raspberrypi.org>
 ---
- kernel/cgroup/cgroup.c | 30 ++++++++++++++++++++++++++++++
- 1 file changed, 30 insertions(+)
+ kernel/cgroup/cgroup.c | 38 ++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 38 insertions(+)
 
 --- a/kernel/cgroup/cgroup.c
 +++ b/kernel/cgroup/cgroup.c
-@@ -5220,6 +5220,8 @@ int __init cgroup_init_early(void)
+@@ -5219,6 +5219,9 @@ int __init cgroup_init_early(void)
+ 	return 0;
  }
  
- static u16 cgroup_disable_mask __initdata;
 +static u16 cgroup_enable_mask __initdata;
 +static int __init cgroup_disable(char *str);
- 
++
  /**
   * cgroup_init - cgroup initialization
-@@ -5258,6 +5260,12 @@ int __init cgroup_init(void)
+  *
+@@ -5256,6 +5259,12 @@ int __init cgroup_init(void)
  
  	mutex_unlock(&cgroup_mutex);
  
-+	/* Apply an implicit disable... */
++	/*
++	 * Apply an implicit disable, knowing that an explicit enable will
++	 * prevent if from doing anything.
++	 */
 +	cgroup_disable("memory");
-+
-+	/* ...knowing that an explicit enable will override it. */
-+	cgroup_disable_mask &= ~cgroup_enable_mask;
 +
  	for_each_subsys(ss, ssid) {
  		if (ss->early_init) {
  			struct cgroup_subsys_state *css =
-@@ -5649,6 +5657,28 @@ static int __init cgroup_disable(char *s
+@@ -5637,6 +5646,10 @@ static int __init cgroup_disable(char *s
+ 			    strcmp(token, ss->legacy_name))
+ 				continue;
+ 
++			/* An explicit cgroup_enable overrides a disable */
++			if (cgroup_enable_mask & (1 << i))
++				continue;
++
+ 			static_branch_disable(cgroup_subsys_enabled_key[i]);
+ 			pr_info("Disabling %s control group subsystem\n",
+ 				ss->name);
+@@ -5646,6 +5659,31 @@ static int __init cgroup_disable(char *s
  }
  __setup("cgroup_disable=", cgroup_disable);
  
@@ -59,6 +71,9 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
 +				continue;
 +
 +			cgroup_enable_mask |= 1 << i;
++			static_branch_enable(cgroup_subsys_enabled_key[i]);
++			pr_info("Enabling %s control group subsystem\n",
++				ss->name);
 +		}
 +	}
 +	return 1;
diff --git a/target/linux/brcm2708/patches-4.14/950-0292-net-mdiobus-add-unlocked-accessors.patch b/target/linux/brcm2708/patches-4.14/950-0292-net-mdiobus-add-unlocked-accessors.patch
index 5aec47e604..3bf86f612e 100644
--- a/target/linux/brcm2708/patches-4.14/950-0292-net-mdiobus-add-unlocked-accessors.patch
+++ b/target/linux/brcm2708/patches-4.14/950-0292-net-mdiobus-add-unlocked-accessors.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/phy/mdio_bus.c
 +++ b/drivers/net/phy/mdio_bus.c
-@@ -493,6 +493,55 @@ struct phy_device *mdiobus_scan(struct m
+@@ -494,6 +494,55 @@ struct phy_device *mdiobus_scan(struct m
  EXPORT_SYMBOL(mdiobus_scan);
  
  /**
@@ -75,7 +75,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   * mdiobus_read_nested - Nested version of the mdiobus_read function
   * @bus: the mii_bus struct
   * @addr: the phy address
-@@ -512,11 +561,9 @@ int mdiobus_read_nested(struct mii_bus *
+@@ -513,11 +562,9 @@ int mdiobus_read_nested(struct mii_bus *
  	BUG_ON(in_interrupt());
  
  	mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
@@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return retval;
  }
  EXPORT_SYMBOL(mdiobus_read_nested);
-@@ -538,11 +585,9 @@ int mdiobus_read(struct mii_bus *bus, in
+@@ -539,11 +586,9 @@ int mdiobus_read(struct mii_bus *bus, in
  	BUG_ON(in_interrupt());
  
  	mutex_lock(&bus->mdio_lock);
@@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return retval;
  }
  EXPORT_SYMBOL(mdiobus_read);
-@@ -568,11 +613,9 @@ int mdiobus_write_nested(struct mii_bus
+@@ -569,11 +614,9 @@ int mdiobus_write_nested(struct mii_bus
  	BUG_ON(in_interrupt());
  
  	mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
@@ -114,7 +114,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return err;
  }
  EXPORT_SYMBOL(mdiobus_write_nested);
-@@ -595,11 +638,9 @@ int mdiobus_write(struct mii_bus *bus, i
+@@ -596,11 +639,9 @@ int mdiobus_write(struct mii_bus *bus, i
  	BUG_ON(in_interrupt());
  
  	mutex_lock(&bus->mdio_lock);
diff --git a/target/linux/brcm2708/patches-4.14/950-0326-tc358743-fix-connected-active-CSI-2-lane-reporting.patch b/target/linux/brcm2708/patches-4.14/950-0326-tc358743-fix-connected-active-CSI-2-lane-reporting.patch
index cd27a17ce0..7844f6aa01 100644
--- a/target/linux/brcm2708/patches-4.14/950-0326-tc358743-fix-connected-active-CSI-2-lane-reporting.patch
+++ b/target/linux/brcm2708/patches-4.14/950-0326-tc358743-fix-connected-active-CSI-2-lane-reporting.patch
@@ -67,7 +67,7 @@ Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
  
  	return 0;
  }
-@@ -1885,6 +1886,7 @@ static int tc358743_probe(struct i2c_cli
+@@ -1886,6 +1887,7 @@ static int tc358743_probe(struct i2c_cli
  	if (pdata) {
  		state->pdata = *pdata;
  		state->bus.flags = V4L2_MBUS_CSI2_CONTINUOUS_CLOCK;
diff --git a/target/linux/brcm2708/patches-4.14/950-0327-tc358743-Add-support-for-972Mbit-s-link-freq.patch b/target/linux/brcm2708/patches-4.14/950-0327-tc358743-Add-support-for-972Mbit-s-link-freq.patch
index c257befd72..e86962571e 100644
--- a/target/linux/brcm2708/patches-4.14/950-0327-tc358743-Add-support-for-972Mbit-s-link-freq.patch
+++ b/target/linux/brcm2708/patches-4.14/950-0327-tc358743-Add-support-for-972Mbit-s-link-freq.patch
@@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	 */
  	bps_pr_lane = 2 * endpoint->link_frequencies[0];
  	if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) {
-@@ -1815,23 +1816,41 @@ static int tc358743_probe_of(struct tc35
+@@ -1816,23 +1817,41 @@ static int tc358743_probe_of(struct tc35
  			       state->pdata.refclk_hz * state->pdata.pll_prd;
  
  	/*
diff --git a/target/linux/brcm2708/patches-4.14/950-0328-media-tc358743-Check-I2C-succeeded-during-probe.patch b/target/linux/brcm2708/patches-4.14/950-0328-media-tc358743-Check-I2C-succeeded-during-probe.patch
index 87d0966f2b..849b529735 100644
--- a/target/linux/brcm2708/patches-4.14/950-0328-media-tc358743-Check-I2C-succeeded-during-probe.patch
+++ b/target/linux/brcm2708/patches-4.14/950-0328-media-tc358743-Check-I2C-succeeded-during-probe.patch
@@ -78,7 +78,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val)
  {
  	i2c_wrreg(sd, reg, val, 2);
-@@ -1887,6 +1904,7 @@ static int tc358743_probe(struct i2c_cli
+@@ -1888,6 +1905,7 @@ static int tc358743_probe(struct i2c_cli
  	struct tc358743_state *state;
  	struct tc358743_platform_data *pdata = client->dev.platform_data;
  	struct v4l2_subdev *sd;
@@ -86,7 +86,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	int err;
  
  	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-@@ -1919,7 +1937,8 @@ static int tc358743_probe(struct i2c_cli
+@@ -1920,7 +1938,8 @@ static int tc358743_probe(struct i2c_cli
  	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
  
  	/* i2c access */
diff --git a/target/linux/gemini/patches-4.14/0003-ARM-dts-Add-TVE200-to-the-Gemini-SoC-DTSI.patch b/target/linux/gemini/patches-4.14/0003-ARM-dts-Add-TVE200-to-the-Gemini-SoC-DTSI.patch
index 81d9788af0..459b0155b0 100644
--- a/target/linux/gemini/patches-4.14/0003-ARM-dts-Add-TVE200-to-the-Gemini-SoC-DTSI.patch
+++ b/target/linux/gemini/patches-4.14/0003-ARM-dts-Add-TVE200-to-the-Gemini-SoC-DTSI.patch
@@ -28,7 +28,7 @@ Signed-off-by: Arnd Bergmann <arnd at arndb.de>
  			};
  		};
  
-@@ -348,5 +354,20 @@
+@@ -349,5 +355,20 @@
  			memcpy-bus-width = <32>;
  			#dma-cells = <2>;
  		};
diff --git a/target/linux/gemini/patches-4.14/0023-ARM-dts-Add-ethernet-to-the-Gemini-SoC.patch b/target/linux/gemini/patches-4.14/0023-ARM-dts-Add-ethernet-to-the-Gemini-SoC.patch
index 0960f6bfdd..3893c58f90 100644
--- a/target/linux/gemini/patches-4.14/0023-ARM-dts-Add-ethernet-to-the-Gemini-SoC.patch
+++ b/target/linux/gemini/patches-4.14/0023-ARM-dts-Add-ethernet-to-the-Gemini-SoC.patch
@@ -30,7 +30,7 @@ Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
  					};
  				};
  				pci_default_pins: pinctrl-pci {
-@@ -316,6 +323,41 @@
+@@ -317,6 +324,41 @@
  			};
  		};
  
diff --git a/target/linux/gemini/patches-4.14/0031-ARM-dts-Add-the-FOTG210-USB-host-to-Gemini.patch b/target/linux/gemini/patches-4.14/0031-ARM-dts-Add-the-FOTG210-USB-host-to-Gemini.patch
index 5b2c4139c1..f371ec3f29 100644
--- a/target/linux/gemini/patches-4.14/0031-ARM-dts-Add-the-FOTG210-USB-host-to-Gemini.patch
+++ b/target/linux/gemini/patches-4.14/0031-ARM-dts-Add-the-FOTG210-USB-host-to-Gemini.patch
@@ -115,7 +115,7 @@ the patch is only included in the series for context.
  };
 --- a/arch/arm/boot/dts/gemini.dtsi
 +++ b/arch/arm/boot/dts/gemini.dtsi
-@@ -411,5 +411,31 @@
+@@ -412,5 +412,31 @@
  			#size-cells = <0>;
  			status = "disabled";
  		};
diff --git a/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch b/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
index 39a3964af7..6f018b9e4a 100644
--- a/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
+++ b/target/linux/generic/backport-4.14/025-tcp-allow-drivers-to-tweak-TSQ-logic.patch
@@ -65,7 +65,7 @@ Cc: Kir Kolyshkin <kir at openvz.org>
  	 * Before updating sk_refcnt, we must commit prior changes to memory
 --- a/net/ipv4/tcp_output.c
 +++ b/net/ipv4/tcp_output.c
-@@ -1700,7 +1700,7 @@ u32 tcp_tso_autosize(const struct sock *
+@@ -1701,7 +1701,7 @@ u32 tcp_tso_autosize(const struct sock *
  {
  	u32 bytes, segs;
  
@@ -74,7 +74,7 @@ Cc: Kir Kolyshkin <kir at openvz.org>
  		    sk->sk_gso_max_size - 1 - MAX_TCP_HEADER);
  
  	/* Goal is to send at least one packet per ms,
-@@ -2218,7 +2218,7 @@ static bool tcp_small_queue_check(struct
+@@ -2219,7 +2219,7 @@ static bool tcp_small_queue_check(struct
  {
  	unsigned int limit;
  
diff --git a/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch b/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch
index 84874d3d93..4ebcc115cd 100644
--- a/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch
+++ b/target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch
@@ -30,7 +30,7 @@ Signed-off-by: Johan Hovold <johan at kernel.org>
 
 --- a/drivers/usb/serial/option.c
 +++ b/drivers/usb/serial/option.c
-@@ -2028,7 +2028,8 @@ static const struct usb_device_id option
+@@ -2031,7 +2031,8 @@ static const struct usb_device_id option
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) },			/* D-Link DWM-156 (variant) */
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) },
diff --git a/target/linux/generic/backport-4.14/320-v4.16-netfilter-nf_conntrack-add-IPS_OFFLOAD-status-bit.patch b/target/linux/generic/backport-4.14/320-v4.16-netfilter-nf_conntrack-add-IPS_OFFLOAD-status-bit.patch
index 1a4321cb96..03c1deec70 100644
--- a/target/linux/generic/backport-4.14/320-v4.16-netfilter-nf_conntrack-add-IPS_OFFLOAD-status-bit.patch
+++ b/target/linux/generic/backport-4.14/320-v4.16-netfilter-nf_conntrack-add-IPS_OFFLOAD-status-bit.patch
@@ -90,7 +90,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				expired_count++;
 --- a/net/netfilter/nf_conntrack_netlink.c
 +++ b/net/netfilter/nf_conntrack_netlink.c
-@@ -1125,6 +1125,14 @@ static const struct nla_policy ct_nla_po
+@@ -1128,6 +1128,14 @@ static const struct nla_policy ct_nla_po
  				    .len = NF_CT_LABELS_MAX_SIZE },
  };
  
@@ -105,7 +105,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  static int ctnetlink_flush_conntrack(struct net *net,
  				     const struct nlattr * const cda[],
  				     u32 portid, int report)
-@@ -1137,7 +1145,7 @@ static int ctnetlink_flush_conntrack(str
+@@ -1140,7 +1148,7 @@ static int ctnetlink_flush_conntrack(str
  			return PTR_ERR(filter);
  	}
  
@@ -114,7 +114,7 @@ Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
  				  portid, report);
  	kfree(filter);
  
-@@ -1183,6 +1191,11 @@ static int ctnetlink_del_conntrack(struc
+@@ -1186,6 +1194,11 @@ static int ctnetlink_del_conntrack(struc
  
  	ct = nf_ct_tuplehash_to_ctrack(h);
  
diff --git a/target/linux/generic/config-4.14 b/target/linux/generic/config-4.14
index d54ede9efd..de8dd8bb8a 100644
--- a/target/linux/generic/config-4.14
+++ b/target/linux/generic/config-4.14
@@ -449,6 +449,7 @@ CONFIG_BASE_SMALL=0
 # CONFIG_BATTERY_MAX17040 is not set
 # CONFIG_BATTERY_MAX17042 is not set
 # CONFIG_BATTERY_MAX1721X is not set
+# CONFIG_BATTERY_RT5033 is not set
 # CONFIG_BATTERY_SBS is not set
 # CONFIG_BAYCOM_EPP is not set
 # CONFIG_BAYCOM_PAR is not set
diff --git a/target/linux/generic/hack-4.14/207-disable-modorder.patch b/target/linux/generic/hack-4.14/207-disable-modorder.patch
index 8ac07d2377..0cfb4d33ec 100644
--- a/target/linux/generic/hack-4.14/207-disable-modorder.patch
+++ b/target/linux/generic/hack-4.14/207-disable-modorder.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -1261,7 +1261,6 @@ endif
+@@ -1260,7 +1260,6 @@ endif
  
  PHONY += modules
  modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	@$(kecho) '  Building modules, stage 2.';
  	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
  
-@@ -1290,7 +1289,6 @@ _modinst_:
+@@ -1289,7 +1288,6 @@ _modinst_:
  		rm -f $(MODLIB)/build ; \
  		ln -s $(CURDIR) $(MODLIB)/build ; \
  	fi
diff --git a/target/linux/generic/hack-4.14/220-gc_sections.patch b/target/linux/generic/hack-4.14/220-gc_sections.patch
index fc60001ce4..c91c25dab1 100644
--- a/target/linux/generic/hack-4.14/220-gc_sections.patch
+++ b/target/linux/generic/hack-4.14/220-gc_sections.patch
@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  # Read KERNELRELEASE from include/config/kernel.release (if it exists)
  KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
  KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
-@@ -786,11 +791,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
+@@ -785,11 +790,6 @@ ifdef CONFIG_DEBUG_SECTION_MISMATCH
  KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
  endif
  
diff --git a/target/linux/generic/hack-4.14/902-debloat_proc.patch b/target/linux/generic/hack-4.14/902-debloat_proc.patch
index b426b07573..8d02402498 100644
--- a/target/linux/generic/hack-4.14/902-debloat_proc.patch
+++ b/target/linux/generic/hack-4.14/902-debloat_proc.patch
@@ -393,7 +393,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/net/ipv4/route.c
 +++ b/net/ipv4/route.c
-@@ -427,6 +427,9 @@ static struct pernet_operations ip_rt_pr
+@@ -428,6 +428,9 @@ static struct pernet_operations ip_rt_pr
  
  static int __init ip_rt_proc_init(void)
  {
diff --git a/target/linux/generic/pending-4.14/205-backtrace_module_info.patch b/target/linux/generic/pending-4.14/205-backtrace_module_info.patch
index 4040f91021..974dc4e29c 100644
--- a/target/linux/generic/pending-4.14/205-backtrace_module_info.patch
+++ b/target/linux/generic/pending-4.14/205-backtrace_module_info.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/lib/vsprintf.c
 +++ b/lib/vsprintf.c
-@@ -670,8 +670,10 @@ char *symbol_string(char *buf, char *end
+@@ -696,8 +696,10 @@ char *symbol_string(char *buf, char *end
  		    struct printf_spec spec, const char *fmt)
  {
  	unsigned long value;
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #endif
  
  	if (fmt[1] == 'R')
-@@ -685,11 +687,16 @@ char *symbol_string(char *buf, char *end
+@@ -711,11 +713,16 @@ char *symbol_string(char *buf, char *end
  		sprint_symbol(sym, value);
  	else
  		sprint_symbol_no_offset(sym, value);
diff --git a/target/linux/generic/pending-4.14/630-packet_socket_type.patch b/target/linux/generic/pending-4.14/630-packet_socket_type.patch
index e9b40b18c6..fa02d3f706 100644
--- a/target/linux/generic/pending-4.14/630-packet_socket_type.patch
+++ b/target/linux/generic/pending-4.14/630-packet_socket_type.patch
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3947,6 +3950,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3949,6 +3952,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3999,6 +4012,13 @@ static int packet_getsockopt(struct sock
+@@ -4001,6 +4014,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;
diff --git a/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 7e7ba34695..ab05eda4eb 100644
--- a/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-4.14/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (netif_elide_gro(skb->dev))
  		goto normal;
  
-@@ -6280,6 +6283,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -6287,6 +6290,48 @@ static void __netdev_adjacent_dev_unlink
  					   &upper_dev->adj_list.lower);
  }
  
@@ -91,7 +91,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)
-@@ -6318,6 +6363,7 @@ static int __netdev_upper_dev_link(struc
+@@ -6325,6 +6370,7 @@ static int __netdev_upper_dev_link(struc
  	if (ret)
  		return ret;
  
@@ -99,7 +99,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  					    &changeupper_info.info);
  	ret = notifier_to_errno(ret);
-@@ -6395,6 +6441,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -6402,6 +6448,7 @@ void netdev_upper_dev_unlink(struct net_
  
  	__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
  
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER, dev,
  				      &changeupper_info.info);
  }
-@@ -6959,6 +7006,7 @@ int dev_set_mac_address(struct net_devic
+@@ -6966,6 +7013,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/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch b/target/linux/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch
index fedb8ed798..aa7d2e791e 100644
--- a/target/linux/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch
+++ b/target/linux/ipq806x/patches-4.14/0002-dmaengine-Add-ADM-driver.patch
@@ -26,7 +26,7 @@ Signed-off-by: Thomas Pedersen <twp at codeaurora.org>
 
 --- a/drivers/dma/qcom/Kconfig
 +++ b/drivers/dma/qcom/Kconfig
-@@ -27,3 +27,13 @@ config QCOM_HIDMA
+@@ -28,3 +28,13 @@ config QCOM_HIDMA
  	  (user to kernel, kernel to kernel, etc.).  It only supports
  	  memcpy interface. The core is not intended for general
  	  purpose slave DMA.
diff --git a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch
index f54c29c324..eb412af778 100644
--- a/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/202-core-linux-support-layerscape.patch
@@ -713,7 +713,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  }
  
  #ifdef CONFIG_NET_INGRESS
-@@ -6339,7 +6340,15 @@ static int __netdev_upper_dev_link(struc
+@@ -6346,7 +6347,15 @@ static int __netdev_upper_dev_link(struc
  				   struct net_device *upper_dev, bool master,
  				   void *upper_priv, void *upper_info)
  {
@@ -730,7 +730,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  	int ret = 0;
  
  	ASSERT_RTNL();
-@@ -6357,12 +6366,7 @@ static int __netdev_upper_dev_link(struc
+@@ -6364,12 +6373,7 @@ static int __netdev_upper_dev_link(struc
  	if (master && netdev_master_upper_dev_get(dev))
  		return -EBUSY;
  
@@ -744,7 +744,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  					    &changeupper_info.info);
  	ret = notifier_to_errno(ret);
  	if (ret)
-@@ -6374,7 +6378,7 @@ static int __netdev_upper_dev_link(struc
+@@ -6381,7 +6385,7 @@ static int __netdev_upper_dev_link(struc
  		return ret;
  
  	netdev_update_addr_mask(dev);
@@ -753,7 +753,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  					    &changeupper_info.info);
  	ret = notifier_to_errno(ret);
  	if (ret)
-@@ -6438,21 +6442,25 @@ EXPORT_SYMBOL(netdev_master_upper_dev_li
+@@ -6445,21 +6449,25 @@ EXPORT_SYMBOL(netdev_master_upper_dev_li
  void netdev_upper_dev_unlink(struct net_device *dev,
  			     struct net_device *upper_dev)
  {
@@ -784,7 +784,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  				      &changeupper_info.info);
  }
  EXPORT_SYMBOL(netdev_upper_dev_unlink);
-@@ -6468,11 +6476,13 @@ EXPORT_SYMBOL(netdev_upper_dev_unlink);
+@@ -6475,11 +6483,13 @@ EXPORT_SYMBOL(netdev_upper_dev_unlink);
  void netdev_bonding_info_change(struct net_device *dev,
  				struct netdev_bonding_info *bonding_info)
  {
@@ -800,7 +800,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  				      &info.info);
  }
  EXPORT_SYMBOL(netdev_bonding_info_change);
-@@ -6598,11 +6608,13 @@ EXPORT_SYMBOL(dev_get_nest_level);
+@@ -6605,11 +6615,13 @@ EXPORT_SYMBOL(dev_get_nest_level);
  void netdev_lower_state_changed(struct net_device *lower_dev,
  				void *lower_state_info)
  {
@@ -816,7 +816,7 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  				      &changelowerstate_info.info);
  }
  EXPORT_SYMBOL(netdev_lower_state_changed);
-@@ -6893,11 +6905,14 @@ void __dev_notify_flags(struct net_devic
+@@ -6900,11 +6912,14 @@ void __dev_notify_flags(struct net_devic
  
  	if (dev->flags & IFF_UP &&
  	    (changes & ~(IFF_UP | IFF_PROMISC | IFF_ALLMULTI | IFF_VOLATILE))) {
diff --git a/target/linux/layerscape/patches-4.14/302-dts-support-layerscape.patch b/target/linux/layerscape/patches-4.14/302-dts-support-layerscape.patch
index 51797cc6dd..d0e1be3253 100644
--- a/target/linux/layerscape/patches-4.14/302-dts-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/302-dts-support-layerscape.patch
@@ -7318,7 +7318,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  		};
  
  		dspi: dspi at 2100000 {
-@@ -574,15 +494,126 @@
+@@ -573,15 +493,126 @@
  			#interrupt-cells = <2>;
  		};
  
@@ -7447,7 +7447,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  		};
  
  		i2c1: i2c at 2010000 {
-@@ -593,7 +624,7 @@
+@@ -592,7 +623,7 @@
  			reg = <0x0 0x2010000 0x0 0x10000>;
  			interrupts = <0 34 0x4>; /* Level high type */
  			clock-names = "i2c";
@@ -7456,7 +7456,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  		};
  
  		i2c2: i2c at 2020000 {
-@@ -604,7 +635,7 @@
+@@ -603,7 +634,7 @@
  			reg = <0x0 0x2020000 0x0 0x10000>;
  			interrupts = <0 35 0x4>; /* Level high type */
  			clock-names = "i2c";
@@ -7465,7 +7465,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  		};
  
  		i2c3: i2c at 2030000 {
-@@ -615,7 +646,7 @@
+@@ -614,7 +645,7 @@
  			reg = <0x0 0x2030000 0x0 0x10000>;
  			interrupts = <0 35 0x4>; /* Level high type */
  			clock-names = "i2c";
@@ -7474,7 +7474,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  		};
  
  		ifc: ifc at 2240000 {
-@@ -648,8 +679,8 @@
+@@ -647,8 +678,8 @@
  			compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie",
  				     "snps,dw-pcie";
  			reg-names = "regs", "config";
@@ -7485,7 +7485,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -657,20 +688,22 @@
+@@ -656,20 +687,22 @@
  			num-lanes = <4>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -7510,7 +7510,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -678,20 +711,22 @@
+@@ -677,20 +710,22 @@
  			num-lanes = <4>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -7535,7 +7535,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -699,20 +734,22 @@
+@@ -698,20 +733,22 @@
  			num-lanes = <8>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -7560,7 +7560,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -720,12 +757,14 @@
+@@ -719,12 +756,14 @@
  			num-lanes = <4>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -7575,7 +7575,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  		};
  
  		sata0: sata at 3200000 {
-@@ -754,6 +793,8 @@
+@@ -753,6 +792,8 @@
  			dr_mode = "host";
  			snps,quirk-frame-length-adjustment = <0x20>;
  			snps,dis_rxdet_inp3_quirk;
@@ -7584,7 +7584,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  		};
  
  		usb1: usb3 at 3110000 {
-@@ -764,6 +805,14 @@
+@@ -763,6 +804,14 @@
  			dr_mode = "host";
  			snps,quirk-frame-length-adjustment = <0x20>;
  			snps,dis_rxdet_inp3_quirk;
@@ -7599,7 +7599,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  		};
  
  		ccn at 4000000 {
-@@ -771,6 +820,14 @@
+@@ -770,6 +819,14 @@
  			reg = <0x0 0x04000000 0x0 0x01000000>;
  			interrupts = <0 12 4>;
  		};
@@ -7614,7 +7614,7 @@ Signed-off-by: Zhao Qiang <qiang.zhao at nxp.com>
  	};
  
  	ddr1: memory-controller at 1080000 {
-@@ -786,4 +843,44 @@
+@@ -785,4 +842,44 @@
  		interrupts = <0 18 0x4>;
  		little-endian;
  	};
diff --git a/target/linux/layerscape/patches-4.14/802-dma-support-layerscape.patch b/target/linux/layerscape/patches-4.14/802-dma-support-layerscape.patch
index 0b75847281..23f5ac4035 100644
--- a/target/linux/layerscape/patches-4.14/802-dma-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/802-dma-support-layerscape.patch
@@ -47,7 +47,7 @@ Signed-off-by: Yuan Yao <yao.yuan at nxp.com>
 
 --- a/drivers/dma/Kconfig
 +++ b/drivers/dma/Kconfig
-@@ -129,6 +129,24 @@ config COH901318
+@@ -130,6 +130,24 @@ config COH901318
  	help
  	  Enable support for ST-Ericsson COH 901 318 DMA.
  
@@ -72,7 +72,7 @@ Signed-off-by: Yuan Yao <yao.yuan at nxp.com>
  config DMA_BCM2835
  	tristate "BCM2835 DMA engine support"
  	depends on ARCH_BCM2835
-@@ -215,6 +233,20 @@ config FSL_EDMA
+@@ -216,6 +234,20 @@ config FSL_EDMA
  	  multiplexing capability for DMA request sources(slot).
  	  This module can be found on Freescale Vybrid and LS-1 SoCs.
  
@@ -93,7 +93,7 @@ Signed-off-by: Yuan Yao <yao.yuan at nxp.com>
  config FSL_RAID
          tristate "Freescale RAID engine Support"
          depends on FSL_SOC && !ASYNC_TX_ENABLE_CHANNEL_SWITCH
-@@ -600,7 +632,6 @@ config ZX_DMA
+@@ -601,7 +633,6 @@ config ZX_DMA
  	help
  	  Support the DMA engine for ZTE ZX family platform devices.
  
diff --git a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch
index 4ea197ed66..43e680c543 100644
--- a/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/807-usb-support-layerscape.patch
@@ -508,7 +508,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao at freescale.com>
  
 --- a/drivers/usb/dwc3/ep0.c
 +++ b/drivers/usb/dwc3/ep0.c
-@@ -391,7 +391,7 @@ static int dwc3_ep0_handle_u1(struct dwc
+@@ -394,7 +394,7 @@ static int dwc3_ep0_handle_u1(struct dwc
  		return -EINVAL;
  
  	reg = dwc3_readl(dwc->regs, DWC3_DCTL);
@@ -517,7 +517,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao at freescale.com>
  		reg |= DWC3_DCTL_INITU1ENA;
  	else
  		reg &= ~DWC3_DCTL_INITU1ENA;
-@@ -413,7 +413,7 @@ static int dwc3_ep0_handle_u2(struct dwc
+@@ -416,7 +416,7 @@ static int dwc3_ep0_handle_u2(struct dwc
  		return -EINVAL;
  
  	reg = dwc3_readl(dwc->regs, DWC3_DCTL);
@@ -1289,7 +1289,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao at freescale.com>
  		xhci->quirks |= XHCI_BROKEN_PORT_PED;
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -1983,10 +1983,12 @@ static int finish_td(struct xhci_hcd *xh
+@@ -2016,10 +2016,12 @@ static int finish_td(struct xhci_hcd *xh
  	union xhci_trb *ep_trb, struct xhci_transfer_event *event,
  	struct xhci_virt_ep *ep, int *status)
  {
@@ -1302,7 +1302,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao at freescale.com>
  	u32 trb_comp_code;
  	int ep_index;
  
-@@ -2009,14 +2011,30 @@ static int finish_td(struct xhci_hcd *xh
+@@ -2042,14 +2044,30 @@ static int finish_td(struct xhci_hcd *xh
  	if (trb_comp_code == COMP_STALL_ERROR ||
  		xhci_requires_manual_halt_cleanup(xhci, ep_ctx,
  						trb_comp_code)) {
@@ -1387,7 +1387,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao at freescale.com>
  	spin_unlock_irqrestore(&xhci->lock, flags);
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1794,7 +1794,7 @@ struct xhci_hcd {
+@@ -1795,7 +1795,7 @@ struct xhci_hcd {
  #define XHCI_STATE_DYING	(1 << 0)
  #define XHCI_STATE_HALTED	(1 << 1)
  #define XHCI_STATE_REMOVING	(1 << 2)
@@ -1396,7 +1396,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao at freescale.com>
  #define	XHCI_LINK_TRB_QUIRK	BIT_ULL(0)
  #define XHCI_RESET_EP_QUIRK	BIT_ULL(1)
  #define XHCI_NEC_HOST		BIT_ULL(2)
-@@ -1830,6 +1830,9 @@ struct xhci_hcd {
+@@ -1831,6 +1831,9 @@ struct xhci_hcd {
  #define XHCI_SSIC_PORT_UNUSED	BIT_ULL(22)
  #define XHCI_NO_64BIT_SUPPORT	BIT_ULL(23)
  #define XHCI_MISSING_CAS	BIT_ULL(24)
@@ -1406,7 +1406,7 @@ Signed-off-by: Zhao Chenhui <chenhui.zhao at freescale.com>
  /* For controller with a broken Port Disable implementation */
  #define XHCI_BROKEN_PORT_PED	BIT_ULL(25)
  #define XHCI_LIMIT_ENDPOINT_INTERVAL_7	BIT_ULL(26)
-@@ -1838,8 +1841,9 @@ struct xhci_hcd {
+@@ -1839,8 +1842,9 @@ struct xhci_hcd {
  #define XHCI_HW_LPM_DISABLE	BIT_ULL(29)
  #define XHCI_SUSPEND_DELAY	BIT_ULL(30)
  #define XHCI_INTEL_USB_ROLE_SW	BIT_ULL(31)
diff --git a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch
index e7c42d8d9b..38a308e9d4 100644
--- a/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/816-pcie-support-layerscape.patch
@@ -5604,9 +5604,9 @@ Signed-off-by: Yangbo Lu <yangbo.lu at nxp.com>
  	 * them, we have to fall back to INTx or other interrupts, e.g., a
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -3408,6 +3408,13 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_A
- DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0033, quirk_no_bus_reset);
- DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0034, quirk_no_bus_reset);
+@@ -3430,6 +3430,13 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_A
+  */
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TI, 0xb005, quirk_no_bus_reset);
  
 +/*
 + * NXP (Freescale Vendor ID) LS1088 chips do not behave correctly after
diff --git a/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch b/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch
index b89916b55d..583ca11751 100644
--- a/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/819-sdhc-support-layerscape.patch
@@ -497,7 +497,7 @@ Signed-off-by: Yinbo Zhu <yinbo.zhu at nxp.com>
  		.name = "sdhci-esdhc",
 --- a/drivers/mmc/host/sdhci.c
 +++ b/drivers/mmc/host/sdhci.c
-@@ -2148,7 +2148,7 @@ static void sdhci_send_tuning(struct sdh
+@@ -2152,7 +2152,7 @@ static void sdhci_send_tuning(struct sdh
  
  }
  
@@ -506,7 +506,7 @@ Signed-off-by: Yinbo Zhu <yinbo.zhu at nxp.com>
  {
  	int i;
  
-@@ -2165,13 +2165,13 @@ static void __sdhci_execute_tuning(struc
+@@ -2169,13 +2169,13 @@ static void __sdhci_execute_tuning(struc
  			pr_debug("%s: Tuning timeout, falling back to fixed sampling clock\n",
  				 mmc_hostname(host->mmc));
  			sdhci_abort_tuning(host, opcode);
@@ -522,7 +522,7 @@ Signed-off-by: Yinbo Zhu <yinbo.zhu at nxp.com>
  			break;
  		}
  
-@@ -2183,6 +2183,7 @@ static void __sdhci_execute_tuning(struc
+@@ -2187,6 +2187,7 @@ static void __sdhci_execute_tuning(struc
  	pr_info("%s: Tuning failed, falling back to fixed sampling clock\n",
  		mmc_hostname(host->mmc));
  	sdhci_reset_tuning(host);
@@ -530,7 +530,7 @@ Signed-off-by: Yinbo Zhu <yinbo.zhu at nxp.com>
  }
  
  int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
-@@ -2244,7 +2245,7 @@ int sdhci_execute_tuning(struct mmc_host
+@@ -2248,7 +2249,7 @@ int sdhci_execute_tuning(struct mmc_host
  
  	sdhci_start_tuning(host);
  
@@ -541,7 +541,7 @@ Signed-off-by: Yinbo Zhu <yinbo.zhu at nxp.com>
  out:
 --- a/drivers/mmc/host/sdhci.h
 +++ b/drivers/mmc/host/sdhci.h
-@@ -545,6 +545,7 @@ struct sdhci_host {
+@@ -546,6 +546,7 @@ struct sdhci_host {
  
  	unsigned int		tuning_count;	/* Timer count for re-tuning */
  	unsigned int		tuning_mode;	/* Re-tuning mode supported by host */
diff --git a/target/linux/layerscape/patches-4.14/822-uart-support-layerscape.patch b/target/linux/layerscape/patches-4.14/822-uart-support-layerscape.patch
index f8d893ceeb..0781704d9b 100644
--- a/target/linux/layerscape/patches-4.14/822-uart-support-layerscape.patch
+++ b/target/linux/layerscape/patches-4.14/822-uart-support-layerscape.patch
@@ -22,7 +22,7 @@ Signed-off-by: Biwen Li <biwen.li at nxp.com>
  struct lpuart_port {
  	struct uart_port	port;
  	struct clk		*clk;
-@@ -2153,13 +2155,13 @@ static int lpuart_probe(struct platform_
+@@ -2156,13 +2158,13 @@ static int lpuart_probe(struct platform_
  
  	ret = of_alias_get_id(np, "serial");
  	if (ret < 0) {
@@ -42,7 +42,7 @@ Signed-off-by: Biwen Li <biwen.li at nxp.com>
  	sport->port.line = ret;
  	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  	sport->port.membase = devm_ioremap_resource(&pdev->dev, res);
-@@ -2250,6 +2252,7 @@ static int lpuart_remove(struct platform
+@@ -2253,6 +2255,7 @@ static int lpuart_remove(struct platform
  	struct lpuart_port *sport = platform_get_drvdata(pdev);
  
  	uart_remove_one_port(&lpuart_reg, &sport->port);
diff --git a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
index 84ffc5f271..884c5008d5 100644
--- a/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
+++ b/target/linux/mediatek/patches-4.14/0191-usb-xhci-allow-imod-interval-to-be-configurable.patch
@@ -127,7 +127,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	/* Set the HCD state before we enable the irqs */
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1730,6 +1730,8 @@ struct xhci_hcd {
+@@ -1731,6 +1731,8 @@ struct xhci_hcd {
  	u8		max_interrupters;
  	u8		max_ports;
  	u8		isoc_threshold;
diff --git a/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch b/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch
index 6fd4cdef48..7398229502 100644
--- a/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch
+++ b/target/linux/mediatek/patches-4.14/0205-dmaengine-mediatek-Add-MediaTek-High-Speed-DMA-contr.patch
@@ -29,7 +29,7 @@ Cc: Julia Lawall <julia.lawall at lip6.fr>
 
 --- a/drivers/dma/Kconfig
 +++ b/drivers/dma/Kconfig
-@@ -604,6 +604,8 @@ config ZX_DMA
+@@ -605,6 +605,8 @@ config ZX_DMA
  # driver files
  source "drivers/dma/bestcomm/Kconfig"
  
diff --git a/target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch b/target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch
index beea6a55ba..aa5bfe7d06 100644
--- a/target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch
+++ b/target/linux/mvebu/patches-4.14/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch
@@ -57,7 +57,7 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
  #define PCIE_CORE_LINK_CTRL_STAT_REG				0xd0
  #define     PCIE_CORE_LINK_L0S_ENTRY				BIT(0)
  #define     PCIE_CORE_LINK_TRAINING				BIT(5)
-@@ -297,7 +299,8 @@ static void advk_pcie_setup_hw(struct ad
+@@ -298,7 +300,8 @@ static void advk_pcie_setup_hw(struct ad
  
  	/* Set PCIe Device Control and Status 1 PF0 register */
  	reg = PCIE_CORE_DEV_CTRL_STATS_RELAX_ORDER_DISABLE |
@@ -67,7 +67,7 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
  		PCIE_CORE_DEV_CTRL_STATS_SNOOP_DISABLE |
  		(PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SZ <<
  		 PCIE_CORE_DEV_CTRL_STATS_MAX_RD_REQ_SIZE_SHIFT);
-@@ -882,6 +885,58 @@ out_release_res:
+@@ -913,6 +916,58 @@ out_release_res:
  	return err;
  }
  
@@ -126,7 +126,7 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
  static int advk_pcie_probe(struct platform_device *pdev)
  {
  	struct device *dev = &pdev->dev;
-@@ -956,6 +1011,9 @@ static int advk_pcie_probe(struct platfo
+@@ -987,6 +1042,9 @@ static int advk_pcie_probe(struct platfo
  	list_for_each_entry(child, &bus->children, node)
  		pcie_bus_configure_settings(child);
  
diff --git a/target/linux/mvebu/patches-4.14/527-PCI-aardvark-allow-to-specify-link-capability.patch b/target/linux/mvebu/patches-4.14/527-PCI-aardvark-allow-to-specify-link-capability.patch
index fb57f4112a..d9ebf2e498 100644
--- a/target/linux/mvebu/patches-4.14/527-PCI-aardvark-allow-to-specify-link-capability.patch
+++ b/target/linux/mvebu/patches-4.14/527-PCI-aardvark-allow-to-specify-link-capability.patch
@@ -14,7 +14,7 @@ Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
 
 --- a/drivers/pci/host/pci-aardvark.c
 +++ b/drivers/pci/host/pci-aardvark.c
-@@ -272,6 +272,8 @@ static void advk_pcie_set_ob_win(struct
+@@ -273,6 +273,8 @@ static void advk_pcie_set_ob_win(struct
  
  static void advk_pcie_setup_hw(struct advk_pcie *pcie)
  {
@@ -23,7 +23,7 @@ Signed-off-by: Tomasz Maciej Nowak <tmn505 at gmail.com>
  	u32 reg;
  	int i;
  
-@@ -311,10 +313,15 @@ static void advk_pcie_setup_hw(struct ad
+@@ -312,10 +314,15 @@ static void advk_pcie_setup_hw(struct ad
  		PCIE_CORE_CTRL2_TD_ENABLE;
  	advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG);
  
diff --git a/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch
index 77ec3f111c..7304936b6c 100644
--- a/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch
+++ b/target/linux/ramips/patches-4.14/0031-uvc-add-iPassion-iP2970-support.patch
@@ -64,7 +64,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  #include <media/v4l2-common.h>
  
-@@ -1101,9 +1106,149 @@ static void uvc_video_decode_data(struct
+@@ -1128,9 +1133,149 @@ static void uvc_video_decode_data(struct
  	}
  }
  
@@ -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_trace(UVC_TRACE_FRAME, "Frame complete (EOF found).\n");
-@@ -1518,6 +1663,8 @@ static int uvc_init_video_isoc(struct uv
+@@ -1545,6 +1690,8 @@ static int uvc_init_video_isoc(struct uv
  	if (npackets == 0)
  		return -ENOMEM;
  
diff --git a/target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch b/target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch
index 4880c49b13..c777a0fffe 100644
--- a/target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch
+++ b/target/linux/ramips/patches-4.14/700-net-mdiobus-add-unlocked-accessors.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/phy/mdio_bus.c
 +++ b/drivers/net/phy/mdio_bus.c
-@@ -493,6 +493,55 @@ struct phy_device *mdiobus_scan(struct m
+@@ -494,6 +494,55 @@ struct phy_device *mdiobus_scan(struct m
  EXPORT_SYMBOL(mdiobus_scan);
  
  /**
@@ -75,7 +75,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   * mdiobus_read_nested - Nested version of the mdiobus_read function
   * @bus: the mii_bus struct
   * @addr: the phy address
-@@ -512,11 +561,9 @@ int mdiobus_read_nested(struct mii_bus *
+@@ -513,11 +562,9 @@ int mdiobus_read_nested(struct mii_bus *
  	BUG_ON(in_interrupt());
  
  	mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
@@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return retval;
  }
  EXPORT_SYMBOL(mdiobus_read_nested);
-@@ -538,11 +585,9 @@ int mdiobus_read(struct mii_bus *bus, in
+@@ -539,11 +586,9 @@ int mdiobus_read(struct mii_bus *bus, in
  	BUG_ON(in_interrupt());
  
  	mutex_lock(&bus->mdio_lock);
@@ -101,7 +101,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return retval;
  }
  EXPORT_SYMBOL(mdiobus_read);
-@@ -568,11 +613,9 @@ int mdiobus_write_nested(struct mii_bus
+@@ -569,11 +614,9 @@ int mdiobus_write_nested(struct mii_bus
  	BUG_ON(in_interrupt());
  
  	mutex_lock_nested(&bus->mdio_lock, MDIO_MUTEX_NESTED);
@@ -114,7 +114,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return err;
  }
  EXPORT_SYMBOL(mdiobus_write_nested);
-@@ -595,11 +638,9 @@ int mdiobus_write(struct mii_bus *bus, i
+@@ -596,11 +639,9 @@ int mdiobus_write(struct mii_bus *bus, i
  	BUG_ON(in_interrupt());
  
  	mutex_lock(&bus->mdio_lock);


From lede-commits at lists.infradead.org  Wed Jul 28 12:26:41 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 28 Jul 2021 15:26:41 -0400
Subject: [openwrt/openwrt]  fstools: update to git HEAD
In-Reply-To: <162750040113.13288.1218901499942106411@git-01.infra.openwrt.org>
References: <162750040113.13288.1218901499942106411@git-01.infra.openwrt.org>
Message-ID: <mailman.10860.1627500406.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/57ece63cd8cfb6de0668bffccf5e6cef766d3056

commit 57ece63cd8cfb6de0668bffccf5e6cef766d3056
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Jul 28 20:25:12 2021 +0100

    fstools: update to git HEAD
    
     46d02c2 block: don't add non-ubifs ubi devices
     cc63933 blockd: send mount.ready when startup has completed
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/system/fstools/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index f56a18c70e..8c82f8e3e5 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
-PKG_MIRROR_HASH:=66811ea1ec6c747ad46978a0dc55a9e620e493cfa39d8acb318d1d1b00dc1fcc
-PKG_SOURCE_DATE:=2021-07-24
-PKG_SOURCE_VERSION:=1d681ca59cada118633c6e2d65b882b4c8f0db58
+PKG_MIRROR_HASH:=6a457b812166e04e2244ee1be92a4957666b5d1554315c0e18db1b30376cc617
+PKG_SOURCE_DATE:=2021-07-28
+PKG_SOURCE_VERSION:=cc63933faedd8d4fcdabb872cf4661ac04fe4ba2
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Wed Jul 28 15:29:34 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 28 Jul 2021 18:29:34 -0400
Subject: [openwrt/openwrt] generic: write back netdev MAC-address to
 device-tree
In-Reply-To: <162751137430.25863.11247264714603028437@git-01.infra.openwrt.org>
References: <162751137430.25863.11247264714603028437@git-01.infra.openwrt.org>
Message-ID: <mailman.10871.1627511379.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/cd39aba402ea7e7a11e173b0b5aa96e42bf1f2ac

commit cd39aba402ea7e7a11e173b0b5aa96e42bf1f2ac
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Thu Jul 29 00:29:53 2021 +0200

    generic: write back netdev MAC-address to device-tree
    
    The label-mac logic relies on the mac-address property of a netdev
    devices of-node. However, the mac address can also be stored as a
    different property or read from e.g. an mtd device.
    
    Create this node when reading a mac-address from OF if it does not
    already exist and copy the mac-address used for the device to this
    property. This way, the MAC address can be accessed using procfs.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 ...-mac-address-support-to-of_get_mac_addres.patch | 33 +++++-----------
 ...-of_net-add-mac-address-increment-support.patch |  6 +--
 .../683-of_net-add-mac-address-to-of-tree.patch    | 44 ++++++++++++++++++++++
 ...-mac-address-support-to-of_get_mac_addres.patch | 33 +++++-----------
 ...-of_net-add-mac-address-increment-support.patch |  6 +--
 .../683-of_net-add-mac-address-to-of-tree.patch    | 44 ++++++++++++++++++++++
 6 files changed, 112 insertions(+), 54 deletions(-)

diff --git a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
index 9e16564953..7d2267eb29 100644
--- a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
+++ b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
@@ -34,13 +34,14 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  {
  	struct property *pp = of_find_property(np, name, NULL);
  
-@@ -78,6 +79,70 @@ static const void *of_get_mac_addr_nvmem
+@@ -78,6 +79,55 @@ static const void *of_get_mac_addr_nvmem
  	return mac;
  }
  
 +static const void *of_get_mac_address_mtd(struct device_node *np)
 +{
 +#ifdef CONFIG_MTD
++	struct platform_device *pdev = of_find_device_by_node(np);
 +	struct device_node *mtd_np = NULL;
 +	struct property *prop;
 +	size_t retlen;
@@ -77,46 +78,30 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +	if (!is_valid_ether_addr(mac))
 +		return NULL;
 +
-+	addr = of_get_mac_addr(np, "mac-address");
-+	if (addr) {
-+		memcpy(addr, mac, ETH_ALEN);
-+		return addr;
-+	}
-+
-+	prop = kzalloc(sizeof(*prop), GFP_KERNEL);
-+	if (!prop)
-+		return NULL;
-+
-+	prop->name = "mac-address";
-+	prop->length = ETH_ALEN;
-+	prop->value = kmemdup(mac, ETH_ALEN, GFP_KERNEL);
-+	if (!prop->value || of_add_property(np, prop))
-+		goto free;
++	addr = devm_kmemdup(&pdev->dev, mac, ETH_ALEN, GFP_KERNEL);
++	if (!addr)
++		return ERR_PTR(-ENOMEM);
 +
-+	return prop->value;
-+free:
-+	kfree(prop->value);
-+	kfree(prop);
++	return addr;
 +#endif
-+	return NULL;
 +}
 +
 +
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
   * checked first, because that is supposed to contain to "most recent" MAC
-@@ -98,6 +163,10 @@ static const void *of_get_mac_addr_nvmem
+@@ -98,6 +148,10 @@ static const void *of_get_mac_addr_nvmem
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
   *
 + *
 + * If a mtd-mac-address property exists, try to fetch the MAC address from the
-+ * specified mtd device, and store it as a 'mac-address' property
++ * specified mtd device.
 + *
   * Return: Will be a valid pointer on success and ERR_PTR in case of error.
  */
  const void *of_get_mac_address(struct device_node *np)
-@@ -116,6 +185,10 @@ const void *of_get_mac_address(struct de
+@@ -116,6 +170,10 @@ const void *of_get_mac_address(struct de
  	if (addr)
  		return addr;
  
diff --git a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
index 0776d7bccc..9032b9186c 100644
--- a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
+++ b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
@@ -64,10 +64,10 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +static void *of_get_mac_address_mtd(struct device_node *np)
  {
  #ifdef CONFIG_MTD
- 	struct device_node *mtd_np = NULL;
-@@ -167,28 +172,54 @@ free:
+ 	struct platform_device *pdev = of_find_device_by_node(np);
+@@ -152,28 +157,54 @@ static const void *of_get_mac_address_mt
   * If a mtd-mac-address property exists, try to fetch the MAC address from the
-  * specified mtd device, and store it as a 'mac-address' property
+  * specified mtd device.
   *
 + * DT can tell the system to increment the mac-address after is extracted by
 + * using:
diff --git a/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch b/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
new file mode 100644
index 0000000000..3e331bac63
--- /dev/null
+++ b/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
@@ -0,0 +1,44 @@
+--- a/drivers/of/of_net.c
++++ b/drivers/of/of_net.c
+@@ -132,6 +132,33 @@ static void *of_get_mac_address_mtd(stru
+ #endif
+ }
+ 
++static int of_add_mac_address(struct device_node *np, u8* addr)
++{
++	struct property *prop;
++	u8 *np_addr;
++
++	np_addr = of_get_mac_addr(np, "mac-address");
++	if (np_addr) {
++		memcpy(np_addr, addr, ETH_ALEN);
++		return 0;
++	}
++
++	prop = kzalloc(sizeof(*prop), GFP_KERNEL);
++	if (!prop)
++		return 0;
++
++	prop->name = "mac-address";
++	prop->length = ETH_ALEN;
++	prop->value = kmemdup(addr, ETH_ALEN, GFP_KERNEL);
++	if (!prop->value || of_add_property(np, prop))
++		goto free;
++
++	return 0;
++free:
++	kfree(prop->value);
++	kfree(prop);
++	return -ENOMEM;
++}
+ 
+ /**
+  * Search the device tree for the best MAC address to use.  'mac-address' is
+@@ -205,6 +232,7 @@ found:
+ 	if (!of_property_read_u32(np, "mac-address-increment", &mac_inc))
+ 		addr[inc_idx] += mac_inc;
+ 
++	of_add_mac_address(np, addr);
+ 	return addr;
+ }
+ EXPORT_SYMBOL(of_get_mac_address);
diff --git a/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
index 01f940dec7..b6ac24abcd 100644
--- a/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
+++ b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
@@ -34,13 +34,14 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  {
  	struct property *pp = of_find_property(np, name, NULL);
  
-@@ -72,6 +73,70 @@ static const void *of_get_mac_addr_nvmem
+@@ -72,6 +73,55 @@ static const void *of_get_mac_addr_nvmem
  	return mac;
  }
  
 +static const void *of_get_mac_address_mtd(struct device_node *np)
 +{
 +#ifdef CONFIG_MTD
++	struct platform_device *pdev = of_find_device_by_node(np);
 +	struct device_node *mtd_np = NULL;
 +	struct property *prop;
 +	size_t retlen;
@@ -77,46 +78,30 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +	if (!is_valid_ether_addr(mac))
 +		return NULL;
 +
-+	addr = of_get_mac_addr(np, "mac-address");
-+	if (addr) {
-+		memcpy(addr, mac, ETH_ALEN);
-+		return addr;
-+	}
-+
-+	prop = kzalloc(sizeof(*prop), GFP_KERNEL);
-+	if (!prop)
-+		return NULL;
-+
-+	prop->name = "mac-address";
-+	prop->length = ETH_ALEN;
-+	prop->value = kmemdup(mac, ETH_ALEN, GFP_KERNEL);
-+	if (!prop->value || of_add_property(np, prop))
-+		goto free;
++	addr = devm_kmemdup(&pdev->dev, mac, ETH_ALEN, GFP_KERNEL);
++	if (!addr)
++		return ERR_PTR(-ENOMEM);
 +
-+	return prop->value;
-+free:
-+	kfree(prop->value);
-+	kfree(prop);
++	return addr;
 +#endif
-+	return NULL;
 +}
 +
 +
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
   * checked first, because that is supposed to contain to "most recent" MAC
-@@ -92,6 +157,10 @@ static const void *of_get_mac_addr_nvmem
+@@ -92,6 +142,10 @@ static const void *of_get_mac_addr_nvmem
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
   *
 + *
 + * If a mtd-mac-address property exists, try to fetch the MAC address from the
-+ * specified mtd device, and store it as a 'mac-address' property
++ * specified mtd device.
 + *
   * Return: Will be a valid pointer on success and ERR_PTR in case of error.
  */
  const void *of_get_mac_address(struct device_node *np)
-@@ -110,6 +179,10 @@ const void *of_get_mac_address(struct de
+@@ -110,6 +164,10 @@ const void *of_get_mac_address(struct de
  	if (addr)
  		return addr;
  
diff --git a/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
index 81f946ff7f..120ef52ff8 100644
--- a/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
+++ b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
@@ -64,10 +64,10 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +static void *of_get_mac_address_mtd(struct device_node *np)
  {
  #ifdef CONFIG_MTD
- 	struct device_node *mtd_np = NULL;
-@@ -161,28 +166,54 @@ free:
+ 	struct platform_device *pdev = of_find_device_by_node(np);
+@@ -146,28 +151,54 @@ static const void *of_get_mac_address_mt
   * If a mtd-mac-address property exists, try to fetch the MAC address from the
-  * specified mtd device, and store it as a 'mac-address' property
+  * specified mtd device.
   *
 + * DT can tell the system to increment the mac-address after is extracted by
 + * using:
diff --git a/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch b/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch
new file mode 100644
index 0000000000..706a864070
--- /dev/null
+++ b/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch
@@ -0,0 +1,44 @@
+--- a/drivers/of/of_net.c
++++ b/drivers/of/of_net.c
+@@ -125,6 +125,33 @@ static void *of_get_mac_address_mtd(stru
+ #endif
+ }
+ 
++static int of_add_mac_address(struct device_node *np, u8* addr)
++{
++	struct property *prop;
++	u8 *np_addr;
++
++	np_addr = of_get_mac_addr(np, "mac-address");
++	if (np_addr) {
++		memcpy(np_addr, addr, ETH_ALEN);
++		return 0;
++	}
++
++	prop = kzalloc(sizeof(*prop), GFP_KERNEL);
++	if (!prop)
++		return 0;
++
++	prop->name = "mac-address";
++	prop->length = ETH_ALEN;
++	prop->value = kmemdup(addr, ETH_ALEN, GFP_KERNEL);
++	if (!prop->value || of_add_property(np, prop))
++		goto free;
++
++	return 0;
++free:
++	kfree(prop->value);
++	kfree(prop);
++	return -ENOMEM;
++}
+ 
+ /**
+  * Search the device tree for the best MAC address to use.  'mac-address' is
+@@ -198,6 +225,7 @@ found:
+ 	if (!of_property_read_u32(np, "mac-address-increment", &mac_inc))
+ 		addr[inc_idx] += mac_inc;
+ 
++	of_add_mac_address(np, addr);
+ 	return addr;
+ }
+ EXPORT_SYMBOL(of_get_mac_address);


From lede-commits at lists.infradead.org  Wed Jul 28 23:51:10 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 02:51:10 -0400
Subject: [openwrt/openwrt] generic: fix compile-error for non-mtd platforms
In-Reply-To: <162754147073.26432.10723045831547369055@git-01.infra.openwrt.org>
References: <162754147073.26432.10723045831547369055@git-01.infra.openwrt.org>
Message-ID: <mailman.10921.1627541478.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9928236d16291cb7a7d40265454b6a23e9e03e7f

commit 9928236d16291cb7a7d40265454b6a23e9e03e7f
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Thu Jul 29 08:45:24 2021 +0200

    generic: fix compile-error for non-mtd platforms
    
    Fixes commit cd39aba402ea ("generic: write back netdev MAC-address to device-tree")
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 .../681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch | 7 ++++---
 .../682-of_net-add-mac-address-increment-support.patch             | 2 +-
 .../pending-5.10/683-of_net-add-mac-address-to-of-tree.patch       | 6 +++---
 .../681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch | 7 ++++---
 .../pending-5.4/682-of_net-add-mac-address-increment-support.patch | 2 +-
 .../pending-5.4/683-of_net-add-mac-address-to-of-tree.patch        | 6 +++---
 6 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
index 7d2267eb29..cc5cd96ead 100644
--- a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
+++ b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
@@ -34,7 +34,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  {
  	struct property *pp = of_find_property(np, name, NULL);
  
-@@ -78,6 +79,55 @@ static const void *of_get_mac_addr_nvmem
+@@ -78,6 +79,56 @@ static const void *of_get_mac_addr_nvmem
  	return mac;
  }
  
@@ -84,13 +84,14 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +
 +	return addr;
 +#endif
++	return NULL;
 +}
 +
 +
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
   * checked first, because that is supposed to contain to "most recent" MAC
-@@ -98,6 +148,10 @@ static const void *of_get_mac_addr_nvmem
+@@ -98,6 +149,10 @@ static const void *of_get_mac_addr_nvmem
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
   *
@@ -101,7 +102,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
   * Return: Will be a valid pointer on success and ERR_PTR in case of error.
  */
  const void *of_get_mac_address(struct device_node *np)
-@@ -116,6 +170,10 @@ const void *of_get_mac_address(struct de
+@@ -116,6 +171,10 @@ const void *of_get_mac_address(struct de
  	if (addr)
  		return addr;
  
diff --git a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
index 9032b9186c..2a72c7c94e 100644
--- a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
+++ b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
@@ -65,7 +65,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  {
  #ifdef CONFIG_MTD
  	struct platform_device *pdev = of_find_device_by_node(np);
-@@ -152,28 +157,54 @@ static const void *of_get_mac_address_mt
+@@ -153,28 +158,54 @@ static const void *of_get_mac_address_mt
   * If a mtd-mac-address property exists, try to fetch the MAC address from the
   * specified mtd device.
   *
diff --git a/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch b/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
index 3e331bac63..5d1f05af7f 100644
--- a/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
+++ b/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
@@ -1,7 +1,7 @@
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
-@@ -132,6 +132,33 @@ static void *of_get_mac_address_mtd(stru
- #endif
+@@ -133,6 +133,33 @@ static void *of_get_mac_address_mtd(stru
+ 	return NULL;
  }
  
 +static int of_add_mac_address(struct device_node *np, u8* addr)
@@ -34,7 +34,7 @@
  
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
-@@ -205,6 +232,7 @@ found:
+@@ -206,6 +233,7 @@ found:
  	if (!of_property_read_u32(np, "mac-address-increment", &mac_inc))
  		addr[inc_idx] += mac_inc;
  
diff --git a/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
index b6ac24abcd..a890501933 100644
--- a/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
+++ b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
@@ -34,7 +34,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  {
  	struct property *pp = of_find_property(np, name, NULL);
  
-@@ -72,6 +73,55 @@ static const void *of_get_mac_addr_nvmem
+@@ -72,6 +73,56 @@ static const void *of_get_mac_addr_nvmem
  	return mac;
  }
  
@@ -84,13 +84,14 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +
 +	return addr;
 +#endif
++	return NULL;
 +}
 +
 +
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
   * checked first, because that is supposed to contain to "most recent" MAC
-@@ -92,6 +142,10 @@ static const void *of_get_mac_addr_nvmem
+@@ -92,6 +143,10 @@ static const void *of_get_mac_addr_nvmem
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
   *
@@ -101,7 +102,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
   * Return: Will be a valid pointer on success and ERR_PTR in case of error.
  */
  const void *of_get_mac_address(struct device_node *np)
-@@ -110,6 +164,10 @@ const void *of_get_mac_address(struct de
+@@ -110,6 +165,10 @@ const void *of_get_mac_address(struct de
  	if (addr)
  		return addr;
  
diff --git a/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
index 120ef52ff8..2a3f7da222 100644
--- a/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
+++ b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
@@ -65,7 +65,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  {
  #ifdef CONFIG_MTD
  	struct platform_device *pdev = of_find_device_by_node(np);
-@@ -146,28 +151,54 @@ static const void *of_get_mac_address_mt
+@@ -147,28 +152,54 @@ static const void *of_get_mac_address_mt
   * If a mtd-mac-address property exists, try to fetch the MAC address from the
   * specified mtd device.
   *
diff --git a/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch b/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch
index 706a864070..151fd2b0a9 100644
--- a/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch
+++ b/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch
@@ -1,7 +1,7 @@
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
-@@ -125,6 +125,33 @@ static void *of_get_mac_address_mtd(stru
- #endif
+@@ -127,6 +127,33 @@ static void *of_get_mac_address_mtd(stru
+ 	return NULL;
  }
  
 +static int of_add_mac_address(struct device_node *np, u8* addr)
@@ -34,7 +34,7 @@
  
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
-@@ -198,6 +225,7 @@ found:
+@@ -200,6 +227,7 @@ found:
  	if (!of_property_read_u32(np, "mac-address-increment", &mac_inc))
  		addr[inc_idx] += mac_inc;
  


From lede-commits at lists.infradead.org  Thu Jul 29 06:04:38 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 09:04:38 -0400
Subject: [openwrt/openwrt]  kernel: fix bgmac compilation in kernel 5.10
In-Reply-To: <162756387846.1689.9133267633563147793@git-01.infra.openwrt.org>
References: <162756387846.1689.9133267633563147793@git-01.infra.openwrt.org>
Message-ID: <mailman.10991.1627563882.1072.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5be1c022fee1c67e7553e45ee641e276319cbb66

commit 5be1c022fee1c67e7553e45ee641e276319cbb66
Author: Rafa? Mi?ecki <rafal at milecki.pl>
AuthorDate: Thu Jul 29 13:48:41 2021 +0200

    kernel: fix bgmac compilation in kernel 5.10
    
    It's required since upstream kernel commit 4bdc0d676a64 ("remove
    ioremap_nocache and devm_ioremap_nocache").
    
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 target/linux/generic/hack-5.10/773-bgmac-add-srab-switch.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/generic/hack-5.10/773-bgmac-add-srab-switch.patch b/target/linux/generic/hack-5.10/773-bgmac-add-srab-switch.patch
index 1c1b727ab7..d0de01fe5b 100644
--- a/target/linux/generic/hack-5.10/773-bgmac-add-srab-switch.patch
+++ b/target/linux/generic/hack-5.10/773-bgmac-add-srab-switch.patch
@@ -55,7 +55,7 @@ Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
  	net_dev->max_mtu = BGMAC_RX_MAX_FRAME_SIZE - ETH_FCS_LEN;
  
 +	if ((bgmac->feature_flags & BGMAC_FEAT_SRAB) && !bgmac_b53_pdata.regs) {
-+		bgmac_b53_pdata.regs = ioremap_nocache(0x18007000, 0x1000);
++		bgmac_b53_pdata.regs = ioremap(0x18007000, 0x1000);
 +
 +		err = platform_device_register(&bgmac_b53_dev);
 +		if (!err)


From lede-commits at lists.infradead.org  Thu Jul 29 06:04:40 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 09:04:40 -0400
Subject: [openwrt/openwrt]  bcm53xx: refresh kernel 5.10 config
In-Reply-To: <162756387846.1689.9133267633563147793@git-01.infra.openwrt.org>
References: <162756387846.1689.9133267633563147793@git-01.infra.openwrt.org>
Message-ID: <mailman.10994.1627563882.1072.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e88ab3b6292a78dd8a21436dfae78f8bfcfd82b0

commit e88ab3b6292a78dd8a21436dfae78f8bfcfd82b0
Author: Rafa? Mi?ecki <rafal at milecki.pl>
AuthorDate: Thu Jul 29 14:53:29 2021 +0200

    bcm53xx: refresh kernel 5.10 config
    
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 target/linux/bcm53xx/config-5.10 | 88 ++++++----------------------------------
 1 file changed, 12 insertions(+), 76 deletions(-)

diff --git a/target/linux/bcm53xx/config-5.10 b/target/linux/bcm53xx/config-5.10
index 1f5e7c7fc3..895d9e84e9 100644
--- a/target/linux/bcm53xx/config-5.10
+++ b/target/linux/bcm53xx/config-5.10
@@ -5,23 +5,6 @@ CONFIG_ARCH_BCM_5301X=y
 CONFIG_ARCH_BCM_53573=y
 # CONFIG_ARCH_BCM_HR2 is not set
 CONFIG_ARCH_BCM_IPROC=y
-CONFIG_ARCH_CLOCKSOURCE_DATA=y
-CONFIG_ARCH_HAS_BINFMT_FLAT=y
-CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
-CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
-CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
-CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
-CONFIG_ARCH_HAS_KCOV=y
-CONFIG_ARCH_HAS_KEEPINITRD=y
-CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
-CONFIG_ARCH_HAS_PHYS_TO_DMA=y
-CONFIG_ARCH_HAS_SETUP_DMA_OPS=y
-CONFIG_ARCH_HAS_SET_MEMORY=y
-CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
-CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
-CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y
-CONFIG_ARCH_HAS_TICK_BROADCAST=y
-CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_ARCH_KEEP_MEMBLOCK=y
 CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
@@ -31,14 +14,9 @@ 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_SUPPORTS_ATOMIC_RMW=y
-CONFIG_ARCH_SUPPORTS_UPROBES=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_USE_BUILTIN_BSWAP=y
-CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
-CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
-CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
-CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y
 CONFIG_ARM=y
 CONFIG_ARM_AMBA=y
 CONFIG_ARM_APPENDED_DTB=y
@@ -86,7 +64,6 @@ CONFIG_BLK_MQ_PCI=y
 CONFIG_BOUNCE=y
 CONFIG_BROADCOM_PHY=y
 CONFIG_CACHE_L2X0=y
-CONFIG_CC_HAS_KASAN_GENERIC=y
 CONFIG_CLKDEV_LOOKUP=y
 CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y
 CONFIG_CLKSRC_MMIO=y
@@ -113,15 +90,10 @@ CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V7=y
 CONFIG_CPU_V7=y
 CONFIG_CRC16=y
-CONFIG_CRYPTO_ACOMP2=y
-CONFIG_CRYPTO_AEAD=y
-CONFIG_CRYPTO_AEAD2=y
 CONFIG_CRYPTO_DEFLATE=y
-CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_GF128MUL=y
 CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_MANAGER=y
-CONFIG_CRYPTO_MANAGER2=y
 CONFIG_CRYPTO_NULL2=y
 CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_ZSTD=y
@@ -132,12 +104,12 @@ CONFIG_DEBUG_LL=y
 CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
 CONFIG_DEBUG_MISC=y
 CONFIG_DEBUG_UART_8250=y
-# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
 CONFIG_DEBUG_UART_8250_SHIFT=0
 CONFIG_DEBUG_UART_PHYS=0x18000300
 CONFIG_DEBUG_UART_VIRT=0xf1000300
 CONFIG_DEBUG_UNCOMPRESS=y
 CONFIG_DEBUG_USER=y
+CONFIG_DMA_OPS=y
 CONFIG_DMA_REMAP=y
 CONFIG_DTC=y
 CONFIG_EARLY_PRINTK=y
@@ -155,6 +127,7 @@ CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
 CONFIG_GENERIC_CPU_AUTOPROBE=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
@@ -169,59 +142,20 @@ 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=y
 CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_GPIO_74X164=y
+CONFIG_GPIO_BCM_XGS_IPROC=y
+CONFIG_GPIO_GENERIC=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_ARCH_AUDITSYSCALL=y
-CONFIG_HAVE_ARCH_BITREVERSE=y
-CONFIG_HAVE_ARCH_JUMP_LABEL=y
-CONFIG_HAVE_ARCH_KGDB=y
-CONFIG_HAVE_ARCH_PFN_VALID=y
-CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
-CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
-CONFIG_HAVE_ARCH_TRACEHOOK=y
-CONFIG_HAVE_ARM_ARCH_TIMER=y
-CONFIG_HAVE_ARM_SCU=y
-CONFIG_HAVE_ARM_SMCCC=y
-CONFIG_HAVE_ARM_TWD=y
-CONFIG_HAVE_CLK=y
-CONFIG_HAVE_CLK_PREPARE=y
-CONFIG_HAVE_CONTEXT_TRACKING=y
-CONFIG_HAVE_COPY_THREAD_TLS=y
-CONFIG_HAVE_C_RECORDMCOUNT=y
-CONFIG_HAVE_DEBUG_KMEMLEAK=y
-CONFIG_HAVE_DMA_CONTIGUOUS=y
-CONFIG_HAVE_DYNAMIC_FTRACE=y
-CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
-CONFIG_HAVE_EBPF_JIT=y
-CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
-CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
-CONFIG_HAVE_FUNCTION_TRACER=y
-CONFIG_HAVE_IDE=y
-CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
-CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y
-CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
-CONFIG_HAVE_NET_DSA=y
-CONFIG_HAVE_OPROFILE=y
-CONFIG_HAVE_OPTPROBES=y
-CONFIG_HAVE_PCI=y
-CONFIG_HAVE_PERF_EVENTS=y
-CONFIG_HAVE_PERF_REGS=y
-CONFIG_HAVE_PERF_USER_STACK_DUMP=y
-CONFIG_HAVE_PROC_CPU=y
-CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
-CONFIG_HAVE_RSEQ=y
 CONFIG_HAVE_SMP=y
-CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
-CONFIG_HAVE_UID16=y
-CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
 CONFIG_HIGHMEM=y
 # CONFIG_HIGHPTE is not set
 CONFIG_HW_RANDOM=y
@@ -236,6 +170,7 @@ CONFIG_IRQ_DOMAIN_HIERARCHY=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
 CONFIG_LIBFDT=y
+CONFIG_LLD_VERSION=0
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_LOCK_SPIN_ON_OWNER=y
 CONFIG_LZO_COMPRESS=y
@@ -246,6 +181,7 @@ CONFIG_MDIO_BUS_MUX=y
 # CONFIG_MDIO_BUS_MUX_BCM_IPROC is not set
 CONFIG_MDIO_BUS_MUX_MMIOREG=y
 CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
 CONFIG_MEMFD_CREATE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
@@ -255,6 +191,7 @@ CONFIG_MTD_BCM47XXSFLASH=y
 CONFIG_MTD_BCM47XX_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_LINKSYS_NS=y
 CONFIG_MTD_PARSER_TRX=y
@@ -312,7 +249,6 @@ CONFIG_PWM_SYSFS=y
 CONFIG_RATIONAL=y
 CONFIG_RCU_NEED_SEGCBLIST=y
 CONFIG_RCU_STALL_COMMON=y
-CONFIG_REFCOUNT_FULL=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_RFS_ACCEL=y


From lede-commits at lists.infradead.org  Thu Jul 29 06:04:39 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 09:04:39 -0400
Subject: [openwrt/openwrt]  bcm53xx: add testing support for kernel 5.10
In-Reply-To: <162756387846.1689.9133267633563147793@git-01.infra.openwrt.org>
References: <162756387846.1689.9133267633563147793@git-01.infra.openwrt.org>
Message-ID: <mailman.10995.1627563887.1072.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/d8e8a2a8db1e671aff2623dbec8e47b36f956eb8

commit d8e8a2a8db1e671aff2623dbec8e47b36f956eb8
Author: Rafa? Mi?ecki <rafal at milecki.pl>
AuthorDate: Thu Jul 29 13:50:19 2021 +0200

    bcm53xx: add testing support for kernel 5.10
    
    It still requires fixing PCIe support:
    [    6.644699] pcie_iproc_bcma bcma0:7: host bridge /axi at 18000000/pcie at 12000 ranges:
    [    6.652217] pcie_iproc_bcma bcma0:7:   No bus range found for /axi at 18000000/pcie at 12000, using [bus 00-ff]
    [    6.661833] OF: /axi at 18000000/pcie at 12000: Missing device_type
    [    6.667622] pcie_iproc_bcma: probe of bcma0:7 failed with error -12
    [    6.673985] pcie_iproc_bcma bcma0:8: host bridge /axi at 18000000/pcie at 13000 ranges:
    [    6.681514] pcie_iproc_bcma bcma0:8:   No bus range found for /axi at 18000000/pcie at 13000, using [bus 00-ff]
    [    6.691137] pcie_iproc_bcma: probe of bcma0:8 failed with error -12
    [    6.697522] pcie_iproc_bcma bcma0:9: host bridge /axi at 18000000/pcie at 14000 ranges:
    [    6.705048] pcie_iproc_bcma bcma0:9:   No bus range found for /axi at 18000000/pcie at 14000, using [bus 00-ff]
    [    6.714669] pcie_iproc_bcma: probe of bcma0:9 failed with error -12
    
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 target/linux/bcm53xx/Makefile                      |   2 +-
 target/linux/bcm53xx/config-5.10                   | 369 +++++++++++++++++++++
 ...5301X-Linksys-EA9500-add-port-5-and-port-.patch |  47 +++
 ...CM5301X-Harmonize-EHCI-OHCI-DT-nodes-name.patch |  60 ++++
 ...dts-BCM5310X-Harmonize-xHCI-DT-nodes-name.patch |  29 ++
 ...5301X-Linksys-EA9500-add-fixed-partitions.patch |  71 ++++
 ...5301X-Use-corretc-pinctrl-compatible-for-.patch |  49 +++
 ...M5301X-Linksys-EA9500-make-use-of-pinctrl.patch |  61 ++++
 ...5301X-Disable-USB-3-PHY-on-devices-withou.patch |  94 ++++++
 ...M5301X-Enable-USB-3-PHY-on-Luxul-XWR-3150.patch |  30 ++
 ...BCM5301X-Update-Ethernet-switch-node-name.patch |  32 ++
 ...5301X-Add-a-default-compatible-for-switch.patch |  82 +++++
 ...5301X-Provide-defaults-ports-container-no.patch | 180 ++++++++++
 ...5301X-Describe-NVMEM-NVRAM-on-Linksys-Lux.patch | 136 ++++++++
 ...ts-BCM5301X-Fix-Linksys-EA9500-partitions.patch |  60 ++++
 ...dts-BCM5301X-Set-Linksys-EA9500-power-LED.patch |  27 ++
 ...01-dt-bindings-nvmem-add-Broadcom-s-NVRAM.patch |  56 ++++
 ...nvram-new-driver-exposing-Broadcom-s-NVRA.patch | 124 +++++++
 ...rs-trx-parse-firmware-MTD-partitions-only.patch |  43 +++
 ...-add-support-for-performing-fake-doorbell.patch | 137 ++++++++
 ...X-Disable-MMU-and-Dcache-during-decompres.patch | 101 ++++++
 ...BCM5301X-Update-Northstar-pinctrl-binding.patch |  31 ++
 ...310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch |  64 ++++
 ...-Add-power-button-for-Buffalo-WZR-1750DHP.patch |  20 ++
 ...M-dts-BCM5301X-Add-serial-to-the-bootargs.patch | 116 +++++++
 ...M-dts-BCM5301X-Describe-partition-formats.patch |  25 ++
 .../patches-5.10/331-Meraki-MR32-Status-LEDs.patch |  28 ++
 ...t-EOF-mark-and-erase-all-remaining-blocks.patch |  59 ++++
 ...ky-CPU-port-fixes-for-devices-not-using-p.patch |  53 +++
 ...bcm47xx_nvram-support-init-from-IO-memory.patch |  61 ++++
 ...nvram-provide-NVMEM-content-to-the-NVRAM-.patch |  31 ++
 .../patches-5.10/905-BCM53573-minor-hacks.patch    |  80 +++++
 32 files changed, 2357 insertions(+), 1 deletion(-)

diff --git a/target/linux/bcm53xx/Makefile b/target/linux/bcm53xx/Makefile
index bb356ff244..9457d68ee3 100644
--- a/target/linux/bcm53xx/Makefile
+++ b/target/linux/bcm53xx/Makefile
@@ -12,7 +12,7 @@ CPU_TYPE:=cortex-a9
 SUBTARGETS:=generic
 
 KERNEL_PATCHVER:=5.4
-KERNEL_TESTING_PATCHVER:=5.4
+KERNEL_TESTING_PATCHVER:=5.10
 
 define Target/Description
 	Build firmware images for Broadcom based BCM47xx/53xx routers with ARM CPU, *not* MIPS.
diff --git a/target/linux/bcm53xx/config-5.10 b/target/linux/bcm53xx/config-5.10
new file mode 100644
index 0000000000..1f5e7c7fc3
--- /dev/null
+++ b/target/linux/bcm53xx/config-5.10
@@ -0,0 +1,369 @@
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_BCM=y
+CONFIG_ARCH_BCM_5301X=y
+CONFIG_ARCH_BCM_53573=y
+# CONFIG_ARCH_BCM_HR2 is not set
+CONFIG_ARCH_BCM_IPROC=y
+CONFIG_ARCH_CLOCKSOURCE_DATA=y
+CONFIG_ARCH_HAS_BINFMT_FLAT=y
+CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
+CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
+CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
+CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
+CONFIG_ARCH_HAS_KCOV=y
+CONFIG_ARCH_HAS_KEEPINITRD=y
+CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
+CONFIG_ARCH_HAS_PHYS_TO_DMA=y
+CONFIG_ARCH_HAS_SETUP_DMA_OPS=y
+CONFIG_ARCH_HAS_SET_MEMORY=y
+CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
+CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
+CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS=y
+CONFIG_ARCH_HAS_TICK_BROADCAST=y
+CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=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_SUPPORTS_ATOMIC_RMW=y
+CONFIG_ARCH_SUPPORTS_UPROBES=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_USE_BUILTIN_BSWAP=y
+CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
+CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT=y
+CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
+CONFIG_ARCH_WANT_IPC_PARSE_VERSION=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_ERRATA_754322=y
+CONFIG_ARM_ERRATA_764369=y
+CONFIG_ARM_ERRATA_775420=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_GLOBAL_TIMER=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_ATAGS=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BCM47XX_NVRAM=y
+CONFIG_BCM47XX_SPROM=y
+CONFIG_BCM47XX_WDT=y
+CONFIG_BCMA=y
+CONFIG_BCMA_BLOCKIO=y
+CONFIG_BCMA_DEBUG=y
+CONFIG_BCMA_DRIVER_GMAC_CMN=y
+CONFIG_BCMA_DRIVER_GPIO=y
+CONFIG_BCMA_DRIVER_PCI=y
+CONFIG_BCMA_HOST_PCI=y
+CONFIG_BCMA_HOST_PCI_POSSIBLE=y
+CONFIG_BCMA_HOST_SOC=y
+CONFIG_BCMA_SFLASH=y
+# CONFIG_BCM_CYGNUS_PHY is not set
+CONFIG_BCM_NET_PHYLIB=y
+CONFIG_BCM_NS_THERMAL=y
+CONFIG_BCM_SR_THERMAL=y
+CONFIG_BGMAC=y
+CONFIG_BGMAC_BCMA=y
+# CONFIG_BGMAC_PLATFORM is not set
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BOUNCE=y
+CONFIG_BROADCOM_PHY=y
+CONFIG_CACHE_L2X0=y
+CONFIG_CC_HAS_KASAN_GENERIC=y
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y
+CONFIG_CLKSRC_MMIO=y
+# CONFIG_CLK_BCM_NS2 is not set
+CONFIG_CLK_BCM_NSP=y
+# CONFIG_CLK_BCM_SR is not set
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_IPROC=y
+CONFIG_COMPAT_32BIT_TIME=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_PABRT_V7=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SPECTRE=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_ACOMP2=y
+CONFIG_CRYPTO_AEAD=y
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+CONFIG_CRYPTO_NULL2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_ZSTD=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_BCM_5301X=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
+CONFIG_DEBUG_MISC=y
+CONFIG_DEBUG_UART_8250=y
+# CONFIG_DEBUG_UART_8250_FLOW_CONTROL is not set
+CONFIG_DEBUG_UART_8250_SHIFT=0
+CONFIG_DEBUG_UART_PHYS=0x18000300
+CONFIG_DEBUG_UART_VIRT=0xf1000300
+CONFIG_DEBUG_UNCOMPRESS=y
+CONFIG_DEBUG_USER=y
+CONFIG_DMA_REMAP=y
+CONFIG_DTC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EXTCON=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
+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_EARLY_IOREMAP=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_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_GPIOLIB=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_74X164=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_ARCH_AUDITSYSCALL=y
+CONFIG_HAVE_ARCH_BITREVERSE=y
+CONFIG_HAVE_ARCH_JUMP_LABEL=y
+CONFIG_HAVE_ARCH_KGDB=y
+CONFIG_HAVE_ARCH_PFN_VALID=y
+CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
+CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
+CONFIG_HAVE_ARCH_TRACEHOOK=y
+CONFIG_HAVE_ARM_ARCH_TIMER=y
+CONFIG_HAVE_ARM_SCU=y
+CONFIG_HAVE_ARM_SMCCC=y
+CONFIG_HAVE_ARM_TWD=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_CLK_PREPARE=y
+CONFIG_HAVE_CONTEXT_TRACKING=y
+CONFIG_HAVE_COPY_THREAD_TLS=y
+CONFIG_HAVE_C_RECORDMCOUNT=y
+CONFIG_HAVE_DEBUG_KMEMLEAK=y
+CONFIG_HAVE_DMA_CONTIGUOUS=y
+CONFIG_HAVE_DYNAMIC_FTRACE=y
+CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
+CONFIG_HAVE_EBPF_JIT=y
+CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
+CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_IDE=y
+CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
+CONFIG_HAVE_LD_DEAD_CODE_DATA_ELIMINATION=y
+CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
+CONFIG_HAVE_NET_DSA=y
+CONFIG_HAVE_OPROFILE=y
+CONFIG_HAVE_OPTPROBES=y
+CONFIG_HAVE_PCI=y
+CONFIG_HAVE_PERF_EVENTS=y
+CONFIG_HAVE_PERF_REGS=y
+CONFIG_HAVE_PERF_USER_STACK_DUMP=y
+CONFIG_HAVE_PROC_CPU=y
+CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
+CONFIG_HAVE_RSEQ=y
+CONFIG_HAVE_SMP=y
+CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
+CONFIG_HAVE_UID16=y
+CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
+CONFIG_HIGHMEM=y
+# CONFIG_HIGHPTE is not set
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_BCM2835=y
+CONFIG_HZ_FIXED=0
+CONFIG_HZ_PERIODIC=y
+CONFIG_INITRAMFS_SOURCE=""
+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_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MDIO_BCM_IPROC=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_BUS_MUX=y
+# CONFIG_MDIO_BUS_MUX_BCM_IPROC is not set
+CONFIG_MDIO_BUS_MUX_MMIOREG=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_MIGRATION=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MTD_BCM47XXSFLASH=y
+CONFIG_MTD_BCM47XX_PARTS=y
+CONFIG_MTD_NAND_BRCMNAND=y
+CONFIG_MTD_NAND_CORE=y
+CONFIG_MTD_NAND_ECC_SW_HAMMING=y
+CONFIG_MTD_OF_PARTS_LINKSYS_NS=y
+CONFIG_MTD_PARSER_TRX=y
+CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPLIT_SEAMA_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_NET_FLOW_LIMIT=y
+CONFIG_NR_CPUS=2
+CONFIG_NVMEM=y
+CONFIG_NVMEM_BRCM_NVRAM=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_OF_NET=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_PCI=y
+CONFIG_PCIE_IPROC=y
+CONFIG_PCIE_IPROC_BCMA=y
+# CONFIG_PCIE_IPROC_PLATFORM is not set
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+# CONFIG_PHY_BCM_NS_USB2 is not set
+# CONFIG_PHY_BCM_NS_USB3 is not set
+# CONFIG_PHY_BCM_SR_PCIE is not set
+CONFIG_PHY_BCM_SR_USB=y
+# CONFIG_PHY_BRCM_SATA is not set
+# CONFIG_PHY_NS2_USB_DRD is not set
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_IPROC_GPIO is not set
+CONFIG_PINCTRL_NS=y
+# CONFIG_PINCTRL_NS2_MUX is not set
+CONFIG_PWM=y
+CONFIG_PWM_BCM_IPROC=y
+CONFIG_PWM_SYSFS=y
+CONFIG_RATIONAL=y
+CONFIG_RCU_NEED_SEGCBLIST=y
+CONFIG_RCU_STALL_COMMON=y
+CONFIG_REFCOUNT_FULL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SMP=y
+CONFIG_SMP_ON_UP=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_BCM_QSPI=y
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_GPIO=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SRCU=y
+CONFIG_SWCONFIG=y
+CONFIG_SWCONFIG_B53=y
+CONFIG_SWCONFIG_B53_PHY_DRIVER=y
+CONFIG_SWCONFIG_B53_PHY_FIXUP=y
+CONFIG_SWCONFIG_B53_SRAB_DRIVER=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_OF=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_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+# CONFIG_VFP is not set
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XPS=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_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/bcm53xx/patches-5.10/030-v5.11-0001-ARM-dts-BCM5301X-Linksys-EA9500-add-port-5-and-port-.patch b/target/linux/bcm53xx/patches-5.10/030-v5.11-0001-ARM-dts-BCM5301X-Linksys-EA9500-add-port-5-and-port-.patch
new file mode 100644
index 0000000000..f0cfbf8e63
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/030-v5.11-0001-ARM-dts-BCM5301X-Linksys-EA9500-add-port-5-and-port-.patch
@@ -0,0 +1,47 @@
+From 1ca5f2430c4f9d85b98b8d6e5d93f8d4802faf8e Mon Sep 17 00:00:00 2001
+From: Vivek Unune <npcomplete13 at gmail.com>
+Date: Wed, 14 Oct 2020 15:27:27 -0400
+Subject: [PATCH] ARM: dts: BCM5301X: Linksys EA9500 add port 5 and port 7
+
+Add ports 5 and 7 which are connected to gmac cores 1 & 2.
+These will be disabled for now.
+
+Signed-off-by: Vivek Unune <npcomplete13 at gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ .../boot/dts/bcm47094-linksys-panamera.dts    | 24 +++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
++++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
+@@ -242,6 +242,30 @@
+ 			label = "wan";
+ 		};
+ 
++		port at 5 {
++			reg = <5>;
++			ethernet = <&gmac0>;
++			label = "cpu";
++			status = "disabled";
++
++			fixed-link {
++				speed = <1000>;
++				full-duplex;
++			};
++		};
++
++		port at 7 {
++			reg = <7>;
++			ethernet = <&gmac1>;
++			label = "cpu";
++			status = "disabled";
++
++			fixed-link {
++				speed = <1000>;
++				full-duplex;
++			};
++		};
++
+ 		port at 8 {
+ 			reg = <8>;
+ 			ethernet = <&gmac2>;
diff --git a/target/linux/bcm53xx/patches-5.10/030-v5.11-0002-ARM-dts-BCM5301X-Harmonize-EHCI-OHCI-DT-nodes-name.patch b/target/linux/bcm53xx/patches-5.10/030-v5.11-0002-ARM-dts-BCM5301X-Harmonize-EHCI-OHCI-DT-nodes-name.patch
new file mode 100644
index 0000000000..271257c669
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/030-v5.11-0002-ARM-dts-BCM5301X-Harmonize-EHCI-OHCI-DT-nodes-name.patch
@@ -0,0 +1,60 @@
+From 74abbfe99f43eb7466d26d9e48fbeb46b8f3d804 Mon Sep 17 00:00:00 2001
+From: Serge Semin <Sergey.Semin at baikalelectronics.ru>
+Date: Tue, 20 Oct 2020 14:59:37 +0300
+Subject: [PATCH] ARM: dts: BCM5301X: Harmonize EHCI/OHCI DT nodes name
+
+In accordance with the Generic EHCI/OHCI bindings the corresponding node
+name is suppose to comply with the Generic USB HCD DT schema, which
+requires the USB nodes to have the name acceptable by the regexp:
+"^usb(@.*)?" . Make sure the "generic-ehci" and "generic-ohci"-compatible
+nodes are correctly named.
+
+Signed-off-by: Serge Semin <Sergey.Semin at baikalelectronics.ru>
+Acked-by: Florian Fainelli <f.fainelli at gmail.com>
+Acked-by: Krzysztof Kozlowski <krzk at kernel.org>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm5301x.dtsi | 4 ++--
+ arch/arm/boot/dts/bcm53573.dtsi | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/arm/boot/dts/bcm5301x.dtsi
++++ b/arch/arm/boot/dts/bcm5301x.dtsi
+@@ -265,7 +265,7 @@
+ 
+ 			interrupt-parent = <&gic>;
+ 
+-			ehci: ehci at 21000 {
++			ehci: usb at 21000 {
+ 				#usb-cells = <0>;
+ 
+ 				compatible = "generic-ehci";
+@@ -287,7 +287,7 @@
+ 				};
+ 			};
+ 
+-			ohci: ohci at 22000 {
++			ohci: usb at 22000 {
+ 				#usb-cells = <0>;
+ 
+ 				compatible = "generic-ohci";
+--- a/arch/arm/boot/dts/bcm53573.dtsi
++++ b/arch/arm/boot/dts/bcm53573.dtsi
+@@ -135,7 +135,7 @@
+ 			#address-cells = <1>;
+ 			#size-cells = <1>;
+ 
+-			ehci: ehci at 4000 {
++			ehci: usb at 4000 {
+ 				compatible = "generic-ehci";
+ 				reg = <0x4000 0x1000>;
+ 				interrupt-parent = <&gic>;
+@@ -155,7 +155,7 @@
+ 				};
+ 			};
+ 
+-			ohci: ohci at d000 {
++			ohci: usb at d000 {
+ 				#usb-cells = <0>;
+ 
+ 				compatible = "generic-ohci";
diff --git a/target/linux/bcm53xx/patches-5.10/030-v5.11-0003-ARM-dts-BCM5310X-Harmonize-xHCI-DT-nodes-name.patch b/target/linux/bcm53xx/patches-5.10/030-v5.11-0003-ARM-dts-BCM5310X-Harmonize-xHCI-DT-nodes-name.patch
new file mode 100644
index 0000000000..08380d735c
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/030-v5.11-0003-ARM-dts-BCM5310X-Harmonize-xHCI-DT-nodes-name.patch
@@ -0,0 +1,29 @@
+From 4b650a20bdb5f9558007dd3055a17a1644a91c3e Mon Sep 17 00:00:00 2001
+From: Serge Semin <Sergey.Semin at baikalelectronics.ru>
+Date: Tue, 20 Oct 2020 14:59:46 +0300
+Subject: [PATCH] ARM: dts: BCM5310X: Harmonize xHCI DT nodes name
+
+In accordance with the Generic xHCI bindings the corresponding node
+name is suppose to comply with the Generic USB HCD DT schema, which
+requires the USB nodes to have the name acceptable by the regexp:
+"^usb(@.*)?" . Make sure the "generic-xhci"-compatible nodes are
+correctly named.
+
+Signed-off-by: Serge Semin <Sergey.Semin at baikalelectronics.ru>
+Acked-by: Krzysztof Kozlowski <krzk at kernel.org>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm5301x.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/bcm5301x.dtsi
++++ b/arch/arm/boot/dts/bcm5301x.dtsi
+@@ -318,7 +318,7 @@
+ 
+ 			interrupt-parent = <&gic>;
+ 
+-			xhci: xhci at 23000 {
++			xhci: usb at 23000 {
+ 				#usb-cells = <0>;
+ 
+ 				compatible = "generic-xhci";
diff --git a/target/linux/bcm53xx/patches-5.10/030-v5.11-0004-ARM-dts-BCM5301X-Linksys-EA9500-add-fixed-partitions.patch b/target/linux/bcm53xx/patches-5.10/030-v5.11-0004-ARM-dts-BCM5301X-Linksys-EA9500-add-fixed-partitions.patch
new file mode 100644
index 0000000000..c3fdd163d9
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/030-v5.11-0004-ARM-dts-BCM5301X-Linksys-EA9500-add-fixed-partitions.patch
@@ -0,0 +1,71 @@
+From bd9a01e28e5d1632528e531480b42d6e2c861d88 Mon Sep 17 00:00:00 2001
+From: Vivek Unune <npcomplete13 at gmail.com>
+Date: Sun, 1 Nov 2020 15:08:03 -0500
+Subject: [PATCH] ARM: dts: BCM5301X: Linksys EA9500 add fixed partitions
+
+This router has dual paritions to store trx firmware image and
+dual partitions for nvram. The second one in each of these cases acts
+as a backup store.
+
+When tested with OpenWrt, the default partition parser causes two issues:
+
+1. It labels both nvram partitions as nvram. In factory, second one is
+labeled devinfo.
+2. It parses second trx image and tries to create second 'linux' partition
+and fails with - cannot create duplicate 'linux' partition
+
+The following patch works around both of these issues.
+
+Signed-off-by: Vivek Unune <npcomplete13 at gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ .../boot/dts/bcm47094-linksys-panamera.dts    | 41 +++++++++++++++++++
+ 1 file changed, 41 insertions(+)
+
+--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
++++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
+@@ -292,3 +292,44 @@
+ &usb3_phy {
+ 	status = "okay";
+ };
++
++&nandcs {
++	partitions {
++		compatible = "fixed-partitions";
++		#address-cells = <1>;
++		#size-cells = <1>;
++
++		partition at 0 {
++			label = "boot";
++			reg = <0x0000000 0x0080000>;
++			read-only;
++		};
++
++		partition at 80000 {
++			label = "nvram";
++			reg = <0x080000 0x0100000>;
++		};
++
++		partition at 180000{
++			label = "devinfo";
++			reg = <0x0180000 0x080000>;
++		};
++
++		partition at 200000 {
++			label = "firmware";
++			reg = <0x0200000 0x01D00000>;
++			compatible = "brcm,trx";
++		};
++
++		partition at 1F00000 {
++			label = "failsafe";
++			reg = <0x01F00000 0x01D00000>;
++			read-only;
++		};
++
++		partition at 5200000 {
++			label = "system";
++			reg = <0x05200000 0x02E00000>;
++		};
++	};
++};
diff --git a/target/linux/bcm53xx/patches-5.10/030-v5.11-0005-ARM-dts-BCM5301X-Use-corretc-pinctrl-compatible-for-.patch b/target/linux/bcm53xx/patches-5.10/030-v5.11-0005-ARM-dts-BCM5301X-Use-corretc-pinctrl-compatible-for-.patch
new file mode 100644
index 0000000000..3796967936
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/030-v5.11-0005-ARM-dts-BCM5301X-Use-corretc-pinctrl-compatible-for-.patch
@@ -0,0 +1,49 @@
+From 2f34ae32f5e74096540cd7ce95bfd467cb74b21a Mon Sep 17 00:00:00 2001
+From: Vivek Unune <npcomplete13 at gmail.com>
+Date: Wed, 4 Nov 2020 15:29:51 -0500
+Subject: [PATCH] ARM: dts: BCM5301X: Use corretc pinctrl compatible for 4709x
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+BCM47094 version of pinmux uses different compatible and supports MDIO
+pinmux pins. Hence, use the correct compatible string and defines the
+MDIO pins group.
+
+Signed-off-by: Vivek Unune <npcomplete13 at gmail.com>
+Acked-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm47094.dtsi | 9 +++++++++
+ arch/arm/boot/dts/bcm5301x.dtsi | 2 +-
+ 2 files changed, 10 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/bcm47094.dtsi
++++ b/arch/arm/boot/dts/bcm47094.dtsi
+@@ -8,6 +8,15 @@
+ / {
+ };
+ 
++&pinctrl {
++	compatible = "brcm,bcm4709-pinmux";
++
++	pinmux_mdio: mdio {
++		groups = "mdio_grp";
++		function = "mdio";
++	};
++};
++
+ &usb3_phy {
+ 	compatible = "brcm,ns-bx-usb3-phy";
+ };
+--- a/arch/arm/boot/dts/bcm5301x.dtsi
++++ b/arch/arm/boot/dts/bcm5301x.dtsi
+@@ -428,7 +428,7 @@
+ 			#address-cells = <1>;
+ 			#size-cells = <1>;
+ 
+-			pin-controller at 1c0 {
++			pinctrl: pin-controller at 1c0 {
+ 				compatible = "brcm,bcm4708-pinmux";
+ 				reg = <0x1c0 0x24>;
+ 				reg-names = "cru_gpio_control";
diff --git a/target/linux/bcm53xx/patches-5.10/030-v5.11-0006-ARM-dts-BCM5301X-Linksys-EA9500-make-use-of-pinctrl.patch b/target/linux/bcm53xx/patches-5.10/030-v5.11-0006-ARM-dts-BCM5301X-Linksys-EA9500-make-use-of-pinctrl.patch
new file mode 100644
index 0000000000..785271546b
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/030-v5.11-0006-ARM-dts-BCM5301X-Linksys-EA9500-make-use-of-pinctrl.patch
@@ -0,0 +1,61 @@
+From c862059875cffc013ee27bf9759ac288224e7a14 Mon Sep 17 00:00:00 2001
+From: Vivek Unune <npcomplete13 at gmail.com>
+Date: Wed, 4 Nov 2020 15:29:52 -0500
+Subject: [PATCH] ARM: dts: BCM5301X: Linksys EA9500 make use of pinctrl
+
+Now that we have a pin controller, use that instead of manuplating the
+mdio/mdc pins directly. i.e. we no longer require the mdio-mii-mux
+
+Signed-off-by: Vivek Unune <npcomplete13 at gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ .../boot/dts/bcm47094-linksys-panamera.dts    | 26 +++----------------
+ 1 file changed, 4 insertions(+), 22 deletions(-)
+
+--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
++++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
+@@ -123,33 +123,13 @@
+ 		};
+ 	};
+ 
+-	mdio-bus-mux {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
++	mdio-bus-mux at 18003000 {
+ 
+ 		/* BIT(9) = 1 => external mdio */
+-		mdio_ext: mdio at 200 {
++		mdio at 200 {
+ 			reg = <0x200>;
+ 			#address-cells = <1>;
+ 			#size-cells = <0>;
+-		};
+-	};
+-
+-	mdio-mii-mux {
+-		compatible = "mdio-mux-mmioreg";
+-		mdio-parent-bus = <&mdio_ext>;
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-		reg = <0x1800c1c0 0x4>;
+-
+-		/* BIT(6) = mdc, BIT(7) = mdio */
+-		mux-mask = <0xc0>;
+-
+-		mdio-mii at 0 {
+-			/* Enable MII function */
+-			reg = <0x0>;
+-			#address-cells = <1>;
+-			#size-cells = <0>;
+ 
+ 			switch at 0  {
+ 				compatible = "brcm,bcm53125";
+@@ -159,6 +139,8 @@
+ 				reset-names = "robo_reset";
+ 				reg = <0>;
+ 				dsa,member = <1 0>;
++				pinctrl-names = "default";
++				pinctrl-0 = <&pinmux_mdio>;
+ 
+ 				ports {
+ 					#address-cells = <1>;
diff --git a/target/linux/bcm53xx/patches-5.10/030-v5.11-0008-ARM-dts-BCM5301X-Disable-USB-3-PHY-on-devices-withou.patch b/target/linux/bcm53xx/patches-5.10/030-v5.11-0008-ARM-dts-BCM5301X-Disable-USB-3-PHY-on-devices-withou.patch
new file mode 100644
index 0000000000..64415c14db
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/030-v5.11-0008-ARM-dts-BCM5301X-Disable-USB-3-PHY-on-devices-withou.patch
@@ -0,0 +1,94 @@
+From 632ddf978565378e7efb9ea77c0ba239ea66bfdc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Fri, 13 Nov 2020 11:09:19 +0100
+Subject: [PATCH] ARM: dts: BCM5301X: Disable USB 3 PHY on devices without USB
+ 3
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It seems pointless to have it enabled.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts       | 4 ----
+ arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts       | 4 ----
+ arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts | 4 ----
+ arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts      | 4 ----
+ arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts      | 4 ----
+ arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts | 4 ----
+ 6 files changed, 24 deletions(-)
+
+--- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
++++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
+@@ -57,10 +57,6 @@
+ 	status = "okay";
+ };
+ 
+-&usb3_phy {
+-	status = "okay";
+-};
+-
+ &srab {
+ 	status = "okay";
+ 
+--- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
++++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
+@@ -64,10 +64,6 @@
+ 	status = "okay";
+ };
+ 
+-&usb3_phy {
+-	status = "okay";
+-};
+-
+ &srab {
+ 	status = "okay";
+ 
+--- a/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
++++ b/arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts
+@@ -117,7 +117,3 @@
+ 		};
+ 	};
+ };
+-
+-&usb3_phy {
+-	status = "okay";
+-};
+--- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
++++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
+@@ -57,10 +57,6 @@
+ 	status = "okay";
+ };
+ 
+-&usb3_phy {
+-	status = "okay";
+-};
+-
+ &srab {
+ 	status = "okay";
+ 
+--- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
++++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
+@@ -105,10 +105,6 @@
+ 	status = "okay";
+ };
+ 
+-&usb3_phy {
+-	status = "okay";
+-};
+-
+ &srab {
+ 	status = "okay";
+ 
+--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
++++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
+@@ -126,7 +126,3 @@
+ &usb2 {
+ 	vcc-gpio = <&chipcommon 9 GPIO_ACTIVE_HIGH>;
+ };
+-
+-&usb3_phy {
+-	status = "okay";
+-};
diff --git a/target/linux/bcm53xx/patches-5.10/030-v5.11-0009-ARM-dts-BCM5301X-Enable-USB-3-PHY-on-Luxul-XWR-3150.patch b/target/linux/bcm53xx/patches-5.10/030-v5.11-0009-ARM-dts-BCM5301X-Enable-USB-3-PHY-on-Luxul-XWR-3150.patch
new file mode 100644
index 0000000000..5834e300f5
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/030-v5.11-0009-ARM-dts-BCM5301X-Enable-USB-3-PHY-on-Luxul-XWR-3150.patch
@@ -0,0 +1,30 @@
+From b2ab5e8697ef6591aeeda23be49e096705dbbda3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Fri, 13 Nov 2020 10:50:12 +0100
+Subject: [PATCH] ARM: dts: BCM5301X: Enable USB 3 PHY on Luxul XWR-3150
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This device has a functional USB 3 port so PHY is required.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Reported-by: kernel test robot <lkp at intel.com>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
+@@ -71,6 +71,10 @@
+ 	vcc-gpio = <&chipcommon 18 GPIO_ACTIVE_HIGH>;
+ };
+ 
++&usb3_phy {
++	status = "okay";
++};
++
+ &spi_nor {
+ 	status = "okay";
+ };
diff --git a/target/linux/bcm53xx/patches-5.10/030-v5.11-0010-ARM-dts-BCM5301X-Update-Ethernet-switch-node-name.patch b/target/linux/bcm53xx/patches-5.10/030-v5.11-0010-ARM-dts-BCM5301X-Update-Ethernet-switch-node-name.patch
new file mode 100644
index 0000000000..9165572b95
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/030-v5.11-0010-ARM-dts-BCM5301X-Update-Ethernet-switch-node-name.patch
@@ -0,0 +1,32 @@
+From f527cb6f3345f7faa8e61dd9f3c437437327428c Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli at gmail.com>
+Date: Mon, 9 Nov 2020 11:41:01 -0800
+Subject: [PATCH] ARM: dts: BCM5301X: Update Ethernet switch node name
+
+Update the switch unit name from srab to ethernet-switch, allowing us to
+fix warnings such as:
+
+  CHECK   arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dt.yaml
+arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dt.yaml:
+srab at 18007000: $nodename:0: 'srab at 18007000' does not match
+'^(ethernet-)?switch(@.*)?$'
+        From schema:
+Documentation/devicetree/bindings/net/dsa/b53.yaml
+
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm5301x.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/bcm5301x.dtsi
++++ b/arch/arm/boot/dts/bcm5301x.dtsi
+@@ -482,7 +482,7 @@
+ 		#thermal-sensor-cells = <0>;
+ 	};
+ 
+-	srab: srab at 18007000 {
++	srab: ethernet-switch at 18007000 {
+ 		compatible = "brcm,bcm5301x-srab";
+ 		reg = <0x18007000 0x1000>;
+ 
diff --git a/target/linux/bcm53xx/patches-5.10/030-v5.11-0011-ARM-dts-BCM5301X-Add-a-default-compatible-for-switch.patch b/target/linux/bcm53xx/patches-5.10/030-v5.11-0011-ARM-dts-BCM5301X-Add-a-default-compatible-for-switch.patch
new file mode 100644
index 0000000000..bb1ca592a6
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/030-v5.11-0011-ARM-dts-BCM5301X-Add-a-default-compatible-for-switch.patch
@@ -0,0 +1,82 @@
+From 953efcb0c0234f8c488ebd4090378e949d6ba78b Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli at gmail.com>
+Date: Mon, 9 Nov 2020 16:42:09 -0800
+Subject: [PATCH] ARM: dts: BCM5301X: Add a default compatible for switch node
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Provide a default compatible string which is based on the 53011 SRAB
+compatible by default. The 4709 and 47094 default to the 53012 SRAB
+compatible.
+
+This allows us to have sane defaults and silences the following
+warnings:
+
+arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dt.yaml:
+ethernet-switch at 18007000: compatible: 'oneOf' conditional failed, one
+must be fixed:
+        ['brcm,bcm5301x-srab'] is too short
+        'brcm,bcm5325' was expected
+        'brcm,bcm53115' was expected
+        'brcm,bcm53125' was expected
+        'brcm,bcm53128' was expected
+        'brcm,bcm5365' was expected
+        'brcm,bcm5395' was expected
+        'brcm,bcm5389' was expected
+        'brcm,bcm5397' was expected
+        'brcm,bcm5398' was expected
+        'brcm,bcm11360-srab' was expected
+        'brcm,bcm5301x-srab' is not one of ['brcm,bcm53010-srab',
+'brcm,bcm53011-srab', 'brcm,bcm53012-srab', 'brcm,bcm53018-srab',
+'brcm,bcm53019-srab']
+        'brcm,bcm5301x-srab' is not one of ['brcm,bcm11404-srab',
+'brcm,bcm11407-srab', 'brcm,bcm11409-srab', 'brcm,bcm58310-srab',
+'brcm,bcm58311-srab', 'brcm,bcm58313-srab']
+        'brcm,bcm5301x-srab' is not one of ['brcm,bcm58522-srab',
+'brcm,bcm58523-srab', 'brcm,bcm58525-srab', 'brcm,bcm58622-srab',
+'brcm,bcm58623-srab', 'brcm,bcm58625-srab', 'brcm,bcm88312-srab']
+        'brcm,bcm5301x-srab' is not one of ['brcm,bcm3384-switch',
+'brcm,bcm6328-switch', 'brcm,bcm6368-switch']
+        From schema:
+Documentation/devicetree/bindings/net/dsa/b53.yaml
+
+Acked-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm4709.dtsi  | 4 ++++
+ arch/arm/boot/dts/bcm47094.dtsi | 4 ++++
+ arch/arm/boot/dts/bcm5301x.dtsi | 2 +-
+ 3 files changed, 9 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/bcm4709.dtsi
++++ b/arch/arm/boot/dts/bcm4709.dtsi
+@@ -9,3 +9,7 @@
+ 	clock-frequency = <125000000>;
+ 	status = "okay";
+ };
++
++&srab {
++	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
++};
+--- a/arch/arm/boot/dts/bcm47094.dtsi
++++ b/arch/arm/boot/dts/bcm47094.dtsi
+@@ -25,3 +25,7 @@
+ 	clock-frequency = <125000000>;
+ 	status = "okay";
+ };
++
++&srab {
++	compatible = "brcm,bcm53012-srab", "brcm,bcm5301x-srab";
++};
+--- a/arch/arm/boot/dts/bcm5301x.dtsi
++++ b/arch/arm/boot/dts/bcm5301x.dtsi
+@@ -483,7 +483,7 @@
+ 	};
+ 
+ 	srab: ethernet-switch at 18007000 {
+-		compatible = "brcm,bcm5301x-srab";
++		compatible = "brcm,bcm53011-srab", "brcm,bcm5301x-srab";
+ 		reg = <0x18007000 0x1000>;
+ 
+ 		status = "disabled";
diff --git a/target/linux/bcm53xx/patches-5.10/030-v5.11-0012-ARM-dts-BCM5301X-Provide-defaults-ports-container-no.patch b/target/linux/bcm53xx/patches-5.10/030-v5.11-0012-ARM-dts-BCM5301X-Provide-defaults-ports-container-no.patch
new file mode 100644
index 0000000000..df868ba85f
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/030-v5.11-0012-ARM-dts-BCM5301X-Provide-defaults-ports-container-no.patch
@@ -0,0 +1,180 @@
+From fd577b41421bc24e2d04cab96d387301b649eb14 Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli at gmail.com>
+Date: Mon, 9 Nov 2020 17:20:17 -0800
+Subject: [PATCH] ARM: dts: BCM5301X: Provide defaults ports container node
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Provide an empty 'ports' container node with the correct #address-cells
+and #size-cells properties. This silences the following warning:
+
+arch/arm/boot/dts/bcm4708-asus-rt-ac56u.dt.yaml:
+ethernet-switch at 18007000: 'oneOf' conditional failed, one must be fixed:
+        'ports' is a required property
+        'ethernet-ports' is a required property
+        From schema:
+Documentation/devicetree/bindings/net/dsa/b53.yaml
+
+Acked-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts     | 3 ---
+ arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts     | 3 ---
+ arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts    | 3 ---
+ arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts    | 3 ---
+ arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts    | 3 ---
+ arch/arm/boot/dts/bcm47094-linksys-panamera.dts  | 3 ---
+ arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts    | 3 ---
+ arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts    | 3 ---
+ arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts    | 3 ---
+ arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 3 ---
+ arch/arm/boot/dts/bcm5301x.dtsi                  | 4 ++++
+ arch/arm/boot/dts/bcm953012er.dts                | 3 ---
+ 12 files changed, 4 insertions(+), 33 deletions(-)
+
+--- a/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
++++ b/arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts
+@@ -61,9 +61,6 @@
+ 	status = "okay";
+ 
+ 	ports {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+ 		port at 0 {
+ 			reg = <0>;
+ 			label = "poe";
+--- a/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
++++ b/arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts
+@@ -68,9 +68,6 @@
+ 	status = "okay";
+ 
+ 	ports {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+ 		port at 4 {
+ 			reg = <4>;
+ 			label = "lan";
+--- a/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
++++ b/arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts
+@@ -122,9 +122,6 @@
+ 	status = "okay";
+ 
+ 	ports {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+ 		port at 0 {
+ 			reg = <0>;
+ 			label = "lan4";
+--- a/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
++++ b/arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts
+@@ -61,9 +61,6 @@
+ 	status = "okay";
+ 
+ 	ports {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+ 		port at 4 {
+ 			reg = <4>;
+ 			label = "poe";
+--- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
++++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
+@@ -109,9 +109,6 @@
+ 	status = "okay";
+ 
+ 	ports {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+ 		port at 0 {
+ 			reg = <0>;
+ 			label = "lan4";
+--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
++++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
+@@ -201,9 +201,6 @@
+ 	dsa,member = <0 0>;
+ 
+ 	ports {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+ 		port at 1 {
+ 			reg = <1>;
+ 			label = "lan7";
+--- a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
+@@ -59,9 +59,6 @@
+ 	status = "okay";
+ 
+ 	ports {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+ 		port at 0 {
+ 			reg = <0>;
+ 			label = "poe";
+--- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
+@@ -57,9 +57,6 @@
+ 	status = "okay";
+ 
+ 	ports {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+ 		port at 0 {
+ 			reg = <0>;
+ 			label = "lan";
+--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
+@@ -108,9 +108,6 @@
+ 	status = "okay";
+ 
+ 	ports {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+ 		port at 0 {
+ 			reg = <0>;
+ 			label = "lan4";
+--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
+@@ -83,9 +83,6 @@
+ 	status = "okay";
+ 
+ 	ports {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+ 		port at 0 {
+ 			reg = <0>;
+ 			label = "lan4";
+--- a/arch/arm/boot/dts/bcm5301x.dtsi
++++ b/arch/arm/boot/dts/bcm5301x.dtsi
+@@ -489,6 +489,10 @@
+ 		status = "disabled";
+ 
+ 		/* ports are defined in board DTS */
++		ports {
++			#address-cells = <1>;
++			#size-cells = <0>;
++		};
+ 	};
+ 
+ 	rng: rng at 18004000 {
+--- a/arch/arm/boot/dts/bcm953012er.dts
++++ b/arch/arm/boot/dts/bcm953012er.dts
+@@ -69,9 +69,6 @@
+ 	status = "okay";
+ 
+ 	ports {
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+ 		port at 0 {
+ 			reg = <0>;
+ 			label = "port0";
diff --git a/target/linux/bcm53xx/patches-5.10/031-v5.13-0002-ARM-dts-BCM5301X-Describe-NVMEM-NVRAM-on-Linksys-Lux.patch b/target/linux/bcm53xx/patches-5.10/031-v5.13-0002-ARM-dts-BCM5301X-Describe-NVMEM-NVRAM-on-Linksys-Lux.patch
new file mode 100644
index 0000000000..136d221a97
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/031-v5.13-0002-ARM-dts-BCM5301X-Describe-NVMEM-NVRAM-on-Linksys-Lux.patch
@@ -0,0 +1,136 @@
+From 428ac8df021dd1cbcc693eb76636873d42327e5d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Wed, 10 Mar 2021 22:04:46 +0100
+Subject: [PATCH] ARM: dts: BCM5301X: Describe NVMEM NVRAM on Linksys & Luxul
+ routers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Provide access to NVRAM which contains device environment variables.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts  | 5 +++++
+ arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts    | 5 +++++
+ arch/arm/boot/dts/bcm4709-linksys-ea9200.dts     | 5 +++++
+ arch/arm/boot/dts/bcm47094-linksys-panamera.dts  | 5 +++++
+ arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts    | 5 +++++
+ arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts    | 5 +++++
+ arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts    | 5 +++++
+ arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts | 5 +++++
+ 8 files changed, 40 insertions(+)
+
+--- a/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts
++++ b/arch/arm/boot/dts/bcm4708-linksys-ea6300-v1.dts
+@@ -21,6 +21,11 @@
+ 		reg = <0x00000000 0x08000000>;
+ 	};
+ 
++	nvram at 1c080000 {
++		compatible = "brcm,nvram";
++		reg = <0x1c080000 0x180000>;
++	};
++
+ 	gpio-keys {
+ 		compatible = "gpio-keys";
+ 
+--- a/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
++++ b/arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts
+@@ -21,6 +21,11 @@
+ 		reg = <0x00000000 0x08000000>;
+ 	};
+ 
++	nvram at 1eff0000 {
++		compatible = "brcm,nvram";
++		reg = <0x1eff0000 0x10000>;
++	};
++
+ 	leds {
+ 		compatible = "gpio-leds";
+ 
+--- a/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts
++++ b/arch/arm/boot/dts/bcm4709-linksys-ea9200.dts
+@@ -22,6 +22,11 @@
+ 		      <0x88000000 0x08000000>;
+ 	};
+ 
++	nvram at 1c080000 {
++		compatible = "brcm,nvram";
++		reg = <0x1c080000 0x180000>;
++	};
++
+ 	gpio-keys {
+ 		compatible = "gpio-keys";
+ 		#address-cells = <1>;
+--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
++++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
+@@ -22,6 +22,11 @@
+ 		      <0x88000000 0x08000000>;
+ 	};
+ 
++	nvram at 1c080000 {
++		compatible = "brcm,nvram";
++		reg = <0x1c080000 0x100000>;
++	};
++
+ 	gpio-keys {
+ 		compatible = "gpio-keys";
+ 
+--- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
+@@ -22,6 +22,11 @@
+ 		      <0x88000000 0x18000000>;
+ 	};
+ 
++	nvram at 1eff0000 {
++		compatible = "brcm,nvram";
++		reg = <0x1eff0000 0x10000>;
++	};
++
+ 	leds {
+ 		compatible = "gpio-leds";
+ 
+--- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
+@@ -22,6 +22,11 @@
+ 		      <0x88000000 0x18000000>;
+ 	};
+ 
++	nvram at 1eff0000 {
++		compatible = "brcm,nvram";
++		reg = <0x1eff0000 0x10000>;
++	};
++
+ 	leds {
+ 		compatible = "gpio-leds";
+ 
+--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts
+@@ -22,6 +22,11 @@
+ 		      <0x88000000 0x08000000>;
+ 	};
+ 
++	nvram at 1eff0000 {
++		compatible = "brcm,nvram";
++		reg = <0x1eff0000 0x10000>;
++	};
++
+ 	leds {
+ 		compatible = "gpio-leds";
+ 
+--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
+@@ -22,6 +22,11 @@
+ 		      <0x88000000 0x18000000>;
+ 	};
+ 
++	nvram at 1eff0000 {
++		compatible = "brcm,nvram";
++		reg = <0x1eff0000 0x10000>;
++	};
++
+ 	leds {
+ 		compatible = "gpio-leds";
+ 
diff --git a/target/linux/bcm53xx/patches-5.10/031-v5.13-0003-ARM-dts-BCM5301X-Fix-Linksys-EA9500-partitions.patch b/target/linux/bcm53xx/patches-5.10/031-v5.13-0003-ARM-dts-BCM5301X-Fix-Linksys-EA9500-partitions.patch
new file mode 100644
index 0000000000..d52f46f979
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/031-v5.13-0003-ARM-dts-BCM5301X-Fix-Linksys-EA9500-partitions.patch
@@ -0,0 +1,60 @@
+From 1d3352aeed164ef73f05cf80ca001f11d2f3312d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Mon, 29 Mar 2021 07:54:30 +0200
+Subject: [PATCH] ARM: dts: BCM5301X: Fix Linksys EA9500 partitions
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Partitions are basically fixed indeed but firmware ones don't have
+hardcoded function ("firmware" vs "failsafe"). Actual function depends
+on bootloader configuration. Use a proper binding for that.
+
+While at it fix numbers formatting to avoid:
+arch/arm/boot/dts/bcm47094-linksys-panamera.dt.yaml: partitions: 'partition at 1F00000' does not match any of the regexes: '^partition@[0-9a-f]+$', 'pinctrl-[0-9]+'
+        From schema: Documentation/devicetree/bindings/mtd/partitions/linksys,ns-partitions.yaml
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 16 +++++++---------
+ 1 file changed, 7 insertions(+), 9 deletions(-)
+
+--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
++++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
+@@ -279,7 +279,7 @@
+ 
+ &nandcs {
+ 	partitions {
+-		compatible = "fixed-partitions";
++		compatible = "linksys,ns-partitions";
+ 		#address-cells = <1>;
+ 		#size-cells = <1>;
+ 
+@@ -300,20 +300,18 @@
+ 		};
+ 
+ 		partition at 200000 {
+-			label = "firmware";
+-			reg = <0x0200000 0x01D00000>;
+-			compatible = "brcm,trx";
++			reg = <0x0200000 0x01d00000>;
++			compatible = "linksys,ns-firmware", "brcm,trx";
+ 		};
+ 
+-		partition at 1F00000 {
+-			label = "failsafe";
+-			reg = <0x01F00000 0x01D00000>;
+-			read-only;
++		partition at 1f00000 {
++			reg = <0x01f00000 0x01d00000>;
++			compatible = "linksys,ns-firmware", "brcm,trx";
+ 		};
+ 
+ 		partition at 5200000 {
+ 			label = "system";
+-			reg = <0x05200000 0x02E00000>;
++			reg = <0x05200000 0x02e00000>;
+ 		};
+ 	};
+ };
diff --git a/target/linux/bcm53xx/patches-5.10/031-v5.13-0004-ARM-dts-BCM5301X-Set-Linksys-EA9500-power-LED.patch b/target/linux/bcm53xx/patches-5.10/031-v5.13-0004-ARM-dts-BCM5301X-Set-Linksys-EA9500-power-LED.patch
new file mode 100644
index 0000000000..76cb296422
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/031-v5.13-0004-ARM-dts-BCM5301X-Set-Linksys-EA9500-power-LED.patch
@@ -0,0 +1,27 @@
+From dcb56d61d5a8acca0a357cc603397bc0272ce4cb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Mon, 29 Mar 2021 10:04:09 +0200
+Subject: [PATCH] ARM: dts: BCM5301X: Set Linksys EA9500 power LED
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Set Linux default trigger to default on, just like it's normally done
+for power LEDs.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
+---
+ arch/arm/boot/dts/bcm47094-linksys-panamera.dts | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
++++ b/arch/arm/boot/dts/bcm47094-linksys-panamera.dts
+@@ -75,6 +75,7 @@
+ 		power {
+ 			label = "bcm53xx:white:power";
+ 			gpios = <&chipcommon 4 GPIO_ACTIVE_HIGH>;
++			linux,default-trigger = "default-on";
+ 		};
+ 
+ 		wifi-disabled {
diff --git a/target/linux/bcm53xx/patches-5.10/080-v5.13-0001-dt-bindings-nvmem-add-Broadcom-s-NVRAM.patch b/target/linux/bcm53xx/patches-5.10/080-v5.13-0001-dt-bindings-nvmem-add-Broadcom-s-NVRAM.patch
new file mode 100644
index 0000000000..01e29aaad6
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/080-v5.13-0001-dt-bindings-nvmem-add-Broadcom-s-NVRAM.patch
@@ -0,0 +1,56 @@
+From c39edb9f9dcb6c8a0ba0ebf5df9e0ac93ab94b82 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Fri, 5 Mar 2021 19:32:35 +0100
+Subject: [PATCH] dt-bindings: nvmem: add Broadcom's NVRAM
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Broadcom's NVRAM structure contains device data and can be accessed
+using I/O mapping.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Reviewed-by: Rob Herring <robh at kernel.org>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
+---
+ .../devicetree/bindings/nvmem/brcm,nvram.yaml | 34 +++++++++++++++++++
+ 1 file changed, 34 insertions(+)
+ create mode 100644 Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml
+
+--- /dev/null
++++ b/Documentation/devicetree/bindings/nvmem/brcm,nvram.yaml
+@@ -0,0 +1,34 @@
++# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
++%YAML 1.2
++---
++$id: http://devicetree.org/schemas/nvmem/brcm,nvram.yaml#
++$schema: http://devicetree.org/meta-schemas/core.yaml#
++
++title: Broadcom's NVRAM
++
++description: |
++  Broadcom's NVRAM is a structure containing device specific environment
++  variables. It is used for storing device configuration, booting parameters
++  and calibration data.
++
++  NVRAM can be accessed on Broadcom BCM47xx MIPS and Northstar ARM Cortex-A9
++  devices usiong I/O mapped memory.
++
++maintainers:
++  - Rafa? Mi?ecki <rafal at milecki.pl>
++
++allOf:
++  - $ref: "nvmem.yaml#"
++
++properties:
++  compatible:
++    const: brcm,nvram
++
++unevaluatedProperties: false
++
++examples:
++  - |
++    nvram at 1eff0000 {
++            compatible = "brcm,nvram";
++            reg = <0x1eff0000 0x10000>;
++    };
diff --git a/target/linux/bcm53xx/patches-5.10/080-v5.13-0002-nvmem-brcm_nvram-new-driver-exposing-Broadcom-s-NVRA.patch b/target/linux/bcm53xx/patches-5.10/080-v5.13-0002-nvmem-brcm_nvram-new-driver-exposing-Broadcom-s-NVRA.patch
new file mode 100644
index 0000000000..ac89ea4bc2
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/080-v5.13-0002-nvmem-brcm_nvram-new-driver-exposing-Broadcom-s-NVRA.patch
@@ -0,0 +1,124 @@
+From b152bbeb0282bfcf6f91d0d5befd7582c1c3fc23 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Fri, 5 Mar 2021 19:32:36 +0100
+Subject: [PATCH] nvmem: brcm_nvram: new driver exposing Broadcom's NVRAM
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This driver provides access to Broadcom's NVRAM.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
+---
+ drivers/nvmem/Kconfig      |  9 +++++
+ drivers/nvmem/Makefile     |  2 +
+ drivers/nvmem/brcm_nvram.c | 78 ++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 89 insertions(+)
+ create mode 100644 drivers/nvmem/brcm_nvram.c
+
+--- a/drivers/nvmem/Kconfig
++++ b/drivers/nvmem/Kconfig
+@@ -270,4 +270,13 @@ config SPRD_EFUSE
+ 	  This driver can also be built as a module. If so, the module
+ 	  will be called nvmem-sprd-efuse.
+ 
++
++config NVMEM_BRCM_NVRAM
++	tristate "Broadcom's NVRAM support"
++	depends on ARCH_BCM_5301X || COMPILE_TEST
++	depends on HAS_IOMEM
++	help
++	  This driver provides support for Broadcom's NVRAM that can be accessed
++	  using I/O mapping.
++
+ endif
+--- a/drivers/nvmem/Makefile
++++ b/drivers/nvmem/Makefile
+@@ -55,3 +55,5 @@ obj-$(CONFIG_NVMEM_ZYNQMP)	+= nvmem_zynq
+ nvmem_zynqmp_nvmem-y		:= zynqmp_nvmem.o
+ obj-$(CONFIG_SPRD_EFUSE)	+= nvmem_sprd_efuse.o
+ nvmem_sprd_efuse-y		:= sprd-efuse.o
++obj-$(CONFIG_NVMEM_BRCM_NVRAM)	+= nvmem_brcm_nvram.o
++nvmem_brcm_nvram-y		:= brcm_nvram.o
+--- /dev/null
++++ b/drivers/nvmem/brcm_nvram.c
+@@ -0,0 +1,78 @@
++// SPDX-License-Identifier: GPL-2.0-only
++/*
++ * Copyright (C) 2021 Rafa? Mi?ecki <rafal at milecki.pl>
++ */
++
++#include <linux/io.h>
++#include <linux/mod_devicetable.h>
++#include <linux/module.h>
++#include <linux/nvmem-provider.h>
++#include <linux/platform_device.h>
++
++struct brcm_nvram {
++	struct device *dev;
++	void __iomem *base;
++};
++
++static int brcm_nvram_read(void *context, unsigned int offset, void *val,
++			   size_t bytes)
++{
++	struct brcm_nvram *priv = context;
++	u8 *dst = val;
++
++	while (bytes--)
++		*dst++ = readb(priv->base + offset++);
++
++	return 0;
++}
++
++static int brcm_nvram_probe(struct platform_device *pdev)
++{
++	struct nvmem_config config = {
++		.name = "brcm-nvram",
++		.reg_read = brcm_nvram_read,
++	};
++	struct device *dev = &pdev->dev;
++	struct resource *res;
++	struct brcm_nvram *priv;
++
++	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
++	if (!priv)
++		return -ENOMEM;
++	priv->dev = dev;
++
++	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++	priv->base = devm_ioremap_resource(dev, res);
++	if (IS_ERR(priv->base))
++		return PTR_ERR(priv->base);
++
++	config.dev = dev;
++	config.priv = priv;
++	config.size = resource_size(res);
++
++	return PTR_ERR_OR_ZERO(devm_nvmem_register(dev, &config));
++}
++
++static const struct of_device_id brcm_nvram_of_match_table[] = {
++	{ .compatible = "brcm,nvram", },
++	{},
++};
++
++static struct platform_driver brcm_nvram_driver = {
++	.probe = brcm_nvram_probe,
++	.driver = {
++		.name = "brcm_nvram",
++		.of_match_table = brcm_nvram_of_match_table,
++	},
++};
++
++static int __init brcm_nvram_init(void)
++{
++	return platform_driver_register(&brcm_nvram_driver);
++}
++
++subsys_initcall_sync(brcm_nvram_init);
++
++MODULE_AUTHOR("Rafa? Mi?ecki");
++MODULE_LICENSE("GPL");
++MODULE_DEVICE_TABLE(of, brcm_nvram_of_match_table);
diff --git a/target/linux/bcm53xx/patches-5.10/140-mtd-parsers-trx-parse-firmware-MTD-partitions-only.patch b/target/linux/bcm53xx/patches-5.10/140-mtd-parsers-trx-parse-firmware-MTD-partitions-only.patch
new file mode 100644
index 0000000000..fa86303637
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/140-mtd-parsers-trx-parse-firmware-MTD-partitions-only.patch
@@ -0,0 +1,43 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Tue, 13 Apr 2021 18:25:20 +0200
+Subject: [PATCH] mtd: parsers: trx: parse "firmware" MTD partitions only
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Parsing every partition with "compatible" set to "brcm,trx" results in
+parsing both: firmware partition and failsafe partition on devices that
+implement failsafe booting. This affects e.g. Linksys EA9500 which has:
+
+partition at 200000 {
+	reg = <0x0200000 0x01d00000>;
+	compatible = "linksys,ns-firmware", "brcm,trx";
+};
+
+partition at 1f00000 {
+	reg = <0x01f00000 0x01d00000>;
+	compatible = "linksys,ns-firmware", "brcm,trx";
+};
+
+Check for MTD partition name "firmware" before parsing. Recently added
+ofpart_linksys_ns.c creates "firmware" and "failsafe" depending on
+bootloader setup.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+---
+ drivers/mtd/parsers/parser_trx.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/mtd/parsers/parser_trx.c
++++ b/drivers/mtd/parsers/parser_trx.c
+@@ -85,6 +85,10 @@ static int parser_trx_parse(struct mtd_i
+ 	uint8_t curr_part = 0, i = 0;
+ 	int err;
+ 
++	/* Don't parse any failsafe / backup partitions */
++	if (strcmp(mtd->name, "firmware"))
++		return -EINVAL;
++
+ 	parts = kcalloc(TRX_PARSER_MAX_PARTS, sizeof(struct mtd_partition),
+ 			GFP_KERNEL);
+ 	if (!parts)
diff --git a/target/linux/bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
new file mode 100644
index 0000000000..c64c94ed52
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
@@ -0,0 +1,137 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Sat, 1 Oct 2016 22:54:48 +0200
+Subject: [PATCH] usb: xhci: add support for performing fake doorbell
+
+Broadcom's Northstar XHCI controllers seem to need a special start
+procedure to work correctly. There isn't any official documentation of
+this, the problem is that controller doesn't detect any connected
+devices with default setup. Moreover connecting USB device to controller
+that doesn't run properly can cause SoC's watchdog issues.
+
+A workaround that was successfully tested on multiple devices is to
+perform a fake doorbell. This patch adds code for doing this and enables
+it on BCM4708 family.
+---
+ drivers/usb/host/xhci-plat.c |  6 +++++
+ drivers/usb/host/xhci.c      | 63 +++++++++++++++++++++++++++++++++++++++++---
+ drivers/usb/host/xhci.h      |  1 +
+ 3 files changed, 67 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/host/xhci-plat.c
++++ b/drivers/usb/host/xhci-plat.c
+@@ -87,6 +87,8 @@ static int xhci_priv_resume_quirk(struct
+ static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
+ {
+ 	struct xhci_plat_priv *priv = xhci_to_priv(xhci);
++	struct platform_device*pdev = to_platform_device(dev);
++	struct device_node *node = pdev->dev.of_node;
+ 
+ 	/*
+ 	 * As of now platform drivers don't provide MSI support so we ensure
+@@ -94,6 +96,9 @@ static void xhci_plat_quirks(struct devi
+ 	 * dev struct in order to setup MSI
+ 	 */
+ 	xhci->quirks |= XHCI_PLAT | priv->quirks;
++
++	if (node && of_machine_is_compatible("brcm,bcm4708"))
++		xhci->quirks |= XHCI_FAKE_DOORBELL;
+ }
+ 
+ /* called during probe() after chip reset completes */
+--- a/drivers/usb/host/xhci.c
++++ b/drivers/usb/host/xhci.c
+@@ -156,6 +156,49 @@ int xhci_start(struct xhci_hcd *xhci)
+ 	return ret;
+ }
+ 
++/**
++ * xhci_fake_doorbell - Perform a fake doorbell on a specified slot
++ *
++ * Some controllers require a fake doorbell to start correctly. Without that
++ * they simply don't detect any devices.
++ */
++static int xhci_fake_doorbell(struct xhci_hcd *xhci, int slot_id)
++{
++	u32 temp;
++
++	/* Alloc a virt device for that slot */
++	if (!xhci_alloc_virt_device(xhci, slot_id, NULL, GFP_NOIO)) {
++		xhci_warn(xhci, "Could not allocate xHCI USB device data structures\n");
++		return -ENOMEM;
++	}
++
++	/* Ring fake doorbell for slot_id ep 0 */
++	xhci_ring_ep_doorbell(xhci, slot_id, 0, 0);
++	usleep_range(1000, 1500);
++
++	/* Read the status to check if HSE is set or not */
++	temp = readl(&xhci->op_regs->status);
++
++	/* Clear HSE if set */
++	if (temp & STS_FATAL) {
++		xhci_dbg(xhci, "HSE problem detected, status: 0x%08x\n", temp);
++		temp &= ~0x1fff;
++		temp |= STS_FATAL;
++		writel(temp, &xhci->op_regs->status);
++		usleep_range(1000, 1500);
++		readl(&xhci->op_regs->status);
++	}
++
++	/* Free virt device */
++	xhci_free_virt_device(xhci, slot_id);
++
++	/* We're done if controller is already running */
++	if (readl(&xhci->op_regs->command) & CMD_RUN)
++		return 0;
++
++	return xhci_start(xhci);
++}
++
+ /*
+  * Reset a halted HC.
+  *
+@@ -608,10 +651,20 @@ static int xhci_init(struct usb_hcd *hcd
+ 
+ static int xhci_run_finished(struct xhci_hcd *xhci)
+ {
+-	if (xhci_start(xhci)) {
+-		xhci_halt(xhci);
+-		return -ENODEV;
++	int err;
++
++	err = xhci_start(xhci);
++	if (err) {
++		err = -ENODEV;
++		goto err_halt;
+ 	}
++
++	if (xhci->quirks & XHCI_FAKE_DOORBELL) {
++		err = xhci_fake_doorbell(xhci, 1);
++		if (err)
++			goto err_halt;
++	}
++
+ 	xhci->shared_hcd->state = HC_STATE_RUNNING;
+ 	xhci->cmd_ring_state = CMD_RING_STATE_RUNNING;
+ 
+@@ -621,6 +674,10 @@ static int xhci_run_finished(struct xhci
+ 	xhci_dbg_trace(xhci, trace_xhci_dbg_init,
+ 			"Finished xhci_run for USB3 roothub");
+ 	return 0;
++
++err_halt:
++	xhci_halt(xhci);
++	return err;
+ }
+ 
+ /*
+--- a/drivers/usb/host/xhci.h
++++ b/drivers/usb/host/xhci.h
+@@ -1880,6 +1880,7 @@ struct xhci_hcd {
+ #define XHCI_DISABLE_SPARSE	BIT_ULL(38)
+ #define XHCI_SG_TRB_CACHE_SIZE_QUIRK	BIT_ULL(39)
+ #define XHCI_NO_SOFT_RETRY	BIT_ULL(40)
++#define XHCI_FAKE_DOORBELL	BIT_ULL(41)
+ 
+ 	unsigned int		num_active_eps;
+ 	unsigned int		limit_active_eps;
diff --git a/target/linux/bcm53xx/patches-5.10/300-ARM-BCM5301X-Disable-MMU-and-Dcache-during-decompres.patch b/target/linux/bcm53xx/patches-5.10/300-ARM-BCM5301X-Disable-MMU-and-Dcache-during-decompres.patch
new file mode 100644
index 0000000000..034d5b52fc
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/300-ARM-BCM5301X-Disable-MMU-and-Dcache-during-decompres.patch
@@ -0,0 +1,101 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Wed, 24 Sep 2014 22:14:07 +0200
+Subject: [PATCH] ARM: BCM5301X: Disable MMU and Dcache during decompression
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Broadcom devices have broken CFE (bootloader) that leaves hardware in an
+invalid state. It causes problems with booting Linux. On Northstar
+devices kernel was randomly hanging in ~25% of tries during early init.
+Hangs used to happen at random places in the start_kernel. On BCM53573
+kernel doesn't even seem to start booting.
+
+To workaround this problem we need to do following very early:
+1) Clear 2 following bits in the SCTLR register:
+#define CR_M    (1 << 0)        /* MMU enable */
+#define CR_C    (1 << 2)        /* Dcache enable */
+2) Flush the whole D-cache
+3) Disable L2 cache
+
+Unfortunately this patch is not upstreamable as it does above things
+unconditionally. We can't check if we are running on Broadcom platform
+in any safe way and doing such hacks with ARCH_MULTI_V7 is unacceptable
+as it could break other devices support.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+---
+
+--- a/arch/arm/boot/compressed/Makefile
++++ b/arch/arm/boot/compressed/Makefile
+@@ -35,6 +35,11 @@ ifeq ($(CONFIG_ARCH_ACORN),y)
+ OBJS		+= ll_char_wr.o font.o
+ endif
+ 
++ifeq ($(CONFIG_ARCH_BCM_5301X),y)
++OBJS		+= head-bcm_5301x-mpcore.o
++OBJS		+= cache-v7-min.o
++endif
++
+ ifeq ($(CONFIG_ARCH_SA1100),y)
+ OBJS		+= head-sa1100.o
+ endif
+--- /dev/null
++++ b/arch/arm/boot/compressed/head-bcm_5301x-mpcore.S
+@@ -0,0 +1,37 @@
++/*
++ *
++ * Platform specific tweaks.  This is merged into head.S by the linker.
++ *
++ */
++
++#include <linux/linkage.h>
++#include <asm/assembler.h>
++#include <asm/cp15.h>
++
++		.section        ".start", "ax"
++
++/*
++ * This code section is spliced into the head code by the linker
++ */
++
++__plat_uncompress_start:
++
++	@ Preserve r8/r7 i.e. kernel entry values
++	mov	r12, r8
++
++	@ Clear MMU enable and Dcache enable bits
++	mrc	p15, 0, r0, c1, c0, 0		@ Read SCTLR
++	bic	r0, #CR_C|CR_M
++	mcr	p15, 0, r0, c1, c0, 0		@ Write SCTLR
++	nop
++
++	@ Call the cache invalidation routine
++	bl	v7_flush_dcache_all
++	nop
++	mov	r0,#0
++	ldr	r3, =0x19022000			@ L2 cache controller, control reg
++	str	r0, [r3, #0x100]		@ Disable L2 cache
++	nop
++
++	@ Restore
++	mov	r8, r12
+--- a/arch/arm/boot/compressed/cache-v7-min.S
++++ b/arch/arm/boot/compressed/cache-v7-min.S
+@@ -12,6 +12,7 @@
+ 
+ #include <linux/linkage.h>
+ #include <linux/init.h>
++#include <asm/assembler.h>
+ 
+ 	__INIT
+ 
+@@ -63,7 +64,7 @@ loop2:
+  ARM(	orr	r11, r11, r9, lsl r2	)	@ factor index number into r11
+  THUMB(	lsl	r6, r9, r2		)
+  THUMB(	orr	r11, r11, r6		)	@ factor index number into r11
+-	mcr	p15, 0, r11, c7, c14, 2		@ clean & invalidate by set/way
++	mcr     p15, 0, r11, c7, c6, 2		@ clean & invalidate by set/way
+ 	subs	r9, r9, #1			@ decrement the index
+ 	bge	loop2
+ 	subs	r4, r4, #1			@ decrement the way
diff --git a/target/linux/bcm53xx/patches-5.10/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch b/target/linux/bcm53xx/patches-5.10/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch
new file mode 100644
index 0000000000..e1a2d4ab9b
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/302-ARM-dts-BCM5301X-Update-Northstar-pinctrl-binding.patch
@@ -0,0 +1,31 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Subject: [PATCH] ARM: dts: BCM5301X: Update Northstar pinctrl binding
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+---
+
+--- a/arch/arm/boot/dts/bcm5301x.dtsi
++++ b/arch/arm/boot/dts/bcm5301x.dtsi
+@@ -422,16 +422,12 @@
+ 		#size-cells = <1>;
+ 
+ 		cru at 100 {
+-			compatible = "simple-bus";
++			compatible = "syscon", "simple-mfd";
+ 			reg = <0x100 0x1a4>;
+-			ranges;
+-			#address-cells = <1>;
+-			#size-cells = <1>;
+ 
+-			pinctrl: pin-controller at 1c0 {
++			pinctrl: pinctrl {
+ 				compatible = "brcm,bcm4708-pinmux";
+-				reg = <0x1c0 0x24>;
+-				reg-names = "cru_gpio_control";
++				offset = <0xc0>;
+ 
+ 				spi-pins {
+ 					groups = "spi_grp";
diff --git a/target/linux/bcm53xx/patches-5.10/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch b/target/linux/bcm53xx/patches-5.10/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch
new file mode 100644
index 0000000000..b0800e50ae
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/310-ARM-BCM5301X-Add-DT-for-Netgear-R7900.patch
@@ -0,0 +1,64 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5 at gmail.com>
+Subject: [PATCH] ARM: BCM5301X: Add DT for Netgear R7900
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
+---
+
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -106,6 +106,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \
+ 	bcm4709-buffalo-wxr-1900dhp.dtb \
+ 	bcm4709-linksys-ea9200.dtb \
+ 	bcm4709-netgear-r7000.dtb \
++	bcm4709-netgear-r7900.dtb \
+ 	bcm4709-netgear-r8000.dtb \
+ 	bcm4709-tplink-archer-c9-v1.dtb \
+ 	bcm47094-dlink-dir-885l.dtb \
+--- /dev/null
++++ b/arch/arm/boot/dts/bcm4709-netgear-r7900.dts
+@@ -0,0 +1,42 @@
++/*
++ * Broadcom BCM470X / BCM5301X ARM platform code.
++ * DTS for Netgear R7900
++ *
++ * Copyright (C) 2016 Rafa? Mi?ecki <zajec5 at gmail.com>
++ *
++ * Licensed under the GNU/GPL. See COPYING for details.
++ */
++
++/dts-v1/;
++
++#include "bcm4709.dtsi"
++#include "bcm5301x-nand-cs0-bch8.dtsi"
++
++/ {
++	compatible = "netgear,r7900", "brcm,bcm4709", "brcm,bcm4708";
++	model = "Netgear R7900";
++
++	chosen {
++		bootargs = "console=ttyS0,115200";
++	};
++
++	memory {
++		reg = <0x00000000 0x08000000
++		       0x88000000 0x08000000>;
++	};
++
++	axi at 18000000 {
++		usb3 at 23000 {
++			reg = <0x00023000 0x1000>;
++
++			#address-cells = <1>;
++			#size-cells = <1>;
++
++			vcc-gpio = <&chipcommon 0 GPIO_ACTIVE_HIGH>;
++		};
++	};
++};
++
++&uart0 {
++	status = "okay";
++};
diff --git a/target/linux/bcm53xx/patches-5.10/311-ARM-BCM5301X-Add-power-button-for-Buffalo-WZR-1750DHP.patch b/target/linux/bcm53xx/patches-5.10/311-ARM-BCM5301X-Add-power-button-for-Buffalo-WZR-1750DHP.patch
new file mode 100644
index 0000000000..b3cb5de048
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/311-ARM-BCM5301X-Add-power-button-for-Buffalo-WZR-1750DHP.patch
@@ -0,0 +1,20 @@
+From: Felix Fietkau <nbd at nbd.name>
+Subject: [PATCH] ARM: BCM5301X: Add power button for Buffalo WZR-1750DHP
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+--- a/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
++++ b/arch/arm/boot/dts/bcm4708-buffalo-wzr-1750dhp.dts
+@@ -100,6 +100,12 @@
+ 	gpio-keys {
+ 		compatible = "gpio-keys";
+ 
++		power {
++			label = "Power";
++			linux,code = <KEY_POWER>;
++			gpios = <&chipcommon 1 GPIO_ACTIVE_LOW>;
++		};
++
+ 		restart {
+ 			label = "Reset";
+ 			linux,code = <KEY_RESTART>;
diff --git a/target/linux/bcm53xx/patches-5.10/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch b/target/linux/bcm53xx/patches-5.10/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch
new file mode 100644
index 0000000000..f0d5d0cae4
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/320-ARM-dts-BCM5301X-Add-serial-to-the-bootargs.patch
@@ -0,0 +1,116 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Subject: [PATCH] ARM: dts: BCM5301X: Add serial= to the bootargs
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It's enough to have proper stdout-path for getting serial working but
+for some reason LEDE doesn't offer "Please press Enter to activate this
+console." unless ttyS0 is specified.
+
+This is a workaround to get serial working in LEDE.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+---
+
+--- a/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
++++ b/arch/arm/boot/dts/bcm47081-tplink-archer-c5-v2.dts
+@@ -12,7 +12,7 @@
+ 	model = "TP-LINK Archer C5 V2";
+ 
+ 	chosen {
+-		bootargs = "earlycon";
++		bootargs = "console=ttyS0,115200 earlycon";
+ 	};
+ 
+ 	memory at 0 {
+--- a/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts
+@@ -13,7 +13,7 @@
+ 	model = "Luxul ABR-4500 V1";
+ 
+ 	chosen {
+-		bootargs = "earlycon";
++		bootargs = "console=ttyS0,115200 earlycon";
+ 	};
+ 
+ 	memory at 0 {
+--- a/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts
+@@ -13,7 +13,7 @@
+ 	model = "Luxul XBR-4500 V1";
+ 
+ 	chosen {
+-		bootargs = "earlycon";
++		bootargs = "console=ttyS0,115200 earlycon";
+ 	};
+ 
+ 	memory at 0 {
+--- a/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-1440.dts
+@@ -12,7 +12,7 @@
+ 	model = "Luxul XAP-1440 V1";
+ 
+ 	chosen {
+-		bootargs = "earlycon";
++		bootargs = "console=ttyS0,115200 earlycon";
+ 	};
+ 
+ 	memory at 0 {
+--- a/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
++++ b/arch/arm/boot/dts/bcm47189-luxul-xap-810.dts
+@@ -12,7 +12,7 @@
+ 	model = "Luxul XAP-810 V1";
+ 
+ 	chosen {
+-		bootargs = "earlycon";
++		bootargs = "console=ttyS0,115200 earlycon";
+ 	};
+ 
+ 	memory at 0 {
+--- a/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts
+@@ -12,7 +12,7 @@
+ 	model = "Luxul XAP-1610 V1";
+ 
+ 	chosen {
+-		bootargs = "earlycon";
++		bootargs = "console=ttyS0,115200 earlycon";
+ 	};
+ 
+ 	memory at 0 {
+--- a/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts
+@@ -13,7 +13,7 @@
+ 	model = "Luxul XWR-3150 V1";
+ 
+ 	chosen {
+-		bootargs = "earlycon";
++		bootargs = "console=ttyS0,115200 earlycon";
+ 	};
+ 
+ 	memory at 0 {
+--- a/arch/arm/boot/dts/bcm47094-phicomm-k3.dts
++++ b/arch/arm/boot/dts/bcm47094-phicomm-k3.dts
+@@ -13,6 +13,10 @@
+ 	compatible = "phicomm,k3", "brcm,bcm47094", "brcm,bcm4708";
+ 	model = "Phicomm K3";
+ 
++	chosen {
++		bootargs = "console=ttyS0,115200";
++	};
++
+ 	memory at 0 {
+ 		device_type = "memory";
+ 		reg = <0x00000000 0x08000000>,
+--- a/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
++++ b/arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts
+@@ -13,7 +13,7 @@
+ 	model = "Luxul XWC-2000 V1";
+ 
+ 	chosen {
+-		bootargs = "earlycon";
++		bootargs = "console=ttyS0,115200 earlycon";
+ 	};
+ 
+ 	memory {
diff --git a/target/linux/bcm53xx/patches-5.10/321-ARM-dts-BCM5301X-Describe-partition-formats.patch b/target/linux/bcm53xx/patches-5.10/321-ARM-dts-BCM5301X-Describe-partition-formats.patch
new file mode 100644
index 0000000000..f2861177dd
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/321-ARM-dts-BCM5301X-Describe-partition-formats.patch
@@ -0,0 +1,25 @@
+From 7166207bd1d8c46d09d640d46afc685df9bb9083 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Thu, 22 Nov 2018 09:21:49 +0100
+Subject: [PATCH] ARM: dts: BCM5301X: Describe partition formats
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It's needed by OpenWrt for custom partitioning.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+---
+ arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
++++ b/arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts
+@@ -35,6 +35,7 @@
+ 				partition at 0 {
+ 					label = "firmware";
+ 					reg = <0x00000000 0x08000000>;
++					compatible = "seama";
+ 				};
+ 			};
+ 		};
diff --git a/target/linux/bcm53xx/patches-5.10/331-Meraki-MR32-Status-LEDs.patch b/target/linux/bcm53xx/patches-5.10/331-Meraki-MR32-Status-LEDs.patch
new file mode 100644
index 0000000000..fb78ee93c4
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/331-Meraki-MR32-Status-LEDs.patch
@@ -0,0 +1,28 @@
+From: Christian Lamparter <chunkeey at gmail.com>
+Date: Thu, 7 Jun 2018 19:29:12 +0200
+Subject: bcm53xx: add LED status label alias for Meraki MR32
+
+add an led-status alias label. This is used by OpenWrt's LED
+DTS lookup function to identifiy the indicator LED
+
+Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
+
+--- a/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
++++ b/arch/arm/boot/dts/bcm53016-meraki-mr32.dts
+@@ -27,6 +27,7 @@
+ 
+ 	aliases {
+ 		serial1 = &uart2;
++		led-status = &led_status;
+ 	};
+ 
+ 	leds {
+@@ -68,7 +69,7 @@
+ 			max-brightness = <255>;
+ 		};
+ 
+-		green {
++		led_status: green {
+ 			/* SYS-LED 1 - Tricolor */
+ 			function = LED_FUNCTION_POWER;
+ 			color = <LED_COLOR_ID_GREEN>;
diff --git a/target/linux/bcm53xx/patches-5.10/500-UBI-Detect-EOF-mark-and-erase-all-remaining-blocks.patch b/target/linux/bcm53xx/patches-5.10/500-UBI-Detect-EOF-mark-and-erase-all-remaining-blocks.patch
new file mode 100644
index 0000000000..ff9d6b0005
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/500-UBI-Detect-EOF-mark-and-erase-all-remaining-blocks.patch
@@ -0,0 +1,59 @@
+From 2a2af518266a29323cf30c3f9ba9ef2ceb1dd84b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5 at gmail.com>
+Date: Thu, 16 Oct 2014 20:52:16 +0200
+Subject: [PATCH] UBI: Detect EOF mark and erase all remaining blocks
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
+---
+ drivers/mtd/ubi/attach.c | 5 +++++
+ drivers/mtd/ubi/io.c     | 4 ++++
+ drivers/mtd/ubi/ubi.h    | 1 +
+ 3 files changed, 10 insertions(+)
+
+--- a/drivers/mtd/ubi/attach.c
++++ b/drivers/mtd/ubi/attach.c
+@@ -82,6 +82,9 @@ static int self_check_ai(struct ubi_devi
+ #define AV_ADD		BIT(1)
+ #define AV_FIND_OR_ADD	(AV_FIND | AV_ADD)
+ 
++/* Set on finding block with 0xdeadc0de, indicates erasing all blocks behind */
++bool erase_all_next;
++
+ /**
+  * find_or_add_av - internal function to find a volume, add a volume or do
+  *		    both (find and add if missing).
+@@ -1580,6 +1583,8 @@ int ubi_attach(struct ubi_device *ubi, i
+ 	if (!ai)
+ 		return -ENOMEM;
+ 
++	erase_all_next = false;
++
+ #ifdef CONFIG_MTD_UBI_FASTMAP
+ 	/* On small flash devices we disable fastmap in any case. */
+ 	if ((int)mtd_div_by_eb(ubi->mtd->size, ubi->mtd) <= UBI_FM_MAX_START) {
+--- a/drivers/mtd/ubi/io.c
++++ b/drivers/mtd/ubi/io.c
+@@ -710,6 +710,10 @@ int ubi_io_read_ec_hdr(struct ubi_device
+ 	}
+ 
+ 	magic = be32_to_cpu(ec_hdr->magic);
++	if (magic == 0xdeadc0de)
++		erase_all_next = true;
++	if (erase_all_next)
++		return read_err ? UBI_IO_FF_BITFLIPS : UBI_IO_FF;
+ 	if (magic != UBI_EC_HDR_MAGIC) {
+ 		if (mtd_is_eccerr(read_err))
+ 			return UBI_IO_BAD_HDR_EBADMSG;
+--- a/drivers/mtd/ubi/ubi.h
++++ b/drivers/mtd/ubi/ubi.h
+@@ -822,6 +822,7 @@ extern struct mutex ubi_devices_mutex;
+ extern struct blocking_notifier_head ubi_notifiers;
+ 
+ /* attach.c */
++extern bool erase_all_next;
+ struct ubi_ainf_peb *ubi_alloc_aeb(struct ubi_attach_info *ai, int pnum,
+ 				   int ec);
+ void ubi_free_aeb(struct ubi_attach_info *ai, struct ubi_ainf_peb *aeb);
diff --git a/target/linux/bcm53xx/patches-5.10/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch b/target/linux/bcm53xx/patches-5.10/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch
new file mode 100644
index 0000000000..a6d0f119ec
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/700-b53-add-hacky-CPU-port-fixes-for-devices-not-using-p.patch
@@ -0,0 +1,53 @@
+From 4abdde3ad6bc0b3b157c4bf6ec0bf139d11d07e8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5 at gmail.com>
+Date: Wed, 13 May 2015 14:13:28 +0200
+Subject: [PATCH] b53: add hacky CPU port fixes for devices not using port 5
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
+---
+ drivers/net/phy/b53/b53_common.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/net/phy/b53/b53_common.c
++++ b/drivers/net/phy/b53/b53_common.c
+@@ -28,6 +28,7 @@
+ #include <linux/of.h>
+ #include <linux/of_net.h>
+ #include <linux/platform_data/b53.h>
++#include <linux/of.h>
+ 
+ #include "b53_regs.h"
+ #include "b53_priv.h"
+@@ -1587,6 +1588,29 @@ static int b53_switch_init(struct b53_de
+ 			return ret;
+ 	}
+ 
++	/* Set correct CPU port */
++	if (of_machine_is_compatible("asus,rt-ac87u"))
++		sw_dev->cpu_port = 7;
++	else if (of_machine_is_compatible("netgear,r7900"))
++		sw_dev->cpu_port = 8;
++	else if (of_machine_is_compatible("netgear,r8000"))
++		sw_dev->cpu_port = 8;
++	else if (of_machine_is_compatible("netgear,r8500"))
++		sw_dev->cpu_port = 8;
++
++	/* Enable extra ports */
++	if (of_machine_is_compatible("tenda,ac9"))
++		dev->enabled_ports |= BIT(5);
++
++	/*
++	 * Workaround for devices using port 8 (connected to the 3rd iface).
++	 * For some reason it doesn't work (no packets on eth2).
++	 */
++	if (of_machine_is_compatible("netgear,r7900") ||
++	    of_machine_is_compatible("netgear,r8000") ||
++	    (of_machine_is_compatible("linksys,panamera") && dev->chip_id == BCM53012_DEVICE_ID))
++		sw_dev->cpu_port = 5;
++
+ 	dev->enabled_ports |= BIT(sw_dev->cpu_port);
+ 	sw_dev->ports = fls(dev->enabled_ports);
+ 
diff --git a/target/linux/bcm53xx/patches-5.10/800-0001-firmware-bcm47xx_nvram-support-init-from-IO-memory.patch b/target/linux/bcm53xx/patches-5.10/800-0001-firmware-bcm47xx_nvram-support-init-from-IO-memory.patch
new file mode 100644
index 0000000000..86792d6ebf
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/800-0001-firmware-bcm47xx_nvram-support-init-from-IO-memory.patch
@@ -0,0 +1,61 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Thu, 11 Mar 2021 08:24:44 +0100
+Subject: [PATCH] firmware: bcm47xx_nvram: support init from IO memory
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+---
+ drivers/firmware/broadcom/bcm47xx_nvram.c | 17 +++++++++++++++++
+ include/linux/bcm47xx_nvram.h             |  6 ++++++
+ 2 files changed, 23 insertions(+)
+
+--- a/drivers/firmware/broadcom/bcm47xx_nvram.c
++++ b/drivers/firmware/broadcom/bcm47xx_nvram.c
+@@ -110,6 +110,23 @@ found:
+ 	return 0;
+ }
+ 
++int bcm47xx_nvram_init_from_iomem(void __iomem *nvram_start, size_t res_size)
++{
++	if (nvram_len) {
++		pr_warn("nvram already initialized\n");
++		return -EEXIST;
++	}
++
++	if (!bcm47xx_nvram_is_valid(nvram_start)) {
++		pr_err("No valid NVRAM found\n");
++		return -ENOENT;
++	}
++
++	bcm47xx_nvram_copy(nvram_start, res_size);
++
++	return 0;
++}
++
+ /*
+  * On bcm47xx we need access to the NVRAM very early, so we can't use mtd
+  * subsystem to access flash. We can't even use platform device / driver to
+--- a/include/linux/bcm47xx_nvram.h
++++ b/include/linux/bcm47xx_nvram.h
+@@ -11,6 +11,7 @@
+ #include <linux/vmalloc.h>
+ 
+ #ifdef CONFIG_BCM47XX_NVRAM
++int bcm47xx_nvram_init_from_iomem(void __iomem *nvram_start, size_t res_size);
+ int bcm47xx_nvram_init_from_mem(u32 base, u32 lim);
+ int bcm47xx_nvram_getenv(const char *name, char *val, size_t val_len);
+ int bcm47xx_nvram_gpio_pin(const char *name);
+@@ -20,6 +21,11 @@ static inline void bcm47xx_nvram_release
+ 	vfree(nvram);
+ };
+ #else
++static inline int bcm47xx_nvram_init_from_iomem(void __iomem *nvram_start,
++						size_t res_size)
++{
++	return -ENOTSUPP;
++}
+ static inline int bcm47xx_nvram_init_from_mem(u32 base, u32 lim)
+ {
+ 	return -ENOTSUPP;
diff --git a/target/linux/bcm53xx/patches-5.10/800-0002-nvmem-brcm_nvram-provide-NVMEM-content-to-the-NVRAM-.patch b/target/linux/bcm53xx/patches-5.10/800-0002-nvmem-brcm_nvram-provide-NVMEM-content-to-the-NVRAM-.patch
new file mode 100644
index 0000000000..cf5952ad5f
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/800-0002-nvmem-brcm_nvram-provide-NVMEM-content-to-the-NVRAM-.patch
@@ -0,0 +1,31 @@
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Thu, 11 Mar 2021 08:26:14 +0100
+Subject: [PATCH] nvmem: brcm_nvram: provide NVMEM content to the NVRAM driver
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+---
+ drivers/nvmem/brcm_nvram.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/nvmem/brcm_nvram.c
++++ b/drivers/nvmem/brcm_nvram.c
+@@ -3,6 +3,7 @@
+  * Copyright (C) 2021 Rafa? Mi?ecki <rafal at milecki.pl>
+  */
+ 
++#include <linux/bcm47xx_nvram.h>
+ #include <linux/io.h>
+ #include <linux/mod_devicetable.h>
+ #include <linux/module.h>
+@@ -46,6 +47,8 @@ static int brcm_nvram_probe(struct platf
+ 	if (IS_ERR(priv->base))
+ 		return PTR_ERR(priv->base);
+ 
++	bcm47xx_nvram_init_from_iomem(priv->base, resource_size(res));
++
+ 	config.dev = dev;
+ 	config.priv = priv;
+ 	config.size = resource_size(res);
diff --git a/target/linux/bcm53xx/patches-5.10/905-BCM53573-minor-hacks.patch b/target/linux/bcm53xx/patches-5.10/905-BCM53573-minor-hacks.patch
new file mode 100644
index 0000000000..f47ea95c95
--- /dev/null
+++ b/target/linux/bcm53xx/patches-5.10/905-BCM53573-minor-hacks.patch
@@ -0,0 +1,80 @@
+From 6f1c62440eb6846cb8045d7a5480ec7bbe47c96f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Mon, 15 Aug 2016 10:30:41 +0200
+Subject: [PATCH] BCM53573 minor hacks
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+---
+
+--- a/arch/arm/boot/dts/bcm53573.dtsi
++++ b/arch/arm/boot/dts/bcm53573.dtsi
+@@ -54,6 +54,7 @@
+ 			     <GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+ 			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+ 			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
++		clocks = <&ilp>;
+ 	};
+ 
+ 	clocks {
+--- a/drivers/bcma/main.c
++++ b/drivers/bcma/main.c
+@@ -330,14 +330,6 @@ static int bcma_register_devices(struct
+ 	}
+ #endif
+ 
+-#ifdef CONFIG_BCMA_SFLASH
+-	if (bus->drv_cc.sflash.present) {
+-		err = platform_device_register(&bcma_sflash_dev);
+-		if (err)
+-			bcma_err(bus, "Error registering serial flash\n");
+-	}
+-#endif
+-
+ #ifdef CONFIG_BCMA_NFLASH
+ 	if (bus->drv_cc.nflash.present) {
+ 		err = platform_device_register(&bcma_nflash_dev);
+@@ -415,6 +407,14 @@ int bcma_bus_register(struct bcma_bus *b
+ 			bcma_register_core(bus, core);
+ 	}
+ 
++#ifdef CONFIG_BCMA_SFLASH
++	if (bus->drv_cc.sflash.present) {
++		err = platform_device_register(&bcma_sflash_dev);
++		if (err)
++			bcma_err(bus, "Error registering serial flash\n");
++	}
++#endif
++
+ 	/* Try to get SPROM */
+ 	err = bcma_sprom_get(bus);
+ 	if (err == -ENOENT) {
+--- a/drivers/clocksource/arm_arch_timer.c
++++ b/drivers/clocksource/arm_arch_timer.c
+@@ -14,6 +14,7 @@
+ #include <linux/smp.h>
+ #include <linux/cpu.h>
+ #include <linux/cpu_pm.h>
++#include <linux/clk.h>
+ #include <linux/clockchips.h>
+ #include <linux/clocksource.h>
+ #include <linux/interrupt.h>
+@@ -919,6 +920,16 @@ static void arch_timer_of_configure_rate
+ 	if (of_property_read_u32(np, "clock-frequency", &arch_timer_rate))
+ 		arch_timer_rate = rate;
+ 
++	/* Get clk rate through clk driver if present */
++	if (!arch_timer_rate) {
++		struct clk *clk = of_clk_get(np, 0);
++
++		if (!IS_ERR(clk)) {
++			if (!clk_prepare_enable(clk))
++				arch_timer_rate = clk_get_rate(clk);
++		}
++	}
++
+ 	/* Check the timer frequency. */
+ 	if (arch_timer_rate == 0)
+ 		pr_warn("frequency not available\n");


From lede-commits at lists.infradead.org  Thu Jul 29 07:15:57 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 10:15:57 -0400
Subject: [openwrt/openwrt] mediatek: mt7623: import patch to fix msi warning
In-Reply-To: <162756815768.16825.11540405400118437493@git-01.infra.openwrt.org>
References: <162756815768.16825.11540405400118437493@git-01.infra.openwrt.org>
Message-ID: <mailman.11016.1627568164.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e8e2b88f5feb852904598cbe8746cc5b3c0022ab

commit e8e2b88f5feb852904598cbe8746cc5b3c0022ab
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Wed Jul 28 23:18:01 2021 +0200

    mediatek: mt7623: import patch to fix msi warning
    
    The 1st generation MediaTek PCIe host bridge cannot handle Message
    Signaled Interrupts (MSIs). The core PCI code is not aware that MSI is
    not available. This results in warnings of the form:
    
    WARNING: CPU: 2 PID: 112 at include/linux/msi.h:219
      pci_msi_setup_msi_irqs.constprop.8+0x64/0x6c
    Modules linked in: ahci(+) libahci libata sd_mod scsi_mod
      gpio_button_hotplug
    CPU: 2 PID: 112 Comm: kmodloader Not tainted 5.10.52 #0
    Hardware name: Mediatek Cortex-A7 (Device Tree)
    
    Import patches that introduce the 'no_msi' attribute to signal missing
    MSI support to the core PCI.
    
    Refresh patches:
    - 000-spi-fix-fifo.patch
    - 330-mtk-bmt-support.patch
    - 510-net-mediatek-add-flow-offload-for-mt7623.patch
    - 601-PCI-mediatek-Use-regmap-to-get-shared-pcie-cfg-base.patch
    - 610-pcie-mediatek-fix-clearing-interrupt-status.patch
    - 700-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
    - 710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 ...probe-declare-its-reliance-on-msi-domains.patch | 34 +++++++++++++
 ...dges-declar-their-reliance-on-msi-domains.patch | 44 ++++++++++++++++
 ...3-advertise-lack-of-built-in-msi-handling.patch | 59 ++++++++++++++++++++++
 .../mediatek/patches-5.10/000-spi-fix-fifo.patch   |  7 +--
 .../patches-5.10/330-mtk-bmt-support.patch         |  4 +-
 ...-net-mediatek-add-flow-offload-for-mt7623.patch |  2 +-
 ...ek-Use-regmap-to-get-shared-pcie-cfg-base.patch | 12 ++---
 ...ie-mediatek-fix-clearing-interrupt-status.patch |  2 +-
 ...t-mtk_eth_soc-add-support-for-coherent-DM.patch |  2 +-
 ...cie-mediatek-add-support-for-coherent-DMA.patch |  2 +-
 10 files changed, 150 insertions(+), 18 deletions(-)

diff --git a/target/linux/generic/backport-5.10/820-v5.13-make-pci_host_common_probe-declare-its-reliance-on-msi-domains.patch b/target/linux/generic/backport-5.10/820-v5.13-make-pci_host_common_probe-declare-its-reliance-on-msi-domains.patch
new file mode 100644
index 0000000000..8ca2b78f74
--- /dev/null
+++ b/target/linux/generic/backport-5.10/820-v5.13-make-pci_host_common_probe-declare-its-reliance-on-msi-domains.patch
@@ -0,0 +1,34 @@
+From 9ec37efb87832b578d7972fc80b04d94f5d2bbe3 Mon Sep 17 00:00:00 2001
+From: Marc Zyngier <maz at kernel.org>
+Date: Tue, 30 Mar 2021 16:11:42 +0100
+Subject: PCI/MSI: Make pci_host_common_probe() declare its reliance on MSI
+ domains
+
+The generic PCI host driver relies on MSI domains for MSIs to
+be provided to its end-points. Make this dependency explicit.
+
+This cures the warnings occuring on arm/arm64 VMs when booted
+with PCI virtio devices and no MSI controller (no GICv3 ITS,
+for example).
+
+It is likely that other drivers will need to express the same
+dependency.
+
+Link: https://lore.kernel.org/r/20210330151145.997953-12-maz at kernel.org
+Signed-off-by: Marc Zyngier <maz at kernel.org>
+Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
+Acked-by: Bjorn Helgaas <bhelgaas at google.com>
+---
+ drivers/pci/controller/pci-host-common.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/pci/controller/pci-host-common.c
++++ b/drivers/pci/controller/pci-host-common.c
+@@ -77,6 +77,7 @@ int pci_host_common_probe(struct platfor
+ 
+ 	bridge->sysdata = cfg;
+ 	bridge->ops = (struct pci_ops *)&ops->pci_ops;
++	bridge->msi_domain = true;
+ 
+ 	platform_set_drvdata(pdev, bridge);
+ 
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
new file mode 100644
index 0000000000..9cf63af333
--- /dev/null
+++ b/target/linux/generic/backport-5.10/821-v5.13-let-pci-host-bridges-declar-their-reliance-on-msi-domains.patch
@@ -0,0 +1,44 @@
+From 94e89b145371b68fa0ea294855adebcd03e0522e Mon Sep 17 00:00:00 2001
+From: Marc Zyngier <maz at kernel.org>
+Date: Tue, 30 Mar 2021 16:11:41 +0100
+Subject: PCI/MSI: Let PCI host bridges declare their reliance on MSI domains
+
+There is a whole class of host bridges that cannot know whether
+MSIs will be provided or not, as they rely on other blocks
+to provide the MSI functionnality, using MSI domains.  This is
+the case for example on systems that use the ARM GIC architecture.
+
+Introduce a new attribute ('msi_domain') indicating that implicit
+dependency, and use this property to set the NO_MSI flag when
+no MSI domain is found at probe time.
+
+Link: https://lore.kernel.org/r/20210330151145.997953-11-maz at kernel.org
+Signed-off-by: Marc Zyngier <maz at kernel.org>
+Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
+Acked-by: Bjorn Helgaas <bhelgaas at google.com>
+---
+ drivers/pci/probe.c | 2 ++
+ include/linux/pci.h | 1 +
+ 2 files changed, 3 insertions(+)
+
+--- a/drivers/pci/probe.c
++++ b/drivers/pci/probe.c
+@@ -925,6 +925,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);
++	if (bridge->msi_domain && !dev_get_msi_domain(&bus->dev))
++		bus->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
+ 
+ 	if (!parent)
+ 		set_dev_node(bus->bridge, pcibus_to_node(bus));
+--- a/include/linux/pci.h
++++ b/include/linux/pci.h
+@@ -545,6 +545,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 */
++	unsigned int	msi_domain:1;		/* Bridge wants MSI domain */
+ 
+ 	/* Resource alignment requirements */
+ 	resource_size_t (*align_resource)(struct pci_dev *dev,
diff --git a/target/linux/generic/backport-5.10/822-v5.13-advertise-lack-of-built-in-msi-handling.patch b/target/linux/generic/backport-5.10/822-v5.13-advertise-lack-of-built-in-msi-handling.patch
new file mode 100644
index 0000000000..c11aedd814
--- /dev/null
+++ b/target/linux/generic/backport-5.10/822-v5.13-advertise-lack-of-built-in-msi-handling.patch
@@ -0,0 +1,59 @@
+From 645e9c38383d7fcde2784ee537fa18ec9bed54d9 Mon Sep 17 00:00:00 2001
+From: Thomas Gleixner <tglx at linutronix.de>
+Date: Tue, 30 Mar 2021 16:11:43 +0100
+Subject: PCI: mediatek: Advertise lack of built-in MSI handling
+
+Some Mediatek host bridges cannot handle MSIs, which is sad.
+This also results in an ugly warning at device probe time,
+as the core PCI code wasn't told that MSIs were not available.
+
+Advertise this fact to the rest of the core PCI code by
+using the 'msi_domain' attribute, which still opens the possibility
+for another block to provide the MSI functionnality.
+
+[maz: commit message, switched over to msi_domain attribute]
+
+Link: https://lore.kernel.org/r/20210330151145.997953-13-maz at kernel.org
+Reported-by: Frank Wunderlich <frank-w at public-files.de>
+Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
+Signed-off-by: Marc Zyngier <maz at kernel.org>
+Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
+Acked-by: Bjorn Helgaas <bhelgaas at google.com>
+---
+ drivers/pci/controller/pcie-mediatek.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/pci/controller/pcie-mediatek.c
++++ b/drivers/pci/controller/pcie-mediatek.c
+@@ -143,6 +143,7 @@ struct mtk_pcie_port;
+  * struct mtk_pcie_soc - differentiate between host generations
+  * @need_fix_class_id: whether this host's class ID needed to be fixed or not
+  * @need_fix_device_id: whether this host's device ID needed to be fixed or not
++ * @no_msi: Bridge has no MSI support, and relies on an external block
+  * @device_id: device ID which this host need to be fixed
+  * @ops: pointer to configuration access functions
+  * @startup: pointer to controller setting functions
+@@ -151,6 +152,7 @@ struct mtk_pcie_port;
+ struct mtk_pcie_soc {
+ 	bool need_fix_class_id;
+ 	bool need_fix_device_id;
++	bool no_msi;
+ 	unsigned int device_id;
+ 	struct pci_ops *ops;
+ 	int (*startup)(struct mtk_pcie_port *port);
+@@ -1087,6 +1089,7 @@ static int mtk_pcie_probe(struct platfor
+ 
+ 	host->ops = pcie->soc->ops;
+ 	host->sysdata = pcie;
++	host->msi_domain = pcie->soc->no_msi;
+ 
+ 	err = pci_host_probe(host);
+ 	if (err)
+@@ -1176,6 +1179,7 @@ static const struct dev_pm_ops mtk_pcie_
+ };
+ 
+ static const struct mtk_pcie_soc mtk_pcie_soc_v1 = {
++	.no_msi = true,
+ 	.ops = &mtk_pcie_ops,
+ 	.startup = mtk_pcie_startup_port,
+ };
diff --git a/target/linux/mediatek/patches-5.10/000-spi-fix-fifo.patch b/target/linux/mediatek/patches-5.10/000-spi-fix-fifo.patch
index a7ac93a208..7a1462fc92 100644
--- a/target/linux/mediatek/patches-5.10/000-spi-fix-fifo.patch
+++ b/target/linux/mediatek/patches-5.10/000-spi-fix-fifo.patch
@@ -18,11 +18,9 @@ Signed-off-by: Mark Brown <broonie at kernel.org>
  drivers/spi/spi-mt65xx.c | 16 +++++++++++++---
  1 file changed, 13 insertions(+), 3 deletions(-)
 
-diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
-index 976f73b9e2998..8d5fa7f1e5069 100644
 --- a/drivers/spi/spi-mt65xx.c
 +++ b/drivers/spi/spi-mt65xx.c
-@@ -427,13 +427,23 @@ static int mtk_spi_fifo_transfer(struct spi_master *master,
+@@ -434,13 +434,23 @@ static int mtk_spi_fifo_transfer(struct
  	mtk_spi_setup_packet(master);
  
  	cnt = xfer->len / 4;
@@ -49,6 +47,3 @@ index 976f73b9e2998..8d5fa7f1e5069 100644
  	}
  
  	mtk_spi_enable_transfer(master);
--- 
-cgit 1.2.3-1.el7
-
diff --git a/target/linux/mediatek/patches-5.10/330-mtk-bmt-support.patch b/target/linux/mediatek/patches-5.10/330-mtk-bmt-support.patch
index 504c602c50..699870fbd6 100644
--- a/target/linux/mediatek/patches-5.10/330-mtk-bmt-support.patch
+++ b/target/linux/mediatek/patches-5.10/330-mtk-bmt-support.patch
@@ -815,7 +815,7 @@
  
  static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
  {
-@@ -1139,6 +1140,8 @@ static int spinand_probe(struct spi_mem
+@@ -1140,6 +1141,8 @@ static int spinand_probe(struct spi_mem
  	if (ret)
  		return ret;
  
@@ -824,7 +824,7 @@
  	ret = mtd_device_register(mtd, NULL, 0);
  	if (ret)
  		goto err_spinand_cleanup;
-@@ -1164,6 +1167,7 @@ static int spinand_remove(struct spi_mem
+@@ -1165,6 +1168,7 @@ static int spinand_remove(struct spi_mem
  	if (ret)
  		return ret;
  
diff --git a/target/linux/mediatek/patches-5.10/510-net-mediatek-add-flow-offload-for-mt7623.patch b/target/linux/mediatek/patches-5.10/510-net-mediatek-add-flow-offload-for-mt7623.patch
index 27bc1a60b2..7585d6cf18 100644
--- a/target/linux/mediatek/patches-5.10/510-net-mediatek-add-flow-offload-for-mt7623.patch
+++ b/target/linux/mediatek/patches-5.10/510-net-mediatek-add-flow-offload-for-mt7623.patch
@@ -14,7 +14,7 @@ Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3272,6 +3272,7 @@ static const struct mtk_soc_data mt7623_
+@@ -3274,6 +3274,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/mediatek/patches-5.10/601-PCI-mediatek-Use-regmap-to-get-shared-pcie-cfg-base.patch b/target/linux/mediatek/patches-5.10/601-PCI-mediatek-Use-regmap-to-get-shared-pcie-cfg-base.patch
index 9c18565319..fea9486d30 100644
--- a/target/linux/mediatek/patches-5.10/601-PCI-mediatek-Use-regmap-to-get-shared-pcie-cfg-base.patch
+++ b/target/linux/mediatek/patches-5.10/601-PCI-mediatek-Use-regmap-to-get-shared-pcie-cfg-base.patch
@@ -150,7 +150,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu at mediatek.com>
  #include <linux/reset.h>
  
  #include "../pci.h"
-@@ -205,6 +207,7 @@ struct mtk_pcie_port {
+@@ -207,6 +209,7 @@ struct mtk_pcie_port {
   * struct mtk_pcie - PCIe host information
   * @dev: pointer to PCIe device
   * @base: IO mapped register base
@@ -158,7 +158,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu at mediatek.com>
   * @free_ck: free-run reference clock
   * @mem: non-prefetchable memory resource
   * @ports: pointer to PCIe port information
-@@ -213,6 +216,7 @@ struct mtk_pcie_port {
+@@ -215,6 +218,7 @@ struct mtk_pcie_port {
  struct mtk_pcie {
  	struct device *dev;
  	void __iomem *base;
@@ -166,7 +166,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu at mediatek.com>
  	struct clk *free_ck;
  
  	struct list_head ports;
-@@ -648,7 +652,7 @@ static int mtk_pcie_setup_irq(struct mtk
+@@ -650,7 +654,7 @@ static int mtk_pcie_setup_irq(struct mtk
  		return err;
  	}
  
@@ -175,7 +175,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu at mediatek.com>
  	if (port->irq < 0)
  		return port->irq;
  
-@@ -674,12 +678,11 @@ static int mtk_pcie_startup_port_v2(stru
+@@ -676,12 +680,11 @@ static int mtk_pcie_startup_port_v2(stru
  	if (!mem)
  		return -EINVAL;
  
@@ -193,7 +193,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu at mediatek.com>
  	}
  
  	/* Assert all reset signals */
-@@ -983,6 +986,7 @@ static int mtk_pcie_subsys_powerup(struc
+@@ -985,6 +988,7 @@ static int mtk_pcie_subsys_powerup(struc
  	struct device *dev = pcie->dev;
  	struct platform_device *pdev = to_platform_device(dev);
  	struct resource *regs;
@@ -201,7 +201,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu at mediatek.com>
  	int err;
  
  	/* get shared registers, which are optional */
-@@ -995,6 +999,13 @@ static int mtk_pcie_subsys_powerup(struc
+@@ -997,6 +1001,13 @@ static int mtk_pcie_subsys_powerup(struc
  		}
  	}
  
diff --git a/target/linux/mediatek/patches-5.10/610-pcie-mediatek-fix-clearing-interrupt-status.patch b/target/linux/mediatek/patches-5.10/610-pcie-mediatek-fix-clearing-interrupt-status.patch
index 7b74a8ac73..031582a788 100644
--- a/target/linux/mediatek/patches-5.10/610-pcie-mediatek-fix-clearing-interrupt-status.patch
+++ b/target/linux/mediatek/patches-5.10/610-pcie-mediatek-fix-clearing-interrupt-status.patch
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/pci/controller/pcie-mediatek.c
 +++ b/drivers/pci/controller/pcie-mediatek.c
-@@ -613,10 +613,10 @@ static void mtk_pcie_intr_handler(struct
+@@ -615,10 +615,10 @@ static void mtk_pcie_intr_handler(struct
  	if (status & INTX_MASK) {
  		for_each_set_bit_from(bit, &status, PCI_NUM_INTX + INTX_SHIFT) {
  			/* Clear the INTx */
diff --git a/target/linux/mediatek/patches-5.10/700-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch b/target/linux/mediatek/patches-5.10/700-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
index e131bfdf17..529a252d3b 100644
--- a/target/linux/mediatek/patches-5.10/700-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
+++ b/target/linux/mediatek/patches-5.10/700-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
@@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
  		ret = device_reset(eth->dev);
  		if (ret) {
-@@ -3074,6 +3082,16 @@ static int mtk_probe(struct platform_dev
+@@ -3076,6 +3084,16 @@ static int mtk_probe(struct platform_dev
  		}
  	}
  
diff --git a/target/linux/mediatek/patches-5.10/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch b/target/linux/mediatek/patches-5.10/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
index e3800bdf9d..71ed18e1ab 100644
--- a/target/linux/mediatek/patches-5.10/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
+++ b/target/linux/mediatek/patches-5.10/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
@@ -78,7 +78,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  struct mtk_pcie_port;
  
  /**
-@@ -1040,6 +1046,27 @@ static int mtk_pcie_setup(struct mtk_pci
+@@ -1042,6 +1048,27 @@ static int mtk_pcie_setup(struct mtk_pci
  	struct mtk_pcie_port *port, *tmp;
  	int err;
  


From lede-commits at lists.infradead.org  Thu Jul 29 11:49:22 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 14:49:22 -0400
Subject: [openwrt/openwrt]  generic: fix build warning
In-Reply-To: <162758456211.12928.13189045410755967269@git-01.infra.openwrt.org>
References: <162758456211.12928.13189045410755967269@git-01.infra.openwrt.org>
Message-ID: <mailman.11102.1627584577.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/a57d7c29a40ae5b691deafcc267652b918159bc0

commit a57d7c29a40ae5b691deafcc267652b918159bc0
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Thu Jul 29 20:28:10 2021 +0200

    generic: fix build warning
    
    Fixes a unused variable warning:
    
    drivers/of/of_net.c: In function 'of_get_mac_address_mtd':
    drivers/of/of_net.c:92:19: warning: unused variable 'prop' [-Wunused-variable]
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 .../681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch | 7 +++----
 .../682-of_net-add-mac-address-increment-support.patch             | 2 +-
 .../pending-5.10/683-of_net-add-mac-address-to-of-tree.patch       | 4 ++--
 .../681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch | 7 +++----
 .../pending-5.4/682-of_net-add-mac-address-increment-support.patch | 2 +-
 .../pending-5.4/683-of_net-add-mac-address-to-of-tree.patch        | 4 ++--
 6 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
index cc5cd96ead..71d794e83b 100644
--- a/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
+++ b/target/linux/generic/pending-5.10/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
@@ -34,7 +34,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  {
  	struct property *pp = of_find_property(np, name, NULL);
  
-@@ -78,6 +79,56 @@ static const void *of_get_mac_addr_nvmem
+@@ -78,6 +79,55 @@ static const void *of_get_mac_addr_nvmem
  	return mac;
  }
  
@@ -43,7 +43,6 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +#ifdef CONFIG_MTD
 +	struct platform_device *pdev = of_find_device_by_node(np);
 +	struct device_node *mtd_np = NULL;
-+	struct property *prop;
 +	size_t retlen;
 +	int size, ret;
 +	struct mtd_info *mtd;
@@ -91,7 +90,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
   * checked first, because that is supposed to contain to "most recent" MAC
-@@ -98,6 +149,10 @@ static const void *of_get_mac_addr_nvmem
+@@ -98,6 +148,10 @@ static const void *of_get_mac_addr_nvmem
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
   *
@@ -102,7 +101,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
   * Return: Will be a valid pointer on success and ERR_PTR in case of error.
  */
  const void *of_get_mac_address(struct device_node *np)
-@@ -116,6 +171,10 @@ const void *of_get_mac_address(struct de
+@@ -116,6 +170,10 @@ const void *of_get_mac_address(struct de
  	if (addr)
  		return addr;
  
diff --git a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
index 2a72c7c94e..9032b9186c 100644
--- a/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
+++ b/target/linux/generic/pending-5.10/682-of_net-add-mac-address-increment-support.patch
@@ -65,7 +65,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  {
  #ifdef CONFIG_MTD
  	struct platform_device *pdev = of_find_device_by_node(np);
-@@ -153,28 +158,54 @@ static const void *of_get_mac_address_mt
+@@ -152,28 +157,54 @@ static const void *of_get_mac_address_mt
   * If a mtd-mac-address property exists, try to fetch the MAC address from the
   * specified mtd device.
   *
diff --git a/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch b/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
index 5d1f05af7f..eac7933884 100644
--- a/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
+++ b/target/linux/generic/pending-5.10/683-of_net-add-mac-address-to-of-tree.patch
@@ -1,6 +1,6 @@
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
-@@ -133,6 +133,33 @@ static void *of_get_mac_address_mtd(stru
+@@ -132,6 +132,33 @@ static void *of_get_mac_address_mtd(stru
  	return NULL;
  }
  
@@ -34,7 +34,7 @@
  
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
-@@ -206,6 +233,7 @@ found:
+@@ -205,6 +232,7 @@ found:
  	if (!of_property_read_u32(np, "mac-address-increment", &mac_inc))
  		addr[inc_idx] += mac_inc;
  
diff --git a/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
index a890501933..3dc33c2fca 100644
--- a/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
+++ b/target/linux/generic/pending-5.4/681-NET-add-mtd-mac-address-support-to-of_get_mac_addres.patch
@@ -34,7 +34,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  {
  	struct property *pp = of_find_property(np, name, NULL);
  
-@@ -72,6 +73,56 @@ static const void *of_get_mac_addr_nvmem
+@@ -72,6 +73,55 @@ static const void *of_get_mac_addr_nvmem
  	return mac;
  }
  
@@ -43,7 +43,6 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 +#ifdef CONFIG_MTD
 +	struct platform_device *pdev = of_find_device_by_node(np);
 +	struct device_node *mtd_np = NULL;
-+	struct property *prop;
 +	size_t retlen;
 +	int size, ret;
 +	struct mtd_info *mtd;
@@ -91,7 +90,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
   * checked first, because that is supposed to contain to "most recent" MAC
-@@ -92,6 +143,10 @@ static const void *of_get_mac_addr_nvmem
+@@ -92,6 +142,10 @@ static const void *of_get_mac_addr_nvmem
   * this case, the real MAC is in 'local-mac-address', and 'mac-address' exists
   * but is all zeros.
   *
@@ -102,7 +101,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
   * Return: Will be a valid pointer on success and ERR_PTR in case of error.
  */
  const void *of_get_mac_address(struct device_node *np)
-@@ -110,6 +165,10 @@ const void *of_get_mac_address(struct de
+@@ -110,6 +164,10 @@ const void *of_get_mac_address(struct de
  	if (addr)
  		return addr;
  
diff --git a/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
index 2a3f7da222..120ef52ff8 100644
--- a/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
+++ b/target/linux/generic/pending-5.4/682-of_net-add-mac-address-increment-support.patch
@@ -65,7 +65,7 @@ Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
  {
  #ifdef CONFIG_MTD
  	struct platform_device *pdev = of_find_device_by_node(np);
-@@ -147,28 +152,54 @@ static const void *of_get_mac_address_mt
+@@ -146,28 +151,54 @@ static const void *of_get_mac_address_mt
   * If a mtd-mac-address property exists, try to fetch the MAC address from the
   * specified mtd device.
   *
diff --git a/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch b/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch
index 151fd2b0a9..cabfba8b96 100644
--- a/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch
+++ b/target/linux/generic/pending-5.4/683-of_net-add-mac-address-to-of-tree.patch
@@ -1,6 +1,6 @@
 --- a/drivers/of/of_net.c
 +++ b/drivers/of/of_net.c
-@@ -127,6 +127,33 @@ static void *of_get_mac_address_mtd(stru
+@@ -126,6 +126,33 @@ static void *of_get_mac_address_mtd(stru
  	return NULL;
  }
  
@@ -34,7 +34,7 @@
  
  /**
   * Search the device tree for the best MAC address to use.  'mac-address' is
-@@ -200,6 +227,7 @@ found:
+@@ -199,6 +226,7 @@ found:
  	if (!of_property_read_u32(np, "mac-address-increment", &mac_inc))
  		addr[inc_idx] += mac_inc;
  


From lede-commits at lists.infradead.org  Thu Jul 29 11:50:30 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 14:50:30 -0400
Subject: [openwrt/openwrt]  ath79: enable missing pinmux for JT-OR750i
In-Reply-To: <162758462928.14471.3489526086978470791@git-01.infra.openwrt.org>
References: <162758462928.14471.3489526086978470791@git-01.infra.openwrt.org>
Message-ID: <mailman.11103.1627584634.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/17cb9a9a9e94037444b5bdf21c394d7923c4ebb2

commit 17cb9a9a9e94037444b5bdf21c394d7923c4ebb2
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed Jul 28 13:52:22 2021 +0200

    ath79: enable missing pinmux for JT-OR750i
    
    Without explicit configuration of these pins the ethernet as well as
    status LED of the device do not work correctly.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
    (cherry picked from commit 4feb9a4211d4c8e118e6b8f01fa0bbd4eab5d35c)
---
 target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
index 976d342f97..bcb35c9437 100644
--- a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
+++ b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
@@ -30,6 +30,9 @@
 	leds {
 		compatible = "gpio-leds";
 
+		pinctrl-names = "default";
+		pinctrl-0 = <&jtag_disable_pins &pinmux_led_eth_pins>;
+
 		led_status_green: status_green {
 			label = "green:status";
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;


From lede-commits at lists.infradead.org  Thu Jul 29 11:50:31 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 14:50:31 -0400
Subject: [openwrt/openwrt]  ath79: fix JT-OR750i switch LED assignment
In-Reply-To: <162758462928.14471.3489526086978470791@git-01.infra.openwrt.org>
References: <162758462928.14471.3489526086978470791@git-01.infra.openwrt.org>
Message-ID: <mailman.11106.1627584634.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/941ba3ffc4061233da19c03b293705ec13ab78ba

commit 941ba3ffc4061233da19c03b293705ec13ab78ba
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Wed Jul 28 14:17:13 2021 +0200

    ath79: fix JT-OR750i switch LED assignment
    
    The LEDs for LAN1 and LAN3 were swapped. Link on port 1 would illuminate
    the LED on port 3 and vice versa.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
    (cherry picked from commit f0a885ed8636b9762d12f2eb2755f63297ff0cb5)
---
 target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
index bcb35c9437..7949624b62 100644
--- a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
+++ b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
@@ -53,9 +53,9 @@
 			<0x04 0x0000002d 0x000000ff>,      \
 			/* GPIO 14: LED_LINK_2 (LAN 3) */  \
 			/* GPIO 15: LED_LINK_3 (LAN 2) */  \
-			<0x0c 0x2b2c0000 0xffff0000>,      \
+			<0x0c 0x2b2a0000 0xffff0000>,      \
 			/* GPIO 16: LED_LINK_4 (LAN 1) */  \
-			<0x10 0x0000002a 0x000000ff>;
+			<0x10 0x0000002c 0x000000ff>;
 	};
 };
 


From lede-commits at lists.infradead.org  Thu Jul 29 11:50:29 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 14:50:29 -0400
Subject: [openwrt/openwrt]  ath79: add support for Joy-IT JT-OR750i
In-Reply-To: <162758462928.14471.3489526086978470791@git-01.infra.openwrt.org>
References: <162758462928.14471.3489526086978470791@git-01.infra.openwrt.org>
Message-ID: <mailman.11107.1627584636.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/a5850c049e26aaafd9cf8bce9c499f4ffcfc2caf

commit a5850c049e26aaafd9cf8bce9c499f4ffcfc2caf
Author: Vincent Wiemann <vincent.wiemann at ironai.com>
AuthorDate: Sun Jun 20 16:56:21 2021 +0200

    ath79: add support for Joy-IT JT-OR750i
    
    Specifications:
     * QCA9531, 16 MiB flash (Winbond W25Q128JVSQ), 128 MiB RAM
     * 802.11n 2T2R (external antennas)
     * QCA9887, 802.11ac 1T1R (connected with diplexer to one of the antennas)
     * 3x 10/100 LAN, 1x 10/100 WAN
     * UART header with pinout printed on PCB
    
    Installation:
     * The device comes with a bootloader installed only
     * The bootloader offers DHCP and is reachable at http://10.123.123.1
     * Accept the agreement and flash sysupgrade.bin
     * Use Firefox if flashing does not work
    
    TFTP recovery with static IP:
     * Rename sysupgrade.bin to jt-or750i_firmware.bin
     * Offer it via TFTP server at 192.168.0.66
     * Keep the reset button pressed for 4 seconds after connecting power
    
    TFTP recovery with dynamic IP:
     * Rename sysupgrade.bin to jt-or750i_firmware.bin
     * Offer it via TFTP server with a DHCP server running at the same address
     * Keep the reset button pressed for 6 seconds after connecting power
    
    Co-authored-by: Sebastian Schaper <openwrt at sebastianschaper.net>
    Signed-off-by: Vincent Wiemann <vincent.wiemann at ironai.com>
    (cherry picked from commit 55b4b3655263984b92e4b9fc515a5e6b8003c655)
---
 target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts | 119 +++++++++++++++++++++
 .../ath79/generic/base-files/etc/board.d/01_leds   |   3 +
 .../generic/base-files/etc/board.d/02_network      |   5 +
 .../etc/hotplug.d/firmware/11-ath10k-caldata       |   1 +
 target/linux/ath79/image/generic.mk                |   9 ++
 5 files changed, 137 insertions(+)

diff --git a/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
new file mode 100644
index 0000000000..976d342f97
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_joyit_jt-or750i.dts
@@ -0,0 +1,119 @@
+// 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>
+
+/ {
+	compatible = "joyit,jt-or750i", "qca,qca9531";
+	model = "Joy-IT JT-OR750i";
+
+	aliases {
+		led-boot = &led_status_green;
+		led-failsafe = &led_status_red;
+		led-running = &led_status_green;
+		led-upgrade = &led_status_red;
+		label-mac-device = &eth0;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_status_green: status_green {
+			label = "green:status";
+			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+		};
+
+		led_status_red: status_red {
+			label = "red:status";
+			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&pinmux {
+	pinmux_led_eth_pins: pinmux_led_eth_pins {
+		pinctrl-single,bits = \
+			/* GPIO 4: LED_LINK_5 (WAN) */     \
+			<0x04 0x0000002d 0x000000ff>,      \
+			/* GPIO 14: LED_LINK_2 (LAN 3) */  \
+			/* GPIO 15: LED_LINK_3 (LAN 2) */  \
+			<0x0c 0x2b2c0000 0xffff0000>,      \
+			/* GPIO 16: LED_LINK_4 (LAN 1) */  \
+			<0x10 0x0000002a 0x000000ff>;
+	};
+};
+
+&spi {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x40000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "u-boot-env";
+				reg = <0x40000 0x10000>;
+				read-only;
+			};
+
+			partition at 50000 {
+				label = "firmware";
+				reg = <0x50000 0xfa0000>;
+				compatible = "denx,uimage";
+			};
+
+			art: partition at ff0000 {
+				label = "art";
+				reg = <0xff0000 0x10000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	phy-handle = <&swphy4>;
+
+	mtd-mac-address = <&art 0x0>;
+};
+
+&eth1 {
+	mtd-mac-address = <&art 0x6>;
+};
+
+&pcie0 {
+	status = "okay";
+};
+
+&wmac {
+	status = "okay";
+
+	mtd-cal-data = <&art 0x1000>;
+};
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 fae5ac7c92..7c5eeb1112 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
@@ -220,6 +220,9 @@ glinet,gl-x750)
 hak5,lan-turtle)
 	ucidef_set_led_netdev "wan" "WAN" "orange:system" "eth1"
 	;;
+joyit,jt-or750i)
+	ucidef_set_led_default "ath10k" "ath10k-disable" "ath10k-phy0" "0"
+	;;
 meraki,mr12|\
 tplink,cpe210-v2|\
 tplink,cpe210-v3)
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 1e522b91c6..31c0f11861 100755
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -270,6 +270,11 @@ ath79_setup_interfaces()
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan"
 		;;
+	joyit,jt-or750i)
+		ucidef_set_interface_wan "eth1"
+		ucidef_add_switch "switch0" \
+			"0 at eth0" "2:lan:3" "3:lan:2" "4:lan:1"
+		;;
 	librerouter,librerouter-v1)
 		ucidef_add_switch "switch0" \
 			"0 at eth0" "5:wan" "6 at eth1" "4:lan"
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
index 5a44dd94e5..783895525b 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
@@ -24,6 +24,7 @@ case "$FIRMWARE" in
 	comfast,cf-wr650ac-v1|\
 	comfast,cf-wr650ac-v2|\
 	devolo,magic-2-wifi|\
+	joyit,jt-or750i|\
 	qxwlan,e1700ac-v2-8m|\
 	qxwlan,e1700ac-v2-16m|\
 	qxwlan,e600gac-v2-8m|\
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 303907e5bb..ce4e462a40 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -1343,6 +1343,15 @@ define Device/jjplus_ja76pf2
 endef
 TARGET_DEVICES += jjplus_ja76pf2
 
+define Device/joyit_jt-or750i
+  SOC := qca9531
+  DEVICE_VENDOR := Joy-IT
+  DEVICE_MODEL := JT-OR750i
+  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct
+  IMAGE_SIZE := 16000k
+endef
+TARGET_DEVICES += joyit_jt-or750i
+
 define Device/librerouter_librerouter-v1
   SOC := qca9558
   DEVICE_VENDOR := Librerouter


From lede-commits at lists.infradead.org  Thu Jul 29 11:50:30 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 14:50:30 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.10 to 5.10.53
In-Reply-To: <162758463004.14596.15319035156307947618@git-01.infra.openwrt.org>
References: <162758463004.14596.15319035156307947618@git-01.infra.openwrt.org>
Message-ID: <mailman.11108.1627584636.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f2961c9c2be6873536fc68bed4bf2da6f3746c98

commit f2961c9c2be6873536fc68bed4bf2da6f3746c98
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Sun Jul 25 21:00:58 2021 +0100

    kernel: bump 5.10 to 5.10.53
    
    No deleted or manually refreshed patches.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 include/kernel-version.mk                                           | 4 ++--
 target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch    | 2 +-
 .../120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch     | 2 +-
 target/linux/generic/pending-5.10/201-extra_optimization.patch      | 2 +-
 ...68-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch | 2 +-
 .../patches-5.10/700-net-ethernet-mediatek-support-net-labels.patch | 6 +++---
 6 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 0ab7ce31ce..c2fb813c92 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
 endif
 
 LINUX_VERSION-5.4 = .134
-LINUX_VERSION-5.10 = .52
+LINUX_VERSION-5.10 = .53
 
 LINUX_KERNEL_HASH-5.4.134 = c9fb861642161c256e10c97c35ccce18831e688d87ead53c18e3226778e05841
-LINUX_KERNEL_HASH-5.10.52 = 769e57a0fa218589fa2f8460b8682eb784a72718c7a3d95295f382a77902ae79
+LINUX_KERNEL_HASH-5.10.53 = f0058d902933986dbaf03b2a0304d2babe5fe1c8e3f41f156ffd3c3f210106dc
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch
index c77de17db0..e0bcb8d34e 100644
--- a/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-5.10/910-unaligned_access_hacks.patch
@@ -214,7 +214,7 @@
  #include <linux/uaccess.h>
  #include <linux/ipv6.h>
  #include <linux/icmpv6.h>
-@@ -909,10 +910,10 @@ static void tcp_v6_send_response(const s
+@@ -924,10 +925,10 @@ static void tcp_v6_send_response(const s
  	topt = (__be32 *)(t1 + 1);
  
  	if (tsecr) {
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 4375e727cf..cf3bbd1f0f 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
-@@ -7027,7 +7027,7 @@ static void __ref alloc_node_mem_map(str
+@@ -7053,7 +7053,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/201-extra_optimization.patch b/target/linux/generic/pending-5.10/201-extra_optimization.patch
index df973258ab..cb1de80764 100644
--- a/target/linux/generic/pending-5.10/201-extra_optimization.patch
+++ b/target/linux/generic/pending-5.10/201-extra_optimization.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/Makefile
 +++ b/Makefile
-@@ -734,11 +734,11 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
+@@ -735,11 +735,11 @@ KBUILD_CFLAGS	+= $(call cc-disable-warni
  KBUILD_CFLAGS	+= $(call cc-disable-warning, address-of-packed-member)
  
  ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
diff --git a/target/linux/generic/pending-5.10/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-5.10/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
index 315a1a0bdb..add1be7bd0 100644
--- a/target/linux/generic/pending-5.10/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
+++ b/target/linux/generic/pending-5.10/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
-@@ -5401,6 +5401,7 @@ static int mv88e6xxx_register_switch(str
+@@ -5409,6 +5409,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/ramips/patches-5.10/700-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-5.10/700-net-ethernet-mediatek-support-net-labels.patch
index c32c16a908..8f4a2d9848 100644
--- a/target/linux/ramips/patches-5.10/700-net-ethernet-mediatek-support-net-labels.patch
+++ b/target/linux/ramips/patches-5.10/700-net-ethernet-mediatek-support-net-labels.patch
@@ -22,9 +22,9 @@ 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;
-@@ -3006,6 +3007,9 @@ static int mtk_add_mac(struct mtk_eth *e
- 
- 	eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;
+@@ -3008,6 +3009,9 @@ static int mtk_add_mac(struct mtk_eth *e
+ 	
+ 	of_platform_device_create(np, NULL, NULL);
  
 +	if (name)
 +		strlcpy(eth->netdev[id]->name, name, IFNAMSIZ);


From lede-commits at lists.infradead.org  Thu Jul 29 11:50:31 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 14:50:31 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.10 to 5.10.54
In-Reply-To: <162758463004.14596.15319035156307947618@git-01.infra.openwrt.org>
References: <162758463004.14596.15319035156307947618@git-01.infra.openwrt.org>
Message-ID: <mailman.11109.1627584636.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/a20e6149b3aceaf9c5ded756ec6665d3866f640e

commit a20e6149b3aceaf9c5ded756ec6665d3866f640e
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Wed Jul 28 15:53:41 2021 +0100

    kernel: bump 5.10 to 5.10.54
    
    Deleted (upstreamed) patches:
    mediatek/patches-5.10/000-spi-fix-fifo.patch
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 include/kernel-version.mk                          |  4 +-
 .../802-usb-xhci-force-msi-renesas-xhci.patch      |  2 +-
 ...ct-napi-poll-functionality-to-__napi_poll.patch |  8 ++--
 ...ment-threaded-able-napi-poll-loop-support.patch |  8 ++--
 ...fs-attribute-to-control-napi-threaded-mod.patch |  2 +-
 ...e-between-napi-kthread-mode-and-busy-poll.patch |  4 +-
 ...-hangup-on-napi_disable-for-threaded-napi.patch |  4 +-
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch | 10 ++---
 ...xxx-Request-assisted-learning-on-CPU-port.patch |  2 +-
 .../mediatek/patches-5.10/000-spi-fix-fifo.patch   | 49 ----------------------
 10 files changed, 22 insertions(+), 71 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index c2fb813c92..b70dc5b89d 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -7,10 +7,10 @@ ifdef CONFIG_TESTING_KERNEL
 endif
 
 LINUX_VERSION-5.4 = .134
-LINUX_VERSION-5.10 = .53
+LINUX_VERSION-5.10 = .54
 
 LINUX_KERNEL_HASH-5.4.134 = c9fb861642161c256e10c97c35ccce18831e688d87ead53c18e3226778e05841
-LINUX_KERNEL_HASH-5.10.53 = f0058d902933986dbaf03b2a0304d2babe5fe1c8e3f41f156ffd3c3f210106dc
+LINUX_KERNEL_HASH-5.10.54 = bf50c63261847187eca4a1793e5df5c1355b21697409589f6ca03e32b629be44
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch
index 038213bd00..3148e5b465 100644
--- a/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch
+++ b/target/linux/apm821xx/patches-5.10/802-usb-xhci-force-msi-renesas-xhci.patch
@@ -43,7 +43,7 @@ produce a noisy warning.
  		hcd->msi_enabled = 1;
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1887,6 +1887,7 @@ struct xhci_hcd {
+@@ -1888,6 +1888,7 @@ struct xhci_hcd {
  	struct xhci_hub		usb2_rhub;
  	struct xhci_hub		usb3_rhub;
  	/* support xHCI 1.0 spec USB2 hardware LPM */
diff --git a/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch b/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch
index 7f92a1307d..b036b5852e 100644
--- a/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch
+++ b/target/linux/generic/backport-5.10/600-v5.12-net-extract-napi-poll-functionality-to-__napi_poll.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -6779,15 +6779,10 @@ void __netif_napi_del(struct napi_struct
+@@ -6793,15 +6793,10 @@ void __netif_napi_del(struct napi_struct
  }
  EXPORT_SYMBOL(__netif_napi_del);
  
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	weight = n->weight;
  
  	/* This NAPI_STATE_SCHED test is for avoiding a race
-@@ -6807,7 +6802,7 @@ static int napi_poll(struct napi_struct
+@@ -6821,7 +6816,7 @@ static int napi_poll(struct napi_struct
  			    n->poll, work, weight);
  
  	if (likely(work < weight))
@@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	/* Drivers must not modify the NAPI state if they
  	 * consume the entire weight.  In such cases this code
-@@ -6816,7 +6811,7 @@ static int napi_poll(struct napi_struct
+@@ -6830,7 +6825,7 @@ static int napi_poll(struct napi_struct
  	 */
  	if (unlikely(napi_disable_pending(n))) {
  		napi_complete(n);
@@ -53,7 +53,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	}
  
  	if (n->gro_bitmask) {
-@@ -6834,12 +6829,29 @@ static int napi_poll(struct napi_struct
+@@ -6848,12 +6843,29 @@ static int napi_poll(struct napi_struct
  	if (unlikely(!list_empty(&n->poll_list))) {
  		pr_warn_once("%s: Budget exhausted after napi rescheduled\n",
  			     n->dev ? n->dev->name : "backlog");
diff --git a/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch b/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
index 6396499e4d..05f89932e8 100644
--- a/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
+++ b/target/linux/generic/backport-5.10/601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
@@ -153,7 +153,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	list_add_tail(&napi->poll_list, &sd->poll_list);
  	__raise_softirq_irqoff(NET_RX_SOFTIRQ);
  }
-@@ -6732,6 +6769,12 @@ void netif_napi_add(struct net_device *d
+@@ -6746,6 +6783,12 @@ void netif_napi_add(struct net_device *d
  	set_bit(NAPI_STATE_NPSVC, &napi->state);
  	list_add_rcu(&napi->dev_list, &dev->napi_list);
  	napi_hash_add(napi);
@@ -166,7 +166,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  EXPORT_SYMBOL(netif_napi_add);
  
-@@ -6748,9 +6791,28 @@ void napi_disable(struct napi_struct *n)
+@@ -6762,9 +6805,28 @@ void napi_disable(struct napi_struct *n)
  	hrtimer_cancel(&n->timer);
  
  	clear_bit(NAPI_STATE_DISABLE, &n->state);
@@ -195,7 +195,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void flush_gro_hash(struct napi_struct *napi)
  {
  	int i;
-@@ -6776,6 +6838,11 @@ void __netif_napi_del(struct napi_struct
+@@ -6790,6 +6852,11 @@ void __netif_napi_del(struct napi_struct
  
  	flush_gro_hash(napi);
  	napi->gro_bitmask = 0;
@@ -207,7 +207,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  EXPORT_SYMBOL(__netif_napi_del);
  
-@@ -6857,6 +6924,51 @@ static int napi_poll(struct napi_struct
+@@ -6871,6 +6938,51 @@ static int napi_poll(struct napi_struct
  	return work;
  }
  
diff --git a/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch b/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
index 323e93860a..1009d82046 100644
--- a/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
+++ b/target/linux/generic/backport-5.10/602-v5.12-net-add-sysfs-attribute-to-control-napi-threaded-mod.patch
@@ -69,7 +69,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		 * wake_up_process() when it's not NULL.
  		 */
  		thread = READ_ONCE(napi->thread);
-@@ -6742,6 +6743,49 @@ static void init_gro_hash(struct napi_st
+@@ -6756,6 +6757,49 @@ static void init_gro_hash(struct napi_st
  	napi->gro_bitmask = 0;
  }
  
diff --git a/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch b/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
index cdab47e0cc..a7fe9b360f 100644
--- a/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
+++ b/target/linux/generic/backport-5.10/603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
@@ -54,7 +54,7 @@ Cc: Hannes Frederic Sowa <hannes at stressinduktion.org>
  			wake_up_process(thread);
  			return;
  		}
-@@ -6534,7 +6536,8 @@ bool napi_complete_done(struct napi_stru
+@@ -6548,7 +6550,8 @@ bool napi_complete_done(struct napi_stru
  
  		WARN_ON_ONCE(!(val & NAPIF_STATE_SCHED));
  
@@ -64,7 +64,7 @@ Cc: Hannes Frederic Sowa <hannes at stressinduktion.org>
  
  		/* If STATE_MISSED was set, leave STATE_SCHED set,
  		 * because we will call napi->poll() one more time.
-@@ -6970,16 +6973,25 @@ static int napi_poll(struct napi_struct
+@@ -6984,16 +6987,25 @@ static int napi_poll(struct napi_struct
  
  static int napi_thread_wait(struct napi_struct *napi)
  {
diff --git a/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch b/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch
index 5894099fff..d921856668 100644
--- a/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch
+++ b/target/linux/generic/backport-5.10/604-v5.12-net-fix-hangup-on-napi_disable-for-threaded-napi.patch
@@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -6977,7 +6977,7 @@ static int napi_thread_wait(struct napi_
+@@ -6991,7 +6991,7 @@ static int napi_thread_wait(struct napi_
  
  	set_current_state(TASK_INTERRUPTIBLE);
  
@@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		/* Testing SCHED_THREADED bit here to make sure the current
  		 * kthread owns this napi and could poll on this napi.
  		 * Testing SCHED bit is not enough because SCHED bit might be
-@@ -6995,6 +6995,7 @@ static int napi_thread_wait(struct napi_
+@@ -7009,6 +7009,7 @@ static int napi_thread_wait(struct napi_
  		set_current_state(TASK_INTERRUPTIBLE);
  	}
  	__set_current_state(TASK_RUNNING);
diff --git a/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 8a47b3ab21..a0aac3d140 100644
--- a/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-5.10/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	__u16			tc_index;	/* traffic control index */
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -6037,6 +6037,9 @@ static enum gro_result dev_gro_receive(s
+@@ -6050,6 +6050,9 @@ static enum gro_result dev_gro_receive(s
  	int same_flow;
  	int grow;
  
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (netif_elide_gro(skb->dev))
  		goto normal;
  
-@@ -8013,6 +8016,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -8027,6 +8030,48 @@ static void __netdev_adjacent_dev_unlink
  					   &upper_dev->adj_list.lower);
  }
  
@@ -91,7 +91,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,
-@@ -8064,6 +8109,7 @@ static int __netdev_upper_dev_link(struc
+@@ -8078,6 +8123,7 @@ static int __netdev_upper_dev_link(struc
  	if (ret)
  		return ret;
  
@@ -99,7 +99,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);
-@@ -8160,6 +8206,7 @@ static void __netdev_upper_dev_unlink(st
+@@ -8174,6 +8220,7 @@ static void __netdev_upper_dev_unlink(st
  
  	__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
  
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
  				      &changeupper_info.info);
  
-@@ -8946,6 +8993,7 @@ int dev_set_mac_address(struct net_devic
+@@ -8960,6 +9007,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-5.10/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-5.10/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
index add1be7bd0..f7ebbd9ae6 100644
--- a/target/linux/generic/pending-5.10/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
+++ b/target/linux/generic/pending-5.10/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
-@@ -5409,6 +5409,7 @@ static int mv88e6xxx_register_switch(str
+@@ -5419,6 +5419,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/mediatek/patches-5.10/000-spi-fix-fifo.patch b/target/linux/mediatek/patches-5.10/000-spi-fix-fifo.patch
deleted file mode 100644
index 7a1462fc92..0000000000
--- a/target/linux/mediatek/patches-5.10/000-spi-fix-fifo.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 3a70dd2d050331ee4cf5ad9d5c0a32d83ead9a43 Mon Sep 17 00:00:00 2001
-From: Peter Hess <peter.hess at ph-home.de>
-Date: Tue, 6 Jul 2021 14:16:09 +0200
-Subject: spi: mediatek: fix fifo rx mode
-
-In FIFO mode were two problems:
-- RX mode was never handled and
-- in this case the tx_buf pointer was NULL and caused an exception
-
-fix this by handling RX mode in mtk_spi_fifo_transfer
-
-Fixes: a568231f4632 ("spi: mediatek: Add spi bus for Mediatek MT8173")
-Signed-off-by: Peter Hess <peter.hess at ph-home.de>
-Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
-Link: https://lore.kernel.org/r/20210706121609.680534-1-linux at fw-web.de
-Signed-off-by: Mark Brown <broonie at kernel.org>
----
- drivers/spi/spi-mt65xx.c | 16 +++++++++++++---
- 1 file changed, 13 insertions(+), 3 deletions(-)
-
---- a/drivers/spi/spi-mt65xx.c
-+++ b/drivers/spi/spi-mt65xx.c
-@@ -434,13 +434,23 @@ static int mtk_spi_fifo_transfer(struct
- 	mtk_spi_setup_packet(master);
- 
- 	cnt = xfer->len / 4;
--	iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt);
-+	if (xfer->tx_buf)
-+		iowrite32_rep(mdata->base + SPI_TX_DATA_REG, xfer->tx_buf, cnt);
-+
-+	if (xfer->rx_buf)
-+		ioread32_rep(mdata->base + SPI_RX_DATA_REG, xfer->rx_buf, cnt);
- 
- 	remainder = xfer->len % 4;
- 	if (remainder > 0) {
- 		reg_val = 0;
--		memcpy(&reg_val, xfer->tx_buf + (cnt * 4), remainder);
--		writel(reg_val, mdata->base + SPI_TX_DATA_REG);
-+		if (xfer->tx_buf) {
-+			memcpy(&reg_val, xfer->tx_buf + (cnt * 4), remainder);
-+			writel(reg_val, mdata->base + SPI_TX_DATA_REG);
-+		}
-+		if (xfer->rx_buf) {
-+			reg_val = readl(mdata->base + SPI_RX_DATA_REG);
-+			memcpy(xfer->rx_buf + (cnt * 4), &reg_val, remainder);
-+		}
- 	}
- 
- 	mtk_spi_enable_transfer(master);


From lede-commits at lists.infradead.org  Thu Jul 29 12:51:25 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 15:51:25 -0400
Subject: [openwrt/openwrt]  ubus: backport SOVERSION support
In-Reply-To: <162758828581.28092.4435975246774273074@git-01.infra.openwrt.org>
References: <162758828581.28092.4435975246774273074@git-01.infra.openwrt.org>
Message-ID: <mailman.11116.1627588289.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-19.07:
https://git.openwrt.org/92e341d632c094a9905b6135a79a02982232e911

commit 92e341d632c094a9905b6135a79a02982232e911
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Thu Jul 29 21:49:18 2021 +0200

    ubus: backport SOVERSION support
    
    Add a support for setting of new `ABIVERSION` CMake define which allows
    to control the SOVERSION used for the built shared library. This is
    needed for downstream packaging to properly track breaking ABI changes
    when updating to newer versions of the library.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
    (backported from commit 8edb1797d55d259c6eda18c89784f152328436fc)
---
 package/system/ubus/Makefile | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile
index d3fe452252..5e3bbd120d 100644
--- a/package/system/ubus/Makefile
+++ b/package/system/ubus/Makefile
@@ -8,6 +8,7 @@ PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
 PKG_SOURCE_DATE:=2019-12-27
 PKG_SOURCE_VERSION:=041c9d1c052bb4936fd03240f7d0dd64aedda972
 PKG_MIRROR_HASH:=7febbe78dd178d8d7ccacff54c00fb2d19a53624005920db8cd85236f54f8324
+PKG_ABI_VERSION:=20191227
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=LGPL-2.1
@@ -36,7 +37,7 @@ define Package/libubus
   SECTION:=libs
   CATEGORY:=Libraries
   DEPENDS:=+libubox
-  ABI_VERSION:=20191227
+  ABI_VERSION:=$(PKG_ABI_VERSION)
   TITLE:=OpenWrt RPC client library
 endef
 
@@ -51,7 +52,8 @@ TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include -flto
 TARGET_LDFLAGS += -flto
 
 CMAKE_OPTIONS = \
-	-DLUAPATH=/usr/lib/lua
+	-DLUAPATH=/usr/lib/lua \
+	-DABIVERSION="$(PKG_ABI_VERSION)"
 
 define Package/ubus/install
 	$(INSTALL_DIR) $(1)/bin
@@ -65,7 +67,7 @@ endef
 
 define Package/libubus/install
 	$(INSTALL_DIR) $(1)/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so $(1)/lib/
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libubus.so.* $(1)/lib/
 endef
 
 define Package/libubus-lua/install


From lede-commits at lists.infradead.org  Thu Jul 29 12:51:27 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 15:51:27 -0400
Subject: [openwrt/openwrt]  ubus: update to version 2021-07-01
In-Reply-To: <162758828581.28092.4435975246774273074@git-01.infra.openwrt.org>
References: <162758828581.28092.4435975246774273074@git-01.infra.openwrt.org>
Message-ID: <mailman.11117.1627588289.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-19.07:
https://git.openwrt.org/ef56c858482d85db6d6394a0786173e6002253d9

commit ef56c858482d85db6d6394a0786173e6002253d9
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Thu Jul 1 14:05:18 2021 +0200

    ubus: update to version 2021-07-01
    
    This update cherry picks following fix:
    
     * ubusd: fix tx_queue linked list usage
    
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 package/system/ubus/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile
index 702a78214e..2c116ae6f8 100644
--- a/package/system/ubus/Makefile
+++ b/package/system/ubus/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
-PKG_SOURCE_DATE:=2021-06-03
-PKG_SOURCE_VERSION:=90fb56c00bbd911d929227528e679b174b1f4cec
-PKG_MIRROR_HASH:=cec3ce8a2b952f08ed26d7f7e230cbbac34e66f0bcf11a03c3edaef1d0390490
+PKG_SOURCE_DATE:=2021-07-01
+PKG_SOURCE_VERSION:=38c7fdd8991366cd2f9ccbc47625f9b51b1d318a
+PKG_MIRROR_HASH:=5ff9baa2ba3c7b2b53a477ed2a0f3dd8828051389f3d759cf5a694fbccc4c05b
 PKG_ABI_VERSION:=20210603
 CMAKE_INSTALL:=1
 


From lede-commits at lists.infradead.org  Thu Jul 29 12:51:26 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 15:51:26 -0400
Subject: [openwrt/openwrt]  ubus: update to version 2021-06-03
In-Reply-To: <162758828581.28092.4435975246774273074@git-01.infra.openwrt.org>
References: <162758828581.28092.4435975246774273074@git-01.infra.openwrt.org>
Message-ID: <mailman.11118.1627588291.1072.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-19.07:
https://git.openwrt.org/796bf50e8e0c05efb2c11b5e2d9091ef05ec2970

commit 796bf50e8e0c05efb2c11b5e2d9091ef05ec2970
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Thu Jun 3 09:49:58 2021 +0200

    ubus: update to version 2021-06-03
    
    This update cherry picks following changes:
    
     * cmake: add a possibility to set library version
     * ubusd: protect against too-short messages
     * ubusd: add per-client tx queue limit
     * ubusd: convert tx_queue to linked list
     * lua: avoid truncation of large numeric values
    
    Fixes: FS#1525
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 package/system/ubus/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile
index 5e3bbd120d..702a78214e 100644
--- a/package/system/ubus/Makefile
+++ b/package/system/ubus/Makefile
@@ -5,10 +5,10 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
-PKG_SOURCE_DATE:=2019-12-27
-PKG_SOURCE_VERSION:=041c9d1c052bb4936fd03240f7d0dd64aedda972
-PKG_MIRROR_HASH:=7febbe78dd178d8d7ccacff54c00fb2d19a53624005920db8cd85236f54f8324
-PKG_ABI_VERSION:=20191227
+PKG_SOURCE_DATE:=2021-06-03
+PKG_SOURCE_VERSION:=90fb56c00bbd911d929227528e679b174b1f4cec
+PKG_MIRROR_HASH:=cec3ce8a2b952f08ed26d7f7e230cbbac34e66f0bcf11a03c3edaef1d0390490
+PKG_ABI_VERSION:=20210603
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=LGPL-2.1


From lede-commits at lists.infradead.org  Thu Jul 29 18:13:26 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 29 Jul 2021 21:13:26 -0400
Subject: [openwrt/openwrt]  fstools: update to git HEAD
In-Reply-To: <162760760636.14772.10742610588015826576@git-01.infra.openwrt.org>
References: <162760760636.14772.10742610588015826576@git-01.infra.openwrt.org>
Message-ID: <mailman.11161.1627607613.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/3404af774d3362ba29487fbb26103e4a6bce7676

commit 3404af774d3362ba29487fbb26103e4a6bce7676
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri Jul 30 02:11:45 2021 +0100

    fstools: update to git HEAD
    
     b7bf185 blockd: make most calls to 'block' asynchronous
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/system/fstools/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 8c82f8e3e5..4e82dd8cec 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=$(AUTORELEASE)
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
-PKG_MIRROR_HASH:=6a457b812166e04e2244ee1be92a4957666b5d1554315c0e18db1b30376cc617
-PKG_SOURCE_DATE:=2021-07-28
-PKG_SOURCE_VERSION:=cc63933faedd8d4fcdabb872cf4661ac04fe4ba2
+PKG_MIRROR_HASH:=77c24dabca546a376d1b4ee0d00975ca1382f468c357cd6128724fff43eaecad
+PKG_SOURCE_DATE:=2021-07-30
+PKG_SOURCE_VERSION:=b7bf18563769e26d24cdace973d09f9c438bbd34
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0


From lede-commits at lists.infradead.org  Fri Jul 30 04:03:49 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 30 Jul 2021 07:03:49 -0400
Subject: [openwrt/openwrt] otrx: use firmware-utils.git to avoid code
 duplication
In-Reply-To: <162764302906.14579.5809564297732621978@git-01.infra.openwrt.org>
References: <162764302906.14579.5809564297732621978@git-01.infra.openwrt.org>
Message-ID: <mailman.11272.1627643036.1072.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/7c4d79aa1c3595e2be36d1449cf63404f301f748

commit 7c4d79aa1c3595e2be36d1449cf63404f301f748
Author: Rafa? Mi?ecki <rafal at milecki.pl>
AuthorDate: Fri Jul 30 13:02:41 2021 +0200

    otrx: use firmware-utils.git to avoid code duplication
    
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/utils/otrx/Makefile     |  14 +-
 package/utils/otrx/src/Makefile |   7 -
 package/utils/otrx/src/otrx.c   | 592 ----------------------------------------
 3 files changed, 10 insertions(+), 603 deletions(-)

diff --git a/package/utils/otrx/Makefile b/package/utils/otrx/Makefile
index 2a3ac731a3..f55d275aca 100644
--- a/package/utils/otrx/Makefile
+++ b/package/utils/otrx/Makefile
@@ -10,7 +10,11 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=otrx
 PKG_RELEASE:=1
 
-PKG_FLAGS:=nonshared
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
+PKG_SOURCE_DATE:=2021-07-30
+PKG_SOURCE_VERSION:=a5c65fa1192e174e9e895637aaf93945959aa029
+PKG_MIRROR_HASH:=8ef94e74f50b21fd226dd5311962f8bdbd3aa55da11026b2cf2a4b35556350af
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -26,10 +30,12 @@ define Package/otrx/description
  This package contains an utility that allows validating TRX images.
 endef
 
+TARGET_CFLAGS += -Wall
+
 define Build/Compile
-	$(MAKE) -C $(PKG_BUILD_DIR) \
-		CC="$(TARGET_CC)" \
-		CFLAGS="$(TARGET_CFLAGS) -Wall"
+	$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
+		-o $(PKG_BUILD_DIR)/otrx \
+		$(PKG_BUILD_DIR)/src/otrx.c
 endef
 
 define Package/otrx/install
diff --git a/package/utils/otrx/src/Makefile b/package/utils/otrx/src/Makefile
deleted file mode 100644
index df50ea446d..0000000000
--- a/package/utils/otrx/src/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-all: otrx
-
-otrx:
-	$(CC) $(CFLAGS) -o $@ otrx.c -Wall
-
-clean:
-	rm -f otrx
diff --git a/package/utils/otrx/src/otrx.c b/package/utils/otrx/src/otrx.c
deleted file mode 100644
index 223e032f2b..0000000000
--- a/package/utils/otrx/src/otrx.c
+++ /dev/null
@@ -1,592 +0,0 @@
-/*
- * otrx
- *
- * Copyright (C) 2015-2017 Rafa? Mi?ecki <zajec5 at gmail.com>
- *
- * 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; either version 2 of the License, or (at your option)
- * any later version.
- */
-
-#include <byteswap.h>
-#include <endian.h>
-#include <errno.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#if !defined(__BYTE_ORDER)
-#error "Unknown byte order"
-#endif
-
-#if __BYTE_ORDER == __BIG_ENDIAN
-#define cpu_to_le32(x)	bswap_32(x)
-#define le32_to_cpu(x)	bswap_32(x)
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
-#define cpu_to_le32(x)	(x)
-#define le32_to_cpu(x)	(x)
-#else
-#error "Unsupported endianness"
-#endif
-
-#define TRX_MAGIC			0x30524448
-#define TRX_FLAGS_OFFSET		12
-#define TRX_MAX_PARTS			3
-
-struct trx_header {
-	uint32_t magic;
-	uint32_t length;
-	uint32_t crc32;
-	uint16_t flags;
-	uint16_t version;
-	uint32_t offset[3];
-};
-
-char *trx_path;
-size_t trx_offset = 0;
-char *partition[TRX_MAX_PARTS] = {};
-
-static inline size_t otrx_min(size_t x, size_t y) {
-	return x < y ? x : y;
-}
-
-/**************************************************
- * CRC32
- **************************************************/
-
-static const uint32_t crc32_tbl[] = {
-	0x00000000, 0x77073096, 0xee0e612c, 0x990951ba,
-	0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3,
-	0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
-	0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91,
-	0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
-	0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7,
-	0x136c9856, 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec,
-	0x14015c4f, 0x63066cd9, 0xfa0f3d63, 0x8d080df5,
-	0x3b6e20c8, 0x4c69105e, 0xd56041e4, 0xa2677172,
-	0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
-	0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940,
-	0x32d86ce3, 0x45df5c75, 0xdcd60dcf, 0xabd13d59,
-	0x26d930ac, 0x51de003a, 0xc8d75180, 0xbfd06116,
-	0x21b4f4b5, 0x56b3c423, 0xcfba9599, 0xb8bda50f,
-	0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
-	0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d,
-	0x76dc4190, 0x01db7106, 0x98d220bc, 0xefd5102a,
-	0x71b18589, 0x06b6b51f, 0x9fbfe4a5, 0xe8b8d433,
-	0x7807c9a2, 0x0f00f934, 0x9609a88e, 0xe10e9818,
-	0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
-	0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e,
-	0x6c0695ed, 0x1b01a57b, 0x8208f4c1, 0xf50fc457,
-	0x65b0d9c6, 0x12b7e950, 0x8bbeb8ea, 0xfcb9887c,
-	0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, 0xfbd44c65,
-	0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
-	0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb,
-	0x4369e96a, 0x346ed9fc, 0xad678846, 0xda60b8d0,
-	0x44042d73, 0x33031de5, 0xaa0a4c5f, 0xdd0d7cc9,
-	0x5005713c, 0x270241aa, 0xbe0b1010, 0xc90c2086,
-	0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
-	0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4,
-	0x59b33d17, 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad,
-	0xedb88320, 0x9abfb3b6, 0x03b6e20c, 0x74b1d29a,
-	0xead54739, 0x9dd277af, 0x04db2615, 0x73dc1683,
-	0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
-	0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1,
-	0xf00f9344, 0x8708a3d2, 0x1e01f268, 0x6906c2fe,
-	0xf762575d, 0x806567cb, 0x196c3671, 0x6e6b06e7,
-	0xfed41b76, 0x89d32be0, 0x10da7a5a, 0x67dd4acc,
-	0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
-	0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252,
-	0xd1bb67f1, 0xa6bc5767, 0x3fb506dd, 0x48b2364b,
-	0xd80d2bda, 0xaf0a1b4c, 0x36034af6, 0x41047a60,
-	0xdf60efc3, 0xa867df55, 0x316e8eef, 0x4669be79,
-	0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
-	0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f,
-	0xc5ba3bbe, 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04,
-	0xc2d7ffa7, 0xb5d0cf31, 0x2cd99e8b, 0x5bdeae1d,
-	0x9b64c2b0, 0xec63f226, 0x756aa39c, 0x026d930a,
-	0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
-	0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38,
-	0x92d28e9b, 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21,
-	0x86d3d2d4, 0xf1d4e242, 0x68ddb3f8, 0x1fda836e,
-	0x81be16cd, 0xf6b9265b, 0x6fb077e1, 0x18b74777,
-	0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
-	0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45,
-	0xa00ae278, 0xd70dd2ee, 0x4e048354, 0x3903b3c2,
-	0xa7672661, 0xd06016f7, 0x4969474d, 0x3e6e77db,
-	0xaed16a4a, 0xd9d65adc, 0x40df0b66, 0x37d83bf0,
-	0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
-	0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6,
-	0xbad03605, 0xcdd70693, 0x54de5729, 0x23d967bf,
-	0xb3667a2e, 0xc4614ab8, 0x5d681b02, 0x2a6f2b94,
-	0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d,
-};
-
-uint32_t otrx_crc32(uint32_t crc, uint8_t *buf, size_t len) {
-	while (len) {
-		crc = crc32_tbl[(crc ^ *buf) & 0xff] ^ (crc >> 8);
-		buf++;
-		len--;
-	}
-
-	return crc;
-}
-
-/**************************************************
- * Check
- **************************************************/
-
-static void otrx_check_parse_options(int argc, char **argv) {
-	int c;
-
-	while ((c = getopt(argc, argv, "o:")) != -1) {
-		switch (c) {
-		case 'o':
-			trx_offset = atoi(optarg);
-			break;
-		}
-	}
-}
-
-static int otrx_check(int argc, char **argv) {
-	FILE *trx;
-	struct trx_header hdr;
-	size_t bytes, length;
-	uint8_t buf[1024];
-	uint32_t crc32;
-	int err = 0;
-
-	if (argc < 3) {
-		fprintf(stderr, "No TRX file passed\n");
-		err = -EINVAL;
-		goto out;
-	}
-	trx_path = argv[2];
-
-	optind = 3;
-	otrx_check_parse_options(argc, argv);
-
-	trx = fopen(trx_path, "r");
-	if (!trx) {
-		fprintf(stderr, "Couldn't open %s\n", trx_path);
-		err = -EACCES;
-		goto out;
-	}
-
-	fseek(trx, trx_offset, SEEK_SET);
-	bytes = fread(&hdr, 1, sizeof(hdr), trx);
-	if (bytes != sizeof(hdr)) {
-		fprintf(stderr, "Couldn't read %s header\n", trx_path);
-		err =  -EIO;
-		goto err_close;
-	}
-
-	if (le32_to_cpu(hdr.magic) != TRX_MAGIC) {
-		fprintf(stderr, "Invalid TRX magic: 0x%08x\n", le32_to_cpu(hdr.magic));
-		err =  -EINVAL;
-		goto err_close;
-	}
-
-	length = le32_to_cpu(hdr.length);
-	if (length < sizeof(hdr)) {
-		fprintf(stderr, "Length read from TRX too low (%zu B)\n", length);
-		err = -EINVAL;
-		goto err_close;
-	}
-
-	crc32 = 0xffffffff;
-	fseek(trx, trx_offset + TRX_FLAGS_OFFSET, SEEK_SET);
-	length -= TRX_FLAGS_OFFSET;
-	while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) {
-		crc32 = otrx_crc32(crc32, buf, bytes);
-		length -= bytes;
-	}
-
-	if (length) {
-		fprintf(stderr, "Couldn't read last %zd B of data from %s\n", length, trx_path);
-		err = -EIO;
-		goto err_close;
-	}
-
-	if (crc32 != le32_to_cpu(hdr.crc32)) {
-		fprintf(stderr, "Invalid data crc32: 0x%08x instead of 0x%08x\n", crc32, le32_to_cpu(hdr.crc32));
-		err =  -EINVAL;
-		goto err_close;
-	}
-
-	printf("Found a valid TRX version %d\n", le32_to_cpu(hdr.version));
-
-err_close:
-	fclose(trx);
-out:
-	return err;
-}
-
-/**************************************************
- * Create
- **************************************************/
-
-static ssize_t otrx_create_append_file(FILE *trx, const char *in_path) {
-	FILE *in;
-	size_t bytes;
-	ssize_t length = 0;
-	uint8_t buf[1024];
-
-	in = fopen(in_path, "r");
-	if (!in) {
-		fprintf(stderr, "Couldn't open %s\n", in_path);
-		return -EACCES;
-	}
-
-	while ((bytes = fread(buf, 1, sizeof(buf), in)) > 0) {
-		if (fwrite(buf, 1, bytes, trx) != bytes) {
-			fprintf(stderr, "Couldn't write %zu B to %s\n", bytes, trx_path);
-			length = -EIO;
-			break;
-		}
-		length += bytes;
-	}
-
-	fclose(in);
-
-	return length;
-}
-
-static ssize_t otrx_create_append_zeros(FILE *trx, size_t length) {
-	uint8_t *buf;
-
-	buf = malloc(length);
-	if (!buf)
-		return -ENOMEM;
-	memset(buf, 0, length);
-
-	if (fwrite(buf, 1, length, trx) != length) {
-		fprintf(stderr, "Couldn't write %zu B to %s\n", length, trx_path);
-		free(buf);
-		return -EIO;
-	}
-
-	free(buf);
-
-	return length;
-}
-
-static ssize_t otrx_create_align(FILE *trx, size_t curr_offset, size_t alignment) {
-	if (curr_offset & (alignment - 1)) {
-		size_t length = alignment - (curr_offset % alignment);
-		return otrx_create_append_zeros(trx, length);
-	}
-
-	return 0;
-}
-
-static int otrx_create_write_hdr(FILE *trx, struct trx_header *hdr) {
-	size_t bytes, length;
-	uint8_t buf[1024];
-	uint32_t crc32;
-
-	hdr->magic = cpu_to_le32(TRX_MAGIC);
-	hdr->version = 1;
-
-	fseek(trx, 0, SEEK_SET);
-	bytes = fwrite(hdr, 1, sizeof(struct trx_header), trx);
-	if (bytes != sizeof(struct trx_header)) {
-		fprintf(stderr, "Couldn't write TRX header to %s\n", trx_path);
-		return -EIO;
-	}
-
-	length = le32_to_cpu(hdr->length);
-
-	crc32 = 0xffffffff;
-	fseek(trx, TRX_FLAGS_OFFSET, SEEK_SET);
-	length -= TRX_FLAGS_OFFSET;
-	while ((bytes = fread(buf, 1, otrx_min(sizeof(buf), length), trx)) > 0) {
-		crc32 = otrx_crc32(crc32, buf, bytes);
-		length -= bytes;
-	}
-	hdr->crc32 = cpu_to_le32(crc32);
-
-	fseek(trx, 0, SEEK_SET);
-	bytes = fwrite(hdr, 1, sizeof(struct trx_header), trx);
-	if (bytes != sizeof(struct trx_header)) {
-		fprintf(stderr, "Couldn't write TRX header to %s\n", trx_path);
-		return -EIO;
-	}
-
-	return 0;
-}
-
-static int otrx_create(int argc, char **argv) {
-	FILE *trx;
-	struct trx_header hdr = {};
-	ssize_t sbytes;
-	size_t curr_idx = 0;
-	size_t curr_offset = sizeof(hdr);
-	int c;
-	int err = 0;
-
-	if (argc < 3) {
-		fprintf(stderr, "No TRX file passed\n");
-		err = -EINVAL;
-		goto out;
-	}
-	trx_path = argv[2];
-
-	trx = fopen(trx_path, "w+");
-	if (!trx) {
-		fprintf(stderr, "Couldn't open %s\n", trx_path);
-		err = -EACCES;
-		goto out;
-	}
-	fseek(trx, curr_offset, SEEK_SET);
-
-	optind = 3;
-	while ((c = getopt(argc, argv, "f:A:a:b:")) != -1) {
-		switch (c) {
-		case 'f':
-			if (curr_idx >= TRX_MAX_PARTS) {
-				err = -ENOSPC;
-				fprintf(stderr, "Reached TRX partitions limit, no place for %s\n", optarg);
-				goto err_close;
-			}
-
-			sbytes = otrx_create_append_file(trx, optarg);
-			if (sbytes < 0) {
-				fprintf(stderr, "Failed to append file %s\n", optarg);
-			} else {
-				hdr.offset[curr_idx++] = curr_offset;
-				curr_offset += sbytes;
-			}
-
-			sbytes = otrx_create_align(trx, curr_offset, 4);
-			if (sbytes < 0)
-				fprintf(stderr, "Failed to append zeros\n");
-			else
-				curr_offset += sbytes;
-
-			break;
-		case 'A':
-			sbytes = otrx_create_append_file(trx, optarg);
-			if (sbytes < 0) {
-				fprintf(stderr, "Failed to append file %s\n", optarg);
-			} else {
-				curr_offset += sbytes;
-			}
-
-			sbytes = otrx_create_align(trx, curr_offset, 4);
-			if (sbytes < 0)
-				fprintf(stderr, "Failed to append zeros\n");
-			else
-				curr_offset += sbytes;
-			break;
-		case 'a':
-			sbytes = otrx_create_align(trx, curr_offset, strtol(optarg, NULL, 0));
-			if (sbytes < 0)
-				fprintf(stderr, "Failed to append zeros\n");
-			else
-				curr_offset += sbytes;
-			break;
-		case 'b':
-			sbytes = strtol(optarg, NULL, 0) - curr_offset;
-			if (sbytes < 0) {
-				fprintf(stderr, "Current TRX length is 0x%zx, can't pad it with zeros to 0x%lx\n", curr_offset, strtol(optarg, NULL, 0));
-			} else {
-				sbytes = otrx_create_append_zeros(trx, sbytes);
-				if (sbytes < 0)
-					fprintf(stderr, "Failed to append zeros\n");
-				else
-					curr_offset += sbytes;
-			}
-			break;
-		}
-		if (err)
-			break;
-	}
-
-	sbytes = otrx_create_align(trx, curr_offset, 0x1000);
-	if (sbytes < 0)
-		fprintf(stderr, "Failed to append zeros\n");
-	else
-		curr_offset += sbytes;
-
-	hdr.length = curr_offset;
-	otrx_create_write_hdr(trx, &hdr);
-err_close:
-	fclose(trx);
-out:
-	return err;
-}
-
-/**************************************************
- * Extract
- **************************************************/
-
-static void otrx_extract_parse_options(int argc, char **argv) {
-	int c;
-
-	while ((c = getopt(argc, argv, "c:e:o:1:2:3:")) != -1) {
-		switch (c) {
-		case 'o':
-			trx_offset = atoi(optarg);
-			break;
-		case '1':
-			partition[0] = optarg;
-			break;
-		case '2':
-			partition[1] = optarg;
-			break;
-		case '3':
-			partition[2] = optarg;
-			break;
-		}
-	}
-}
-
-static int otrx_extract_copy(FILE *trx, size_t offset, size_t length, char *out_path) {
-	FILE *out;
-	size_t bytes;
-	uint8_t *buf;
-	int err = 0;
-
-	out = fopen(out_path, "w");
-	if (!out) {
-		fprintf(stderr, "Couldn't open %s\n", out_path);
-		err = -EACCES;
-		goto out;
-	}
-
-	buf = malloc(length);
-	if (!buf) {
-		fprintf(stderr, "Couldn't alloc %zu B buffer\n", length);
-		err =  -ENOMEM;
-		goto err_close;
-	}
-
-	fseek(trx, offset, SEEK_SET);
-	bytes = fread(buf, 1, length, trx);
-	if (bytes != length) {
-		fprintf(stderr, "Couldn't read %zu B of data from %s\n", length, trx_path);
-		err =  -ENOMEM;
-		goto err_free_buf;
-	};
-
-	bytes = fwrite(buf, 1, length, out);
-	if (bytes != length) {
-		fprintf(stderr, "Couldn't write %zu B to %s\n", length, out_path);
-		err =  -ENOMEM;
-		goto err_free_buf;
-	}
-
-	printf("Extracted 0x%zx bytes into %s\n", length, out_path);
-
-err_free_buf:
-	free(buf);
-err_close:
-	fclose(out);
-out:
-	return err;
-}
-
-static int otrx_extract(int argc, char **argv) {
-	FILE *trx;
-	struct trx_header hdr;
-	size_t bytes;
-	int i;
-	int err = 0;
-
-	if (argc < 3) {
-		fprintf(stderr, "No TRX file passed\n");
-		err = -EINVAL;
-		goto out;
-	}
-	trx_path = argv[2];
-
-	optind = 3;
-	otrx_extract_parse_options(argc, argv);
-
-	trx = fopen(trx_path, "r");
-	if (!trx) {
-		fprintf(stderr, "Couldn't open %s\n", trx_path);
-		err = -EACCES;
-		goto out;
-	}
-
-	fseek(trx, trx_offset, SEEK_SET);
-	bytes = fread(&hdr, 1, sizeof(hdr), trx);
-	if (bytes != sizeof(hdr)) {
-		fprintf(stderr, "Couldn't read %s header\n", trx_path);
-		err =  -EIO;
-		goto err_close;
-	}
-
-	if (le32_to_cpu(hdr.magic) != TRX_MAGIC) {
-		fprintf(stderr, "Invalid TRX magic: 0x%08x\n", le32_to_cpu(hdr.magic));
-		err =  -EINVAL;
-		goto err_close;
-	}
-
-	for (i = 0; i < TRX_MAX_PARTS; i++) {
-		size_t length;
-
-		if (!partition[i])
-			continue;
-		if (!hdr.offset[i]) {
-			printf("TRX doesn't contain partition %d, can't extract %s\n", i + 1, partition[i]);
-			continue;
-		}
-
-		if (i + 1 >= TRX_MAX_PARTS || !hdr.offset[i + 1])
-			length = le32_to_cpu(hdr.length) - le32_to_cpu(hdr.offset[i]);
-		else
-			length = le32_to_cpu(hdr.offset[i + 1]) - le32_to_cpu(hdr.offset[i]);
-
-		otrx_extract_copy(trx, trx_offset + le32_to_cpu(hdr.offset[i]), length, partition[i]);
-	}
-
-err_close:
-	fclose(trx);
-out:
-	return err;
-}
-
-/**************************************************
- * Start
- **************************************************/
-
-static void usage() {
-	printf("Usage:\n");
-	printf("\n");
-	printf("Checking TRX file:\n");
-	printf("\totrx check <file> [options]\tcheck if file is a valid TRX\n");
-	printf("\t-o offset\t\t\toffset of TRX data in file (default: 0)\n");
-	printf("\n");
-	printf("Creating new TRX file:\n");
-	printf("\totrx create <file> [options] [partitions]\n");
-	printf("\t-f file\t\t\t\t[partition] start new partition with content copied from file\n");
-	printf("\t-A file\t\t\t\t[partition] append current partition with content copied from file\n");
-	printf("\t-a alignment\t\t\t[partition] align current partition\n");
-	printf("\t-b offset\t\t\t[partition] append zeros to partition till reaching absolute offset\n");
-	printf("\n");
-	printf("Extracting from TRX file:\n");
-	printf("\totrx extract <file> [options]\textract partitions from TRX file\n");
-	printf("\t-o offset\t\t\toffset of TRX data in file (default: 0)\n");
-	printf("\t-1 file\t\t\t\tfile to extract 1st partition to (optional)\n");
-	printf("\t-2 file\t\t\t\tfile to extract 2nd partition to (optional)\n");
-	printf("\t-3 file\t\t\t\tfile to extract 3rd partition to (optional)\n");
-}
-
-int main(int argc, char **argv) {
-	if (argc > 1) {
-		if (!strcmp(argv[1], "check"))
-			return otrx_check(argc, argv);
-		else if (!strcmp(argv[1], "create"))
-			return otrx_create(argc, argv);
-		else if (!strcmp(argv[1], "extract"))
-			return otrx_extract(argc, argv);
-	}
-
-	usage();
-	return 0;
-}


From lede-commits at lists.infradead.org  Fri Jul 30 11:13:29 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 30 Jul 2021 14:13:29 -0400
Subject: [openwrt/openwrt]  ramips: mt76x8: add missing config symbol
In-Reply-To: <162766880789.29709.15078172653268097734@git-01.infra.openwrt.org>
References: <162766880789.29709.15078172653268097734@git-01.infra.openwrt.org>
Message-ID: <mailman.11383.1627668812.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/a205de55941b025f6f85ac19005496c726d6e157

commit a205de55941b025f6f85ac19005496c726d6e157
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Thu Jul 29 22:58:57 2021 +0200

    ramips: mt76x8: add missing config symbol
    
    PWM_MEDIATEK was not defined, breaking builds for the mt76x8 subtarget.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/ramips/mt76x8/config-5.4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ramips/mt76x8/config-5.4 b/target/linux/ramips/mt76x8/config-5.4
index ec21b3722b..dfd01598ad 100644
--- a/target/linux/ramips/mt76x8/config-5.4
+++ b/target/linux/ramips/mt76x8/config-5.4
@@ -199,6 +199,7 @@ CONFIG_PHY_RALINK_USB=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_RT2880=y
 # CONFIG_PINCTRL_SINGLE is not set
+# CONFIG_PWM_MEDIATEK is not set
 CONFIG_RALINK=y
 # CONFIG_RALINK_WDT is not set
 CONFIG_REGMAP=y


From lede-commits at lists.infradead.org  Fri Jul 30 11:13:27 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 30 Jul 2021 14:13:27 -0400
Subject: [openwrt/openwrt]  generic: add missing Kconfig symbol
In-Reply-To: <162766880789.29709.15078172653268097734@git-01.infra.openwrt.org>
References: <162766880789.29709.15078172653268097734@git-01.infra.openwrt.org>
Message-ID: <mailman.11384.1627668813.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/2e1a5a4353ea89fe6554eb60d5e11e1824c12e2c

commit 2e1a5a4353ea89fe6554eb60d5e11e1824c12e2c
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Thu Jul 29 22:57:24 2021 +0200

    generic: add missing Kconfig symbol
    
    Fixes build errors for sunxi as well as rockchip targets.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/generic/config-5.4 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index 8d0f4a7306..7a4c6b2bee 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -996,6 +996,8 @@ CONFIG_CRYPTO_BLKCIPHER2=y
 # CONFIG_CRYPTO_CRC32C_INTEL is not set
 # CONFIG_CRYPTO_CRC32_ARM_CE is not set
 # CONFIG_CRYPTO_CRCT10DIF is not set
+# CONFIG_CRYPTO_CRCT10DIF_ARM_CE is not set
+# CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set
 # CONFIG_CRYPTO_CRYPTD is not set
 # CONFIG_CRYPTO_CTR is not set
 # CONFIG_CRYPTO_CTS is not set


From lede-commits at lists.infradead.org  Fri Jul 30 11:13:28 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 30 Jul 2021 14:13:28 -0400
Subject: [openwrt/openwrt]  x86: move Kconfig symbol to common config
In-Reply-To: <162766880789.29709.15078172653268097734@git-01.infra.openwrt.org>
References: <162766880789.29709.15078172653268097734@git-01.infra.openwrt.org>
Message-ID: <mailman.11385.1627668813.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/8abe67d6d2125823e6c3aa7786498da92c3efc8e

commit 8abe67d6d2125823e6c3aa7786498da92c3efc8e
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Thu Jul 29 22:58:09 2021 +0200

    x86: move Kconfig symbol to common config
    
    This is required for all x86 targets. x86-legacy missed this config
    symbol, breaking the build.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/x86/64/config-5.4      | 1 -
 target/linux/x86/config-5.4         | 1 +
 target/linux/x86/generic/config-5.4 | 1 -
 target/linux/x86/geode/config-5.4   | 1 -
 4 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/target/linux/x86/64/config-5.4 b/target/linux/x86/64/config-5.4
index 4c2e591501..348165a209 100644
--- a/target/linux/x86/64/config-5.4
+++ b/target/linux/x86/64/config-5.4
@@ -257,7 +257,6 @@ CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
 CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
 CONFIG_INTEL_GTT=y
 CONFIG_INTEL_IDLE=y
-# CONFIG_INTEL_INT0002_VGPIO is not set
 # CONFIG_INTEL_IPS is not set
 # CONFIG_INTEL_MENLOW is not set
 # CONFIG_INTEL_MIC_BUS is not set
diff --git a/target/linux/x86/config-5.4 b/target/linux/x86/config-5.4
index f26c20c59d..6676f9501a 100644
--- a/target/linux/x86/config-5.4
+++ b/target/linux/x86/config-5.4
@@ -282,6 +282,7 @@ CONFIG_INIT_STACK_NONE=y
 CONFIG_INPUT=y
 CONFIG_INPUT_KEYBOARD=y
 CONFIG_INSTRUCTION_DECODER=y
+# CONFIG_INTEL_INT0002_VGPIO is not set
 # CONFIG_INTEL_MEI_HDCP is not set
 # CONFIG_INTEL_PCH_THERMAL is not set
 # CONFIG_INTEL_POWERCLAMP is not set
diff --git a/target/linux/x86/generic/config-5.4 b/target/linux/x86/generic/config-5.4
index 65dc36107b..b6fd4b293c 100644
--- a/target/linux/x86/generic/config-5.4
+++ b/target/linux/x86/generic/config-5.4
@@ -218,7 +218,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
 CONFIG_INTEL_GTT=y
 CONFIG_INTEL_IDLE=y
-# CONFIG_INTEL_INT0002_VGPIO is not set
 # CONFIG_INTEL_IPS is not set
 # CONFIG_INTEL_MENLOW is not set
 CONFIG_INTEL_PCH_THERMAL=y
diff --git a/target/linux/x86/geode/config-5.4 b/target/linux/x86/geode/config-5.4
index 651c369178..83463bae56 100644
--- a/target/linux/x86/geode/config-5.4
+++ b/target/linux/x86/geode/config-5.4
@@ -57,7 +57,6 @@ CONFIG_I2C_ALGOPCA=y
 CONFIG_I2C_ALGOPCF=y
 CONFIG_I2C_BOARDINFO=y
 # CONFIG_I2C_MULTI_INSTANTIATE is not set
-# CONFIG_INTEL_INT0002_VGPIO is not set
 # CONFIG_INTEL_IPS is not set
 # CONFIG_INTEL_MENLOW is not set
 # CONFIG_INTEL_PMC_IPC is not set


From lede-commits at lists.infradead.org  Sat Jul 31 02:49:13 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 31 Jul 2021 05:49:13 -0400
Subject: [openwrt/openwrt]  generic: add missing Kconfig symbol
In-Reply-To: <162772495389.28598.14691856864908759165@git-01.infra.openwrt.org>
References: <162772495389.28598.14691856864908759165@git-01.infra.openwrt.org>
Message-ID: <mailman.11485.1627724958.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/f038a169a0341f4212997f02de2b280ea1178f9e

commit f038a169a0341f4212997f02de2b280ea1178f9e
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Thu Jul 29 22:57:24 2021 +0200

    generic: add missing Kconfig symbol
    
    Fixes build errors for sunxi as well as rockchip targets.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/generic/config-5.4 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index 8dd9ed5200..8f51585756 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -991,6 +991,8 @@ CONFIG_CRYPTO_BLKCIPHER2=y
 # CONFIG_CRYPTO_CRC32C_INTEL is not set
 # CONFIG_CRYPTO_CRC32_ARM_CE is not set
 # CONFIG_CRYPTO_CRCT10DIF is not set
+# CONFIG_CRYPTO_CRCT10DIF_ARM_CE is not set
+# CONFIG_CRYPTO_CRCT10DIF_ARM64_CE is not set
 # CONFIG_CRYPTO_CRYPTD is not set
 # CONFIG_CRYPTO_CTR is not set
 # CONFIG_CRYPTO_CTS is not set


From lede-commits at lists.infradead.org  Sat Jul 31 11:20:59 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 31 Jul 2021 14:20:59 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.4 to 5.4.137
In-Reply-To: <162775565772.752.14449803784274044198@git-01.infra.openwrt.org>
References: <162775565772.752.14449803784274044198@git-01.infra.openwrt.org>
Message-ID: <mailman.11501.1627755667.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/9993e3e3e6ceadb9bb5dfaf6b8de5d94f159a8ac

commit 9993e3e3e6ceadb9bb5dfaf6b8de5d94f159a8ac
Author: John Audia <graysky at archlinux.us>
AuthorDate: Sat Jul 31 06:53:10 2021 -0400

    kernel: bump 5.4 to 5.4.137
    
    Automatically rebased.
    
    Build system: x86_64
    Build-tested: ipq806x/R7800
    Run-tested: ipq806x/R7800
    
    No dmesg regressions, everything functional
    
    Signed-off-by: John Audia <graysky at archlinux.us>
---
 include/kernel-version.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index c95a2e8325..1d00565c8f 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .136
+LINUX_VERSION-5.4 = .137
 LINUX_VERSION-5.10 = .54
 
-LINUX_KERNEL_HASH-5.4.136 = 4322dd36bf86b82d410fb2d4df196d1f3b78819aa9dd78b555703bcbf49bad16
+LINUX_KERNEL_HASH-5.4.137 = f09e5e366ce5d8bde887cda229ef17138fd1653706a702221f934f99aaa31f7c
 LINUX_KERNEL_HASH-5.10.54 = bf50c63261847187eca4a1793e5df5c1355b21697409589f6ca03e32b629be44
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))


From lede-commits at lists.infradead.org  Sat Jul 31 11:20:58 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 31 Jul 2021 14:20:58 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.4 to 5.4.136
In-Reply-To: <162775565772.752.14449803784274044198@git-01.infra.openwrt.org>
References: <162775565772.752.14449803784274044198@git-01.infra.openwrt.org>
Message-ID: <mailman.11502.1627755671.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/bd3cb93034ef266190a1a8885d131c85956f6ee2

commit bd3cb93034ef266190a1a8885d131c85956f6ee2
Author: John Audia <graysky at archlinux.us>
AuthorDate: Wed Jul 28 08:29:03 2021 -0400

    kernel: bump 5.4 to 5.4.136
    
    All patches automatically rebased.
    
    Build system: x86_64
    Build-tested: ipq806x/R7800
    Run-tested: ipq806x/R7800
    
    No dmesg regressions, everything functional
    
    Signed-off-by: John Audia <graysky at archlinux.us>
---
 include/kernel-version.mk                                    |  4 ++--
 .../patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch    |  2 +-
 .../bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch    |  2 +-
 ...-0208-bcmgenet-Better-coalescing-parameter-defaults.patch |  4 ++--
 ...hci-add-quirk-for-host-controllers-that-don-t-updat.patch |  6 +++---
 ...292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch |  2 +-
 ...0293-xhci-Use-more-event-ring-segment-table-entries.patch |  2 +-
 .../950-0336-drm-v3d-The-third-IRQ-is-optional.patch         |  2 +-
 .../950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch     | 12 ++++++------
 .../950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch  |  4 ++--
 ...0-usb-xhci-add-support-for-performing-fake-doorbell.patch |  2 +-
 ...LK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch |  4 ++--
 ...usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch |  2 +-
 ...LK-19153-2-usb-host-xhci-do-not-return-error-status.patch |  2 +-
 ...MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch |  2 +-
 ...LK-9829-usb-core-print-suggested-message-if-failed-.patch |  2 +-
 ...LK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch |  2 +-
 ...CI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch |  2 +-
 18 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 0ec155de2d..c95a2e8325 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .135
+LINUX_VERSION-5.4 = .136
 LINUX_VERSION-5.10 = .54
 
-LINUX_KERNEL_HASH-5.4.135 = 83efa4c8c725bd2a5e66e2db5612d0ee586449d36661d13889b9ddf0203efdf1
+LINUX_KERNEL_HASH-5.4.136 = 4322dd36bf86b82d410fb2d4df196d1f3b78819aa9dd78b555703bcbf49bad16
 LINUX_KERNEL_HASH-5.10.54 = bf50c63261847187eca4a1793e5df5c1355b21697409589f6ca03e32b629be44
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
diff --git a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
index 9a0bab5c4b..3c33253ec4 100644
--- a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
+++ b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
@@ -43,7 +43,7 @@ produce a noisy warning.
  		hcd->msi_enabled = 1;
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1883,6 +1883,7 @@ struct xhci_hcd {
+@@ -1884,6 +1884,7 @@ struct xhci_hcd {
  	struct xhci_hub		usb2_rhub;
  	struct xhci_hub		usb3_rhub;
  	/* support xHCI 1.0 spec USB2 hardware LPM */
diff --git a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch
index 9280ab3f17..ea3c8abd20 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch
@@ -1040,7 +1040,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  }
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -5321,7 +5321,7 @@ static void port_event(struct usb_hub *h
+@@ -5369,7 +5369,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.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch b/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch
index 1d3765b93c..b245fbbbfd 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch
@@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
 
 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
-@@ -2149,7 +2149,7 @@ static void bcmgenet_init_tx_ring(struct
+@@ -2150,7 +2150,7 @@ static void bcmgenet_init_tx_ring(struct
  
  	bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX);
  	bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX);
@@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
  	/* Disable rate control for now */
  	bcmgenet_tdma_ring_writel(priv, index, flow_period_val,
  				  TDMA_FLOW_PERIOD);
-@@ -3579,9 +3579,12 @@ static int bcmgenet_probe(struct platfor
+@@ -3574,9 +3574,12 @@ static int bcmgenet_probe(struct platfor
  	netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
  
  	/* Set default coalescing parameters */
diff --git a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
index e60468c848..0c3f290ea2 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
@@ -37,7 +37,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  		pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -527,7 +527,10 @@ void xhci_find_new_dequeue_state(struct
+@@ -550,7 +550,10 @@ void xhci_find_new_dequeue_state(struct
  	struct xhci_virt_ep *ep = &dev->eps[ep_index];
  	struct xhci_ring *ep_ring;
  	struct xhci_segment *new_seg;
@@ -48,7 +48,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  	dma_addr_t addr;
  	u64 hw_dequeue;
  	bool cycle_found = false;
-@@ -565,7 +568,28 @@ void xhci_find_new_dequeue_state(struct
+@@ -588,7 +591,28 @@ void xhci_find_new_dequeue_state(struct
  	hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id);
  	new_seg = ep_ring->deq_seg;
  	new_deq = ep_ring->dequeue;
@@ -80,7 +80,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  	/*
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1873,6 +1873,7 @@ struct xhci_hcd {
+@@ -1874,6 +1874,7 @@ struct xhci_hcd {
  #define XHCI_DEFAULT_PM_RUNTIME_ALLOW	BIT_ULL(33)
  #define XHCI_RESET_PLL_ON_DISCONNECT	BIT_ULL(34)
  #define XHCI_SNPS_BROKEN_SUSPEND    BIT_ULL(35)
diff --git a/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch b/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch
index db1866d6e7..321cdb548c 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch
@@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
  static inline void bcmgenet_writel(u32 value, void __iomem *offset)
  {
  	/* MIPS chips strapped for BE will automagically configure the
-@@ -1995,6 +1999,11 @@ static void reset_umac(struct bcmgenet_p
+@@ -1996,6 +2000,11 @@ static void reset_umac(struct bcmgenet_p
  	bcmgenet_rbuf_ctrl_set(priv, 0);
  	udelay(10);
  
diff --git a/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch
index 25c23a8257..1758e49761 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch
@@ -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
-@@ -1649,8 +1649,8 @@ struct urb_priv {
+@@ -1650,8 +1650,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-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch b/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch
index ab3c053c3f..2f9eb20add 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch
@@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
 
 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
-@@ -3480,7 +3480,7 @@ static int bcmgenet_probe(struct platfor
+@@ -3475,7 +3475,7 @@ static int bcmgenet_probe(struct platfor
  	priv = netdev_priv(dev);
  	priv->irq0 = platform_get_irq(pdev, 0);
  	priv->irq1 = platform_get_irq(pdev, 1);
diff --git a/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch b/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch
index 60505cf4ed..706244f5c8 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch
@@ -24,7 +24,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
-@@ -2790,7 +2790,7 @@ static void bcmgenet_set_hw_addr(struct
+@@ -2791,7 +2791,7 @@ static void bcmgenet_set_hw_addr(struct
  }
  
  /* Returns a reusable dma control register value */
@@ -33,7 +33,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  {
  	unsigned int i;
  	u32 reg;
-@@ -2815,6 +2815,14 @@ static u32 bcmgenet_dma_disable(struct b
+@@ -2816,6 +2816,14 @@ static u32 bcmgenet_dma_disable(struct b
  	udelay(10);
  	bcmgenet_umac_writel(priv, 0, UMAC_TX_FLUSH);
  
@@ -48,9 +48,9 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	return dma_ctrl;
  }
  
-@@ -2916,8 +2924,8 @@ static int bcmgenet_open(struct net_devi
- 		bcmgenet_ext_writel(priv, reg, EXT_EXT_PWR_MGMT);
- 	}
+@@ -2911,8 +2919,8 @@ static int bcmgenet_open(struct net_devi
+ 
+ 	bcmgenet_set_hw_addr(priv, dev->dev_addr);
  
 -	/* Disable RX/TX DMA and flush TX queues */
 -	dma_ctrl = bcmgenet_dma_disable(priv);
@@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  
  	/* Reinitialize TDMA and RDMA and SW housekeeping */
  	ret = bcmgenet_init_dma(priv);
-@@ -3677,7 +3685,7 @@ static int bcmgenet_resume(struct device
+@@ -3665,7 +3673,7 @@ static int bcmgenet_resume(struct device
  		bcmgenet_power_up(priv, GENET_POWER_WOL_MAGIC);
  
  	/* Disable RX/TX DMA and flush TX queues */
diff --git a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
index 355421ee26..149fd08d06 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
@@ -32,7 +32,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
-@@ -624,6 +624,16 @@ void xhci_find_new_dequeue_state(struct
+@@ -647,6 +647,16 @@ void xhci_find_new_dequeue_state(struct
  
  	} while (!cycle_found || !td_last_trb_found);
  
@@ -51,7 +51,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1876,6 +1876,7 @@ struct xhci_hcd {
+@@ -1877,6 +1877,7 @@ struct xhci_hcd {
  #define XHCI_EP_CTX_BROKEN_DCS	BIT_ULL(36)
  #define XHCI_SKIP_PHY_INIT	BIT_ULL(37)
  #define XHCI_DISABLE_SPARSE	BIT_ULL(38)
diff --git a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
index 5427d7368e..72ea0cbd3b 100644
--- a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
+++ b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
@@ -127,7 +127,7 @@ it on BCM4708 family.
  /*
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1873,6 +1873,7 @@ struct xhci_hcd {
+@@ -1874,6 +1874,7 @@ struct xhci_hcd {
  #define XHCI_DEFAULT_PM_RUNTIME_ALLOW	BIT_ULL(33)
  #define XHCI_RESET_PLL_ON_DISCONNECT	BIT_ULL(34)
  #define XHCI_SNPS_BROKEN_SUSPEND    BIT_ULL(35)
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
index 58cccfff5e..ffe429929b 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
@@ -42,7 +42,7 @@ Signed-off-by: Peter Chen <peter.chen at nxp.com>
  			retval = xhci_enter_test_mode(xhci, test_mode, wIndex,
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -3592,6 +3592,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
+@@ -3624,6 +3624,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
  	return 0;
  }
  
@@ -184,7 +184,7 @@ Signed-off-by: Peter Chen <peter.chen at nxp.com>
  void xhci_init_driver(struct hc_driver *drv,
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -2150,6 +2150,16 @@ int xhci_find_raw_port_number(struct usb
+@@ -2151,6 +2151,16 @@ int xhci_find_raw_port_number(struct usb
  struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd);
  
  void xhci_hc_died(struct xhci_hcd *xhci);
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch
index 40d6399439..e866bef1df 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch
@@ -32,7 +32,7 @@ Signed-off-by: Peter Chen <peter.chen at nxp.com>
  	ret = xhci_handshake(&xhci->op_regs->command,
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1873,6 +1873,7 @@ struct xhci_hcd {
+@@ -1874,6 +1874,7 @@ struct xhci_hcd {
  #define XHCI_DEFAULT_PM_RUNTIME_ALLOW	BIT_ULL(33)
  #define XHCI_RESET_PLL_ON_DISCONNECT	BIT_ULL(34)
  #define XHCI_SNPS_BROKEN_SUSPEND    BIT_ULL(35)
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
index b08633eb88..637d514d76 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
@@ -22,7 +22,7 @@ Signed-off-by: Peter Chen <peter.chen at nxp.com>
 
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -2058,12 +2058,9 @@ static int process_ctrl_td(struct xhci_h
+@@ -2091,12 +2091,9 @@ static int process_ctrl_td(struct xhci_h
  
  	switch (trb_comp_code) {
  	case COMP_SUCCESS:
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
index 3f805756fa..2fc5ba3f06 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
@@ -35,7 +35,7 @@ Signed-off-by: Peter Chen <peter.chen at nxp.com>
  EXPORT_SYMBOL_GPL(xhci_init_driver);
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1916,6 +1916,7 @@ struct xhci_driver_overrides {
+@@ -1917,6 +1917,7 @@ struct xhci_driver_overrides {
  	int (*start)(struct usb_hcd *hcd);
  	int (*check_bandwidth)(struct usb_hcd *, struct usb_device *);
  	void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch b/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch
index e444af408a..e02f08579c 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch
@@ -20,7 +20,7 @@ Signed-off-by: Li Jun <jun.li at freescale.com>
 
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -4731,7 +4731,8 @@ hub_port_init(struct usb_hub *hub, struc
+@@ -4779,7 +4779,8 @@ hub_port_init(struct usb_hub *hub, struc
  			}
  			if (r) {
  				if (r != -ENODEV)
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch b/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch
index fd64f2f10b..00034e38f3 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch
@@ -16,7 +16,7 @@ Signed-off-by: Li Jun <jun.li at nxp.com>
 
 --- a/drivers/usb/host/xhci-hub.c
 +++ b/drivers/usb/host/xhci-hub.c
-@@ -1737,7 +1737,8 @@ static bool xhci_port_missing_cas_quirk(
+@@ -1738,7 +1738,8 @@ static bool xhci_port_missing_cas_quirk(
  		return false;
  
  	if (((portsc & PORT_PLS_MASK) != XDEV_POLLING) &&
diff --git a/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch b/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
index 086fc0ab96..1c51ca5841 100644
--- a/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
+++ b/target/linux/octeontx/patches-5.4/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>
-@@ -5725,3 +5726,34 @@ static void apex_pci_fixup_class(struct
+@@ -5727,3 +5728,34 @@ static void apex_pci_fixup_class(struct
  }
  DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a,
  			       PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);


From lede-commits at lists.infradead.org  Sat Jul 31 11:20:57 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 31 Jul 2021 14:20:57 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.4 to 5.4.135
In-Reply-To: <162775565772.752.14449803784274044198@git-01.infra.openwrt.org>
References: <162775565772.752.14449803784274044198@git-01.infra.openwrt.org>
Message-ID: <mailman.11503.1627755671.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/28ef76402671c4166de2d34e52dbc4f46dc08077

commit 28ef76402671c4166de2d34e52dbc4f46dc08077
Author: John Audia <graysky at archlinux.us>
AuthorDate: Sun Jul 25 14:36:53 2021 -0400

    kernel: bump 5.4 to 5.4.135
    
    All patches automatically rebased.
    
    Build system: x86_64
    Build-tested: ipq806x/R7800
    Run-tested: ipq806x/R7800
    
    No dmesg regressions, everything functional
    
    Signed-off-by: John Audia <graysky at archlinux.us>
---
 include/kernel-version.mk                          |  4 ++--
 .../patches-5.4/910-unaligned_access_hacks.patch   |  2 +-
 ...enet-Better-coalescing-parameter-defaults.patch |  2 +-
 ...50-0336-drm-v3d-The-third-IRQ-is-optional.patch |  2 +-
 ...973-net-bcmgenet-Reset-RBUF-on-first-open.patch |  8 +++----
 .../0003-ARM-dts-gemini-Rename-IDE-nodes.patch     |  6 ++---
 ...-mv88e6xxx-Add-support-for-port-mirroring.patch |  4 ++--
 ...8e6xxx-fix-broken-if-statement-because-of.patch |  2 +-
 ...xxx-Request-assisted-learning-on-CPU-port.patch |  2 +-
 ...s208xa-accumulated-change-to-ls208xa-boar.patch | 26 +++++++++++-----------
 ...nxp-ls208xa-add-more-thermal-zone-support.patch |  2 +-
 ...dded-endianness-information-to-dts-serdes.patch |  2 +-
 ...ix-DWC3-IP-VBUS-glitch-issue-on-Layerscap.patch |  4 ++--
 ...sl-layerscape-fix-warnings-when-compiling.patch | 20 ++++++++---------
 ...63-arm64-dts-fsl-remove-backplane-support.patch |  4 ++--
 ...s1012a-ls1043a-ls1046a-ls1088a-ls208xa-re.patch |  2 +-
 ...dts-0078-arm64-dts-fix-endianness-of-rcpm.patch |  2 +-
 ...m64-dts-layerscape-add-chip-specific-comp.patch |  4 ++--
 ...ayerscape-apply-dma-coherent-for-dwc3-nod.patch |  4 ++--
 ...s208xa-Update-qspi-node-properties-for-LS.patch |  2 +-
 ...s208xa-Remove-dma-coherent-from-dwc3-node.patch |  4 ++--
 ...a-ocelot-add-tsn-support-for-felix-switch.patch |  2 +-
 .../patches-5.4/0310-mtk-bmt-support.patch         |  4 ++--
 ...t-mtk_eth_soc-add-support-for-coherent-DM.patch |  2 +-
 ...arvell-armada-37xx-Set-pcie_reset_pin-to-.patch |  2 +-
 ...arvell-armada-37xx-Move-PCIe-comphy-handl.patch |  2 +-
 ...arvell-armada-37xx-Move-PCIe-max-link-spe.patch |  2 +-
 ...-net-ethernet-mediatek-support-net-labels.patch |  6 ++---
 28 files changed, 64 insertions(+), 64 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index b70dc5b89d..0ec155de2d 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,10 +6,10 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .134
+LINUX_VERSION-5.4 = .135
 LINUX_VERSION-5.10 = .54
 
-LINUX_KERNEL_HASH-5.4.134 = c9fb861642161c256e10c97c35ccce18831e688d87ead53c18e3226778e05841
+LINUX_KERNEL_HASH-5.4.135 = 83efa4c8c725bd2a5e66e2db5612d0ee586449d36661d13889b9ddf0203efdf1
 LINUX_KERNEL_HASH-5.10.54 = bf50c63261847187eca4a1793e5df5c1355b21697409589f6ca03e32b629be44
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
index 99520863d3..55b198eb0c 100644
--- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
@@ -214,7 +214,7 @@
  #include <linux/uaccess.h>
  #include <linux/ipv6.h>
  #include <linux/icmpv6.h>
-@@ -849,10 +850,10 @@ static void tcp_v6_send_response(const s
+@@ -864,10 +865,10 @@ static void tcp_v6_send_response(const s
  	topt = (__be32 *)(t1 + 1);
  
  	if (tsecr) {
diff --git a/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch b/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch
index 3a38f64436..1d3765b93c 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch
@@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
  	/* Disable rate control for now */
  	bcmgenet_tdma_ring_writel(priv, index, flow_period_val,
  				  TDMA_FLOW_PERIOD);
-@@ -3573,9 +3573,12 @@ static int bcmgenet_probe(struct platfor
+@@ -3579,9 +3579,12 @@ static int bcmgenet_probe(struct platfor
  	netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
  
  	/* Set default coalescing parameters */
diff --git a/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch b/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch
index 97ff76a6a3..ab3c053c3f 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch
@@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
 
 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
-@@ -3474,7 +3474,7 @@ static int bcmgenet_probe(struct platfor
+@@ -3480,7 +3480,7 @@ static int bcmgenet_probe(struct platfor
  	priv = netdev_priv(dev);
  	priv->irq0 = platform_get_irq(pdev, 0);
  	priv->irq1 = platform_get_irq(pdev, 1);
diff --git a/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch b/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch
index b7f0ce0cad..60505cf4ed 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch
@@ -31,9 +31,9 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 -static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv)
 +static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv, bool flush_rx)
  {
+ 	unsigned int i;
  	u32 reg;
- 	u32 dma_ctrl;
-@@ -2809,6 +2809,14 @@ static u32 bcmgenet_dma_disable(struct b
+@@ -2815,6 +2815,14 @@ static u32 bcmgenet_dma_disable(struct b
  	udelay(10);
  	bcmgenet_umac_writel(priv, 0, UMAC_TX_FLUSH);
  
@@ -48,7 +48,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	return dma_ctrl;
  }
  
-@@ -2910,8 +2918,8 @@ static int bcmgenet_open(struct net_devi
+@@ -2916,8 +2924,8 @@ static int bcmgenet_open(struct net_devi
  		bcmgenet_ext_writel(priv, reg, EXT_EXT_PWR_MGMT);
  	}
  
@@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  
  	/* Reinitialize TDMA and RDMA and SW housekeeping */
  	ret = bcmgenet_init_dma(priv);
-@@ -3671,7 +3679,7 @@ static int bcmgenet_resume(struct device
+@@ -3677,7 +3685,7 @@ static int bcmgenet_resume(struct device
  		bcmgenet_power_up(priv, GENET_POWER_WOL_MAGIC);
  
  	/* Disable RX/TX DMA and flush TX queues */
diff --git a/target/linux/gemini/patches-5.4/0003-ARM-dts-gemini-Rename-IDE-nodes.patch b/target/linux/gemini/patches-5.4/0003-ARM-dts-gemini-Rename-IDE-nodes.patch
index 6477b2d2a4..cf4a74f86a 100644
--- a/target/linux/gemini/patches-5.4/0003-ARM-dts-gemini-Rename-IDE-nodes.patch
+++ b/target/linux/gemini/patches-5.4/0003-ARM-dts-gemini-Rename-IDE-nodes.patch
@@ -84,7 +84,7 @@ Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
  
 --- a/arch/arm/boot/dts/gemini.dtsi
 +++ b/arch/arm/boot/dts/gemini.dtsi
-@@ -356,7 +356,7 @@
+@@ -357,7 +357,7 @@
  			};
  		};
  
@@ -93,7 +93,7 @@ Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
  			compatible = "cortina,gemini-pata", "faraday,ftide010";
  			reg = <0x63000000 0x1000>;
  			interrupts = <4 IRQ_TYPE_EDGE_RISING>;
-@@ -365,9 +365,11 @@
+@@ -366,9 +366,11 @@
  			clock-names = "PCLK";
  			sata = <&sata>;
  			status = "disabled";
@@ -106,7 +106,7 @@ Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
  			compatible = "cortina,gemini-pata", "faraday,ftide010";
  			reg = <0x63400000 0x1000>;
  			interrupts = <5 IRQ_TYPE_EDGE_RISING>;
-@@ -376,6 +378,8 @@
+@@ -377,6 +379,8 @@
  			clock-names = "PCLK";
  			sata = <&sata>;
  			status = "disabled";
diff --git a/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch
index 30ff8aeab6..a23f45075f 100644
--- a/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch
+++ b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -4922,6 +4922,80 @@ static int mv88e6xxx_port_mdb_del(struct
+@@ -4926,6 +4926,80 @@ static int mv88e6xxx_port_mdb_del(struct
  	return err;
  }
  
@@ -106,7 +106,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
  					 bool unicast, bool multicast)
  {
-@@ -4976,6 +5050,8 @@ static const struct dsa_switch_ops mv88e
+@@ -4980,6 +5054,8 @@ static const struct dsa_switch_ops mv88e
  	.port_mdb_prepare       = mv88e6xxx_port_mdb_prepare,
  	.port_mdb_add           = mv88e6xxx_port_mdb_add,
  	.port_mdb_del           = mv88e6xxx_port_mdb_del,
diff --git a/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch
index d8ec1240f7..37e7a7f2a9 100644
--- a/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch
+++ b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -4989,7 +4989,7 @@ static void mv88e6xxx_port_mirror_del(st
+@@ -4993,7 +4993,7 @@ static void mv88e6xxx_port_mirror_del(st
  		if (chip->info->ops->set_egress_port(chip,
  						     direction,
  						     dsa_upstream_port(ds,
diff --git a/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
index 653a782f52..cb421f164b 100644
--- a/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
+++ b/target/linux/generic/pending-5.4/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
-@@ -5076,6 +5076,7 @@ static int mv88e6xxx_register_switch(str
+@@ -5080,6 +5080,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/layerscape/patches-5.4/302-dts-0010-arm64-dts-ls208xa-accumulated-change-to-ls208xa-boar.patch b/target/linux/layerscape/patches-5.4/302-dts-0010-arm64-dts-ls208xa-accumulated-change-to-ls208xa-boar.patch
index 2b1bd825a4..a763e05724 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0010-arm64-dts-ls208xa-accumulated-change-to-ls208xa-boar.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0010-arm64-dts-ls208xa-accumulated-change-to-ls208xa-boar.patch
@@ -702,7 +702,7 @@ binding
  	};
  
  	pmu {
-@@ -560,15 +559,126 @@
+@@ -559,15 +558,126 @@
  			#interrupt-cells = <2>;
  		};
  
@@ -831,7 +831,7 @@ binding
  		};
  
  		i2c1: i2c at 2010000 {
-@@ -579,7 +689,7 @@
+@@ -578,7 +688,7 @@
  			reg = <0x0 0x2010000 0x0 0x10000>;
  			interrupts = <0 34 0x4>; /* Level high type */
  			clock-names = "i2c";
@@ -840,7 +840,7 @@ binding
  		};
  
  		i2c2: i2c at 2020000 {
-@@ -590,7 +700,7 @@
+@@ -589,7 +699,7 @@
  			reg = <0x0 0x2020000 0x0 0x10000>;
  			interrupts = <0 35 0x4>; /* Level high type */
  			clock-names = "i2c";
@@ -849,7 +849,7 @@ binding
  		};
  
  		i2c3: i2c at 2030000 {
-@@ -601,7 +711,7 @@
+@@ -600,7 +710,7 @@
  			reg = <0x0 0x2030000 0x0 0x10000>;
  			interrupts = <0 35 0x4>; /* Level high type */
  			clock-names = "i2c";
@@ -858,7 +858,7 @@ binding
  		};
  
  		ifc: ifc at 2240000 {
-@@ -633,8 +743,8 @@
+@@ -632,8 +742,8 @@
  		pcie1: pcie at 3400000 {
  			compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
  			reg-names = "regs", "config";
@@ -869,7 +869,7 @@ binding
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -642,6 +752,7 @@
+@@ -641,6 +751,7 @@
  			num-viewport = <6>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -877,7 +877,7 @@ binding
  			#interrupt-cells = <1>;
  			interrupt-map-mask = <0 0 0 7>;
  			interrupt-map = <0000 0 0 1 &gic 0 0 0 109 4>,
-@@ -654,8 +765,8 @@
+@@ -653,8 +764,8 @@
  		pcie2: pcie at 3500000 {
  			compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
  			reg-names = "regs", "config";
@@ -888,7 +888,7 @@ binding
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -663,6 +774,7 @@
+@@ -662,6 +773,7 @@
  			num-viewport = <6>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -896,7 +896,7 @@ binding
  			#interrupt-cells = <1>;
  			interrupt-map-mask = <0 0 0 7>;
  			interrupt-map = <0000 0 0 1 &gic 0 0 0 114 4>,
-@@ -675,8 +787,8 @@
+@@ -674,8 +786,8 @@
  		pcie3: pcie at 3600000 {
  			compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
  			reg-names = "regs", "config";
@@ -907,7 +907,7 @@ binding
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -684,6 +796,7 @@
+@@ -683,6 +795,7 @@
  			num-viewport = <256>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -915,7 +915,7 @@ binding
  			#interrupt-cells = <1>;
  			interrupt-map-mask = <0 0 0 7>;
  			interrupt-map = <0000 0 0 1 &gic 0 0 0 119 4>,
-@@ -696,8 +809,8 @@
+@@ -695,8 +808,8 @@
  		pcie4: pcie at 3700000 {
  			compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
  			reg-names = "regs", "config";
@@ -926,7 +926,7 @@ binding
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -705,6 +818,7 @@
+@@ -704,6 +817,7 @@
  			num-viewport = <6>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -934,7 +934,7 @@ binding
  			#interrupt-cells = <1>;
  			interrupt-map-mask = <0 0 0 7>;
  			interrupt-map = <0000 0 0 1 &gic 0 0 0 124 4>,
-@@ -754,11 +868,22 @@
+@@ -753,11 +867,22 @@
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
  		};
  
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0025-arm64-dts-nxp-ls208xa-add-more-thermal-zone-support.patch b/target/linux/layerscape/patches-5.4/302-dts-0025-arm64-dts-nxp-ls208xa-add-more-thermal-zone-support.patch
index 42deb82ea3..5434e1f913 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0025-arm64-dts-nxp-ls208xa-add-more-thermal-zone-support.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0025-arm64-dts-nxp-ls208xa-add-more-thermal-zone-support.patch
@@ -146,7 +146,7 @@ Signed-off-by: Yuantian Tang <andy.tang at nxp.com>
  
  	timer: timer {
  		compatible = "arm,armv8-timer";
-@@ -907,3 +872,36 @@
+@@ -906,3 +871,36 @@
  		};
  	};
  };
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0032-arm64-dts-Added-endianness-information-to-dts-serdes.patch b/target/linux/layerscape/patches-5.4/302-dts-0032-arm64-dts-Added-endianness-information-to-dts-serdes.patch
index 2552506815..b19431d567 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0032-arm64-dts-Added-endianness-information-to-dts-serdes.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0032-arm64-dts-Added-endianness-information-to-dts-serdes.patch
@@ -27,7 +27,7 @@ Signed-off-by: Florinel Iordache <florinel.iordache at nxp.com>
  		tmu: tmu at 1f80000 {
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -834,8 +834,9 @@
+@@ -833,8 +833,9 @@
  		};
  
  		serdes1: serdes at 1ea0000 {
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0045-arm64-dts-Fix-DWC3-IP-VBUS-glitch-issue-on-Layerscap.patch b/target/linux/layerscape/patches-5.4/302-dts-0045-arm64-dts-Fix-DWC3-IP-VBUS-glitch-issue-on-Layerscap.patch
index c2b7e1fde2..10eca4a083 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0045-arm64-dts-Fix-DWC3-IP-VBUS-glitch-issue-on-Layerscap.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0045-arm64-dts-Fix-DWC3-IP-VBUS-glitch-issue-on-Layerscap.patch
@@ -98,7 +98,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -820,6 +820,7 @@
+@@ -819,6 +819,7 @@
  			snps,quirk-frame-length-adjustment = <0x20>;
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
@@ -106,7 +106,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  		};
  
  		usb1: usb3 at 3110000 {
-@@ -831,6 +832,7 @@
+@@ -830,6 +831,7 @@
  			snps,quirk-frame-length-adjustment = <0x20>;
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0051-arm64-dts-fsl-layerscape-fix-warnings-when-compiling.patch b/target/linux/layerscape/patches-5.4/302-dts-0051-arm64-dts-fsl-layerscape-fix-warnings-when-compiling.patch
index d4875bc877..7ac2f3166b 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0051-arm64-dts-fsl-layerscape-fix-warnings-when-compiling.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0051-arm64-dts-fsl-layerscape-fix-warnings-when-compiling.patch
@@ -117,7 +117,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
   *
   * Abhimanyu Saini <abhimanyu.saini at nxp.com>
   *
-@@ -525,7 +525,7 @@
+@@ -524,7 +524,7 @@
  		};
  
  		/* TODO: WRIOP (CCSR?) */
@@ -126,7 +126,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  					  * E-MDIO1: 0x1_6000
  					  */
  			compatible = "fsl,fman-memac-mdio";
-@@ -538,7 +538,7 @@
+@@ -537,7 +537,7 @@
  			#size-cells = <0>;
  		};
  
@@ -135,7 +135,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  					  * E-MDIO2: 0x1_7000
  					  */
  			compatible = "fsl,fman-memac-mdio";
-@@ -550,7 +550,7 @@
+@@ -549,7 +549,7 @@
  			#size-cells = <0>;
  		};
  
@@ -144,7 +144,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c07000 0x0 0x1000>;
  			device_type = "mdio";
-@@ -560,7 +560,7 @@
+@@ -559,7 +559,7 @@
  			#size-cells = <0>;
  		};
  
@@ -153,7 +153,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c0b000 0x0 0x1000>;
  			device_type = "mdio";
-@@ -570,7 +570,7 @@
+@@ -569,7 +569,7 @@
  			#size-cells = <0>;
  		};
  
@@ -162,7 +162,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c0f000 0x0 0x1000>;
  			device_type = "mdio";
-@@ -580,7 +580,7 @@
+@@ -579,7 +579,7 @@
  			#size-cells = <0>;
  		};
  
@@ -171,7 +171,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c13000 0x0 0x1000>;
  			device_type = "mdio";
-@@ -590,7 +590,7 @@
+@@ -589,7 +589,7 @@
  			#size-cells = <0>;
  		};
  
@@ -180,7 +180,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			status = "disabled";
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c17000 0x0 0x1000>;
-@@ -601,7 +601,7 @@
+@@ -600,7 +600,7 @@
  			#size-cells = <0>;
  		};
  
@@ -189,7 +189,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			status = "disabled";
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c1b000 0x0 0x1000>;
-@@ -612,7 +612,7 @@
+@@ -611,7 +611,7 @@
  			#size-cells = <0>;
  		};
  
@@ -198,7 +198,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			status = "disabled";
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c1f000 0x0 0x1000>;
-@@ -623,7 +623,7 @@
+@@ -622,7 +622,7 @@
  			#size-cells = <0>;
  		};
  
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0063-arm64-dts-fsl-remove-backplane-support.patch b/target/linux/layerscape/patches-5.4/302-dts-0063-arm64-dts-fsl-remove-backplane-support.patch
index d65b222c33..749df043e0 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0063-arm64-dts-fsl-remove-backplane-support.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0063-arm64-dts-fsl-remove-backplane-support.patch
@@ -260,7 +260,7 @@ Signed-off-by: Florinel Iordache <florinel.iordache at nxp.com>
  	phy-handle = <&mdio0_phy12>;
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -550,90 +550,6 @@
+@@ -549,90 +549,6 @@
  			#size-cells = <0>;
  		};
  
@@ -351,7 +351,7 @@ Signed-off-by: Florinel Iordache <florinel.iordache at nxp.com>
  		i2c0: i2c at 2000000 {
  			status = "disabled";
  			compatible = "fsl,vf610-i2c", "fsl,ls208xa-vf610-i2c";
-@@ -835,12 +751,6 @@
+@@ -834,12 +750,6 @@
  			snps,host-vbus-glitches;
  		};
  
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0070-arm64-dts-ls1012a-ls1043a-ls1046a-ls1088a-ls208xa-re.patch b/target/linux/layerscape/patches-5.4/302-dts-0070-arm64-dts-ls1012a-ls1043a-ls1046a-ls1088a-ls208xa-re.patch
index baa4c79586..78713d778e 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0070-arm64-dts-ls1012a-ls1043a-ls1046a-ls1088a-ls208xa-re.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0070-arm64-dts-ls1012a-ls1043a-ls1046a-ls1088a-ls208xa-re.patch
@@ -276,7 +276,7 @@ Signed-off-by: Biwen Li <biwen.li at nxp.com>
  	};
  
  	cpu: cpus {
-@@ -757,9 +758,16 @@
+@@ -756,9 +757,16 @@
  			interrupts = <0 12 4>;
  		};
  
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch b/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch
index 53a8a5506a..4aabcebcae 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch
@@ -34,7 +34,7 @@ Signed-off-by: Biwen Li <biwen.li at nxp.com>
  		ftm_alarm0: timer at 2800000 {
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -762,6 +762,7 @@
+@@ -761,6 +761,7 @@
  			compatible = "fsl,ls208xa-rcpm", "fsl,qoriq-rcpm-2.1+";
  			reg = <0x0 0x1e34040 0x0 0x18>;
  			#fsl,rcpm-wakeup-cells = <6>;
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0097-LF-387-5-arm64-dts-layerscape-add-chip-specific-comp.patch b/target/linux/layerscape/patches-5.4/302-dts-0097-LF-387-5-arm64-dts-layerscape-add-chip-specific-comp.patch
index 333fecb3fd..25d66a4ba6 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0097-LF-387-5-arm64-dts-layerscape-add-chip-specific-comp.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0097-LF-387-5-arm64-dts-layerscape-add-chip-specific-comp.patch
@@ -110,7 +110,7 @@ Reviewed-by: Leo Li <leo.li at nxp.com>
  			dr_mode = "host";
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -730,7 +730,7 @@
+@@ -729,7 +729,7 @@
  
  		usb0: usb3 at 3100000 {
  			status = "disabled";
@@ -119,7 +119,7 @@ Reviewed-by: Leo Li <leo.li at nxp.com>
  			reg = <0x0 0x3100000 0x0 0x10000>;
  			interrupts = <0 80 0x4>; /* Level high type */
  			dr_mode = "host";
-@@ -742,7 +742,7 @@
+@@ -741,7 +741,7 @@
  
  		usb1: usb3 at 3110000 {
  			status = "disabled";
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch b/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch
index 5d325baabc..ef719e393b 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch
@@ -122,7 +122,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -738,6 +738,7 @@
+@@ -737,6 +737,7 @@
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
  			snps,host-vbus-glitches;
@@ -130,7 +130,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  		};
  
  		usb1: usb3 at 3110000 {
-@@ -750,6 +751,7 @@
+@@ -749,6 +750,7 @@
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
  			snps,host-vbus-glitches;
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0100-arm64-dts-ls208xa-Update-qspi-node-properties-for-LS.patch b/target/linux/layerscape/patches-5.4/302-dts-0100-arm64-dts-ls208xa-Update-qspi-node-properties-for-LS.patch
index 0b2de32302..6efbe1ecf1 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0100-arm64-dts-ls208xa-Update-qspi-node-properties-for-LS.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0100-arm64-dts-ls208xa-Update-qspi-node-properties-for-LS.patch
@@ -42,7 +42,7 @@ Signed-off-by: Kuldeep Singh <kuldeep.singh at nxp.com>
  };
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -610,16 +610,16 @@
+@@ -609,16 +609,16 @@
  		};
  
  		qspi: spi at 20c0000 {
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0101-arm64-dts-ls208xa-Remove-dma-coherent-from-dwc3-node.patch b/target/linux/layerscape/patches-5.4/302-dts-0101-arm64-dts-ls208xa-Remove-dma-coherent-from-dwc3-node.patch
index dcd3beeb04..dc90175362 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0101-arm64-dts-ls208xa-Remove-dma-coherent-from-dwc3-node.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0101-arm64-dts-ls208xa-Remove-dma-coherent-from-dwc3-node.patch
@@ -18,7 +18,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
 
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -738,7 +738,6 @@
+@@ -737,7 +737,6 @@
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
  			snps,host-vbus-glitches;
@@ -26,7 +26,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  		};
  
  		usb1: usb3 at 3110000 {
-@@ -751,7 +750,6 @@
+@@ -750,7 +749,6 @@
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
  			snps,host-vbus-glitches;
diff --git a/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch b/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch
index 72b101bfb0..22d6c97a72 100644
--- a/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch
+++ b/target/linux/layerscape/patches-5.4/701-net-0273-net-dsa-ocelot-add-tsn-support-for-felix-switch.patch
@@ -658,7 +658,7 @@ Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1 at nxp.com>
  struct dsa_switch_driver {
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
-@@ -323,6 +323,10 @@ static int dsa_port_setup(struct dsa_por
+@@ -325,6 +325,10 @@ static int dsa_port_setup(struct dsa_por
  		if (err)
  			break;
  
diff --git a/target/linux/mediatek/patches-5.4/0310-mtk-bmt-support.patch b/target/linux/mediatek/patches-5.4/0310-mtk-bmt-support.patch
index 2a23f8c3dc..4cef9f9d5e 100644
--- a/target/linux/mediatek/patches-5.4/0310-mtk-bmt-support.patch
+++ b/target/linux/mediatek/patches-5.4/0310-mtk-bmt-support.patch
@@ -797,7 +797,7 @@
  
  static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
  {
-@@ -1099,6 +1100,8 @@ static int spinand_probe(struct spi_mem
+@@ -1100,6 +1101,8 @@ static int spinand_probe(struct spi_mem
  	if (ret)
  		return ret;
  
@@ -806,7 +806,7 @@
  	ret = mtd_device_register(mtd, NULL, 0);
  	if (ret)
  		goto err_spinand_cleanup;
-@@ -1124,6 +1127,7 @@ static int spinand_remove(struct spi_mem
+@@ -1125,6 +1128,7 @@ static int spinand_remove(struct spi_mem
  	if (ret)
  		return ret;
  
diff --git a/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch b/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
index e75d76b9cc..3d62f40544 100644
--- a/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
+++ b/target/linux/mediatek/patches-5.4/1011-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
@@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
  		ret = device_reset(eth->dev);
  		if (ret) {
-@@ -3104,6 +3112,16 @@ static int mtk_probe(struct platform_dev
+@@ -3106,6 +3114,16 @@ static int mtk_probe(struct platform_dev
  		}
  	}
  
diff --git a/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch b/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch
index 9eeddaeba1..cd15b20ed1 100644
--- a/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch
+++ b/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch
@@ -69,7 +69,7 @@ Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
  /* J6 */
 --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
 +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
-@@ -120,10 +120,6 @@
+@@ -126,10 +126,6 @@
  	};
  };
  
diff --git a/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch b/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch
index 0c7830cb47..b42192d9fd 100644
--- a/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch
+++ b/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch
@@ -37,7 +37,7 @@ Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
  	reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
 --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
 +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
-@@ -126,7 +126,6 @@
+@@ -132,7 +132,6 @@
  	status = "okay";
  	max-link-speed = <2>;
  	reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
diff --git a/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch b/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch
index 04002480cc..43cda3f29f 100644
--- a/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch
+++ b/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch
@@ -24,7 +24,7 @@ Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
 
 --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
 +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
-@@ -124,7 +124,6 @@
+@@ -130,7 +130,6 @@
  	pinctrl-names = "default";
  	pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>;
  	status = "okay";
diff --git a/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch
index b011b140c7..f29156340b 100644
--- a/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch
+++ b/target/linux/ramips/patches-5.4/401-net-ethernet-mediatek-support-net-labels.patch
@@ -22,9 +22,9 @@ Signed-off-by: Ren? van Dorst <opensource at vdorst.com>
  	const __be32 *_id = of_get_property(np, "reg", NULL);
  	struct phylink *phylink;
  	int phy_mode, id, err;
-@@ -3035,6 +3036,9 @@ static int mtk_add_mac(struct mtk_eth *e
- 
- 	eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;
+@@ -3037,6 +3038,9 @@ static int mtk_add_mac(struct mtk_eth *e
+ 	
+ 	of_platform_device_create(np, NULL, NULL);
  
 +	if (name)
 +		strlcpy(eth->netdev[id]->name, name, IFNAMSIZ);


From lede-commits at lists.infradead.org  Sat Jul 31 11:22:29 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 31 Jul 2021 14:22:29 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.4 to 5.4.137
In-Reply-To: <162775574965.1874.14419669165017327217@git-01.infra.openwrt.org>
References: <162775574965.1874.14419669165017327217@git-01.infra.openwrt.org>
Message-ID: <mailman.11506.1627755758.1072.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/2d5ee43dc6390d84620807c741d2cb0e272b49ce

commit 2d5ee43dc6390d84620807c741d2cb0e272b49ce
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu Jul 29 22:42:38 2021 +0200

    kernel: bump 5.4 to 5.4.137
    
    Manually rebased
      generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
    
    All others updated automatically.
    
    Compile-tested on: ramips/mt7621, armvirt/32
    Runtime-tested on: ramips/mt7621, armvirt/32
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-version.mk                          |  4 ++--
 .../802-usb-xhci-force-msi-renesas-xhci.patch      |  2 +-
 .../patches-5.4/910-unaligned_access_hacks.patch   |  2 +-
 .../patches-5.4/950-0037-Add-dwc_otg-driver.patch  |  2 +-
 .../950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch    |  8 +++----
 ...950-0043-MMC-added-alternative-MMC-driver.patch |  2 +-
 ...enet-Better-coalescing-parameter-defaults.patch |  4 ++--
 ...irk-for-host-controllers-that-don-t-updat.patch |  6 ++---
 ...mgenet-Workaround-2-for-Pi4-Ethernet-fail.patch |  2 +-
 ...Use-more-event-ring-segment-table-entries.patch |  2 +-
 ...50-0336-drm-v3d-The-third-IRQ-is-optional.patch |  2 +-
 ...f-Add-inbound-resource-parsing-to-helpers.patch |  2 +-
 .../950-0504-mmc-sdhci-Silence-MMC-warnings.patch  |  4 ++--
 ...subdev-Introduce-get-set-_mbus_config-pad.patch |  4 ++--
 ...-subdev-Remove-s-g-_mbus_config-video-ops.patch |  4 ++--
 ...973-net-bcmgenet-Reset-RBUF-on-first-open.patch | 14 ++++++------
 ...-xhci-quirks-add-link-TRB-quirk-for-VL805.patch |  4 ++--
 ...-add-support-for-performing-fake-doorbell.patch |  2 +-
 .../0003-ARM-dts-gemini-Rename-IDE-nodes.patch     |  6 ++---
 ...-mv88e6xxx-Add-support-for-port-mirroring.patch |  4 ++--
 ...8e6xxx-fix-broken-if-statement-because-of.patch |  2 +-
 target/linux/generic/config-5.4                    |  1 +
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch |  8 +++----
 ...net-add-support-for-threaded-NAPI-polling.patch | 18 +++++++--------
 ...xxx-Request-assisted-learning-on-CPU-port.patch |  2 +-
 .../810-pci_disable_common_quirks.patch            |  8 +++----
 ...s208xa-accumulated-change-to-ls208xa-boar.patch | 26 +++++++++++-----------
 ...nxp-ls208xa-add-more-thermal-zone-support.patch |  2 +-
 ...dded-endianness-information-to-dts-serdes.patch |  2 +-
 ...ix-DWC3-IP-VBUS-glitch-issue-on-Layerscap.patch |  4 ++--
 ...sl-layerscape-fix-warnings-when-compiling.patch | 20 ++++++++---------
 ...63-arm64-dts-fsl-remove-backplane-support.patch |  4 ++--
 ...s1012a-ls1043a-ls1046a-ls1088a-ls208xa-re.patch |  2 +-
 ...dts-0078-arm64-dts-fix-endianness-of-rcpm.patch |  2 +-
 ...m64-dts-layerscape-add-chip-specific-comp.patch |  4 ++--
 ...ayerscape-apply-dma-coherent-for-dwc3-nod.patch |  4 ++--
 ...s208xa-Update-qspi-node-properties-for-LS.patch |  2 +-
 ...s208xa-Remove-dma-coherent-from-dwc3-node.patch |  4 ++--
 ...CI-Disable-MSI-on-CYW4356-and-CYW4359-chi.patch |  2 +-
 ...CI-add-quirk-for-cyw4356-to-disable-D3-mo.patch |  2 +-
 ...e-MSI-on-marvel-88w9098-and-88w8997-chips.patch |  2 +-
 ...ty-serial-lpuart-add-power-domain-support.patch |  4 ++--
 ...04-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch |  2 +-
 ...al-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch |  4 ++--
 ...erial-fsl_lpuart-do-HW-reset-for-communic.patch |  4 ++--
 ...2-tty-serial-lpuart-add-runtime-pm-suppor.patch | 16 ++++++-------
 ...al-lpuart-enable-wakeup-source-for-lpuart.patch |  2 +-
 ...serial-lpuart-support-UPIO_MEM32-for-lpua.patch |  2 +-
 ...-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch |  4 ++--
 ...LK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch |  2 +-
 ...-usb-host-xhci-do-not-return-error-status.patch |  2 +-
 ...1-usb-host-xhci-add-.bus_suspend-override.patch |  2 +-
 ...b-core-print-suggested-message-if-failed-.patch |  2 +-
 ...sb-host-xhci-do-warm-reset-for-link-state.patch |  2 +-
 ...k-Wait-for-endpoint-to-be-ready-before-tr.patch |  2 +-
 ...k-Train-link-immediately-after-enabling-t.patch |  4 ++--
 .../017-PCI-aardvark-Improve-link-training.patch   | 12 +++++-----
 .../018-PCI-aardvark-Issue-PERST-via-GPIO.patch    |  8 +++----
 .../019-PCI-aardvark-Add-PHY-support.patch         |  8 +++----
 ...arvell-armada-37xx-Set-pcie_reset_pin-to-.patch |  2 +-
 ...arvell-armada-37xx-Move-PCIe-comphy-handl.patch |  2 +-
 ...arvell-armada-37xx-Move-PCIe-max-link-spe.patch |  2 +-
 ...k-Don-t-touch-PCIe-registers-if-no-card-c.patch |  2 +-
 ...k-Fix-initialization-with-old-Marvell-s-A.patch |  2 +-
 ...rk-for-Gateworks-PLX-PEX860x-switch-with-.patch |  4 ++--
 .../0031-uvc-add-iPassion-iP2970-support.patch     |  4 ++--
 66 files changed, 151 insertions(+), 150 deletions(-)

diff --git a/include/kernel-version.mk b/include/kernel-version.mk
index 782e07e0da..8531c0c3d1 100644
--- a/include/kernel-version.mk
+++ b/include/kernel-version.mk
@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-5.4 = .132
+LINUX_VERSION-5.4 = .137
 
-LINUX_KERNEL_HASH-5.4.132 = 8466adbfb3579e751ede683496df7bb20f258b5f882250f3dd82be63736d00ef
+LINUX_KERNEL_HASH-5.4.137 = f09e5e366ce5d8bde887cda229ef17138fd1653706a702221f934f99aaa31f7c
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))
diff --git a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
index 9a0bab5c4b..3c33253ec4 100644
--- a/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
+++ b/target/linux/apm821xx/patches-5.4/802-usb-xhci-force-msi-renesas-xhci.patch
@@ -43,7 +43,7 @@ produce a noisy warning.
  		hcd->msi_enabled = 1;
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1883,6 +1883,7 @@ struct xhci_hcd {
+@@ -1884,6 +1884,7 @@ struct xhci_hcd {
  	struct xhci_hub		usb2_rhub;
  	struct xhci_hub		usb3_rhub;
  	/* support xHCI 1.0 spec USB2 hardware LPM */
diff --git a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
index 99520863d3..55b198eb0c 100644
--- a/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-5.4/910-unaligned_access_hacks.patch
@@ -214,7 +214,7 @@
  #include <linux/uaccess.h>
  #include <linux/ipv6.h>
  #include <linux/icmpv6.h>
-@@ -849,10 +850,10 @@ static void tcp_v6_send_response(const s
+@@ -864,10 +865,10 @@ static void tcp_v6_send_response(const s
  	topt = (__be32 *)(t1 + 1);
  
  	if (tsecr) {
diff --git a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch
index 9280ab3f17..ea3c8abd20 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0037-Add-dwc_otg-driver.patch
@@ -1040,7 +1040,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  }
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -5321,7 +5321,7 @@ static void port_event(struct usb_hub *h
+@@ -5369,7 +5369,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.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch b/target/linux/bcm27xx/patches-5.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch
index 8fa4ddf5c8..f42c2697f3 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0040-fbdev-add-FBIOCOPYAREA-ioctl.patch
@@ -234,7 +234,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  static int bcm2708_fb_register(struct bcm2708_fb *fb)
 --- a/drivers/video/fbdev/core/fbmem.c
 +++ b/drivers/video/fbdev/core/fbmem.c
-@@ -1076,6 +1076,30 @@ fb_blank(struct fb_info *info, int blank
+@@ -1074,6 +1074,30 @@ fb_blank(struct fb_info *info, int blank
  }
  EXPORT_SYMBOL(fb_blank);
  
@@ -265,7 +265,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  static long do_fb_ioctl(struct fb_info *info, unsigned int cmd,
  			unsigned long arg)
  {
-@@ -1084,6 +1108,7 @@ static long do_fb_ioctl(struct fb_info *
+@@ -1082,6 +1106,7 @@ static long do_fb_ioctl(struct fb_info *
  	struct fb_fix_screeninfo fix;
  	struct fb_cmap cmap_from;
  	struct fb_cmap_user cmap;
@@ -273,7 +273,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	void __user *argp = (void __user *)arg;
  	long ret = 0;
  
-@@ -1159,6 +1184,15 @@ static long do_fb_ioctl(struct fb_info *
+@@ -1157,6 +1182,15 @@ static long do_fb_ioctl(struct fb_info *
  		unlock_fb_info(info);
  		console_unlock();
  		break;
@@ -289,7 +289,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	default:
  		lock_fb_info(info);
  		fb = info->fbops;
-@@ -1304,6 +1338,7 @@ static long fb_compat_ioctl(struct file
+@@ -1302,6 +1336,7 @@ static long fb_compat_ioctl(struct file
  	case FBIOPAN_DISPLAY:
  	case FBIOGET_CON2FBMAP:
  	case FBIOPUT_CON2FBMAP:
diff --git a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
index f70887855b..16db439b89 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0043-MMC-added-alternative-MMC-driver.patch
@@ -267,7 +267,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros at gmail.com>
  		goto out;
 --- a/drivers/mmc/core/core.c
 +++ b/drivers/mmc/core/core.c
-@@ -1922,7 +1922,8 @@ EXPORT_SYMBOL(mmc_erase);
+@@ -1925,7 +1925,8 @@ EXPORT_SYMBOL(mmc_erase);
  int mmc_can_erase(struct mmc_card *card)
  {
  	if ((card->host->caps & MMC_CAP_ERASE) &&
diff --git a/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch b/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch
index 3a38f64436..b245fbbbfd 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0208-bcmgenet-Better-coalescing-parameter-defaults.patch
@@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
 
 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
-@@ -2149,7 +2149,7 @@ static void bcmgenet_init_tx_ring(struct
+@@ -2150,7 +2150,7 @@ static void bcmgenet_init_tx_ring(struct
  
  	bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_PROD_INDEX);
  	bcmgenet_tdma_ring_writel(priv, index, 0, TDMA_CONS_INDEX);
@@ -27,7 +27,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
  	/* Disable rate control for now */
  	bcmgenet_tdma_ring_writel(priv, index, flow_period_val,
  				  TDMA_FLOW_PERIOD);
-@@ -3573,9 +3573,12 @@ static int bcmgenet_probe(struct platfor
+@@ -3574,9 +3574,12 @@ static int bcmgenet_probe(struct platfor
  	netif_set_real_num_rx_queues(priv->dev, priv->hw_params->rx_queues + 1);
  
  	/* Set default coalescing parameters */
diff --git a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
index e60468c848..0c3f290ea2 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0264-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch
@@ -37,7 +37,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  		pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -527,7 +527,10 @@ void xhci_find_new_dequeue_state(struct
+@@ -550,7 +550,10 @@ void xhci_find_new_dequeue_state(struct
  	struct xhci_virt_ep *ep = &dev->eps[ep_index];
  	struct xhci_ring *ep_ring;
  	struct xhci_segment *new_seg;
@@ -48,7 +48,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  	dma_addr_t addr;
  	u64 hw_dequeue;
  	bool cycle_found = false;
-@@ -565,7 +568,28 @@ void xhci_find_new_dequeue_state(struct
+@@ -588,7 +591,28 @@ void xhci_find_new_dequeue_state(struct
  	hw_dequeue = xhci_get_hw_deq(xhci, dev, ep_index, stream_id);
  	new_seg = ep_ring->deq_seg;
  	new_deq = ep_ring->dequeue;
@@ -80,7 +80,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  	/*
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1873,6 +1873,7 @@ struct xhci_hcd {
+@@ -1874,6 +1874,7 @@ struct xhci_hcd {
  #define XHCI_DEFAULT_PM_RUNTIME_ALLOW	BIT_ULL(33)
  #define XHCI_RESET_PLL_ON_DISCONNECT	BIT_ULL(34)
  #define XHCI_SNPS_BROKEN_SUSPEND    BIT_ULL(35)
diff --git a/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch b/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch
index db1866d6e7..321cdb548c 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0292-net-bcmgenet-Workaround-2-for-Pi4-Ethernet-fail.patch
@@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
  static inline void bcmgenet_writel(u32 value, void __iomem *offset)
  {
  	/* MIPS chips strapped for BE will automagically configure the
-@@ -1995,6 +1999,11 @@ static void reset_umac(struct bcmgenet_p
+@@ -1996,6 +2000,11 @@ static void reset_umac(struct bcmgenet_p
  	bcmgenet_rbuf_ctrl_set(priv, 0);
  	udelay(10);
  
diff --git a/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch
index 25c23a8257..1758e49761 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0293-xhci-Use-more-event-ring-segment-table-entries.patch
@@ -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
-@@ -1649,8 +1649,8 @@ struct urb_priv {
+@@ -1650,8 +1650,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-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch b/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch
index 97ff76a6a3..2f9eb20add 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0336-drm-v3d-The-third-IRQ-is-optional.patch
@@ -13,7 +13,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
 
 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
-@@ -3474,7 +3474,7 @@ static int bcmgenet_probe(struct platfor
+@@ -3475,7 +3475,7 @@ static int bcmgenet_probe(struct platfor
  	priv = netdev_priv(dev);
  	priv->irq0 = platform_get_irq(pdev, 0);
  	priv->irq1 = platform_get_irq(pdev, 1);
diff --git a/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch b/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch
index 6e04d425bf..86ef121230 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0441-PCI-of-Add-inbound-resource-parsing-to-helpers.patch
@@ -82,7 +82,7 @@ Cc: linux-rockchip at lists.infradead.org
  
 --- a/drivers/pci/controller/pci-aardvark.c
 +++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1049,7 +1049,8 @@ static int advk_pcie_probe(struct platfo
+@@ -1060,7 +1060,8 @@ static int advk_pcie_probe(struct platfo
  		return ret;
  	}
  
diff --git a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
index 8acdba434e..89fd58dca0 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0504-mmc-sdhci-Silence-MMC-warnings.patch
@@ -22,7 +22,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  
  #define MAX_TUNING_LOOP 40
  
-@@ -2758,7 +2758,7 @@ static void sdhci_timeout_timer(struct t
+@@ -2762,7 +2762,7 @@ static void sdhci_timeout_timer(struct t
  	spin_lock_irqsave(&host->lock, flags);
  
  	if (host->cmd && !sdhci_data_line_cmd(host->cmd)) {
@@ -31,7 +31,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  		       mmc_hostname(host->mmc));
  		sdhci_dumpregs(host);
  
-@@ -2780,7 +2780,7 @@ static void sdhci_timeout_data_timer(str
+@@ -2784,7 +2784,7 @@ static void sdhci_timeout_data_timer(str
  
  	if (host->data || host->data_cmd ||
  	    (host->cmd && sdhci_data_line_cmd(host->cmd))) {
diff --git a/target/linux/bcm27xx/patches-5.4/950-0795-media-v4l2-subdev-Introduce-get-set-_mbus_config-pad.patch b/target/linux/bcm27xx/patches-5.4/950-0795-media-v4l2-subdev-Introduce-get-set-_mbus_config-pad.patch
index 910828421b..30ca593bcc 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0795-media-v4l2-subdev-Introduce-get-set-_mbus_config-pad.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0795-media-v4l2-subdev-Introduce-get-set-_mbus_config-pad.patch
@@ -20,7 +20,7 @@ Signed-off-by: Jacopo Mondi <jacopo+renesas at jmondi.org>
 
 --- a/include/media/v4l2-subdev.h
 +++ b/include/media/v4l2-subdev.h
-@@ -670,6 +670,29 @@ struct v4l2_subdev_pad_config {
+@@ -674,6 +674,29 @@ struct v4l2_subdev_pad_config {
   *
   * @set_frame_desc: set the low level media bus frame parameters, @fd array
   *                  may be adjusted by the subdev driver to device capabilities.
@@ -50,7 +50,7 @@ Signed-off-by: Jacopo Mondi <jacopo+renesas at jmondi.org>
   */
  struct v4l2_subdev_pad_ops {
  	int (*init_cfg)(struct v4l2_subdev *sd,
-@@ -710,6 +733,10 @@ struct v4l2_subdev_pad_ops {
+@@ -714,6 +737,10 @@ struct v4l2_subdev_pad_ops {
  			      struct v4l2_mbus_frame_desc *fd);
  	int (*set_frame_desc)(struct v4l2_subdev *sd, unsigned int pad,
  			      struct v4l2_mbus_frame_desc *fd);
diff --git a/target/linux/bcm27xx/patches-5.4/950-0799-media-v4l2-subdev-Remove-s-g-_mbus_config-video-ops.patch b/target/linux/bcm27xx/patches-5.4/950-0799-media-v4l2-subdev-Remove-s-g-_mbus_config-video-ops.patch
index a7186da342..0986fa63f5 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0799-media-v4l2-subdev-Remove-s-g-_mbus_config-video-ops.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0799-media-v4l2-subdev-Remove-s-g-_mbus_config-video-ops.patch
@@ -17,7 +17,7 @@ Signed-off-by: Jacopo Mondi <jacopo+renesas at jmondi.org>
 
 --- a/include/media/v4l2-subdev.h
 +++ b/include/media/v4l2-subdev.h
-@@ -402,12 +402,6 @@ struct v4l2_mbus_frame_desc {
+@@ -406,12 +406,6 @@ struct v4l2_mbus_frame_desc {
   *
   * @query_dv_timings: callback for VIDIOC_QUERY_DV_TIMINGS() ioctl handler code.
   *
@@ -30,7 +30,7 @@ Signed-off-by: Jacopo Mondi <jacopo+renesas at jmondi.org>
   * @s_rx_buffer: set a host allocated memory buffer for the subdev. The subdev
   *	can adjust @size to a lower value and must not write more data to the
   *	buffer starting at @data than the original value of @size.
-@@ -435,10 +429,6 @@ struct v4l2_subdev_video_ops {
+@@ -439,10 +433,6 @@ struct v4l2_subdev_video_ops {
  			struct v4l2_dv_timings *timings);
  	int (*query_dv_timings)(struct v4l2_subdev *sd,
  			struct v4l2_dv_timings *timings);
diff --git a/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch b/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch
index b7f0ce0cad..706244f5c8 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0973-net-bcmgenet-Reset-RBUF-on-first-open.patch
@@ -24,16 +24,16 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
-@@ -2790,7 +2790,7 @@ static void bcmgenet_set_hw_addr(struct
+@@ -2791,7 +2791,7 @@ static void bcmgenet_set_hw_addr(struct
  }
  
  /* Returns a reusable dma control register value */
 -static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv)
 +static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv, bool flush_rx)
  {
+ 	unsigned int i;
  	u32 reg;
- 	u32 dma_ctrl;
-@@ -2809,6 +2809,14 @@ static u32 bcmgenet_dma_disable(struct b
+@@ -2816,6 +2816,14 @@ static u32 bcmgenet_dma_disable(struct b
  	udelay(10);
  	bcmgenet_umac_writel(priv, 0, UMAC_TX_FLUSH);
  
@@ -48,9 +48,9 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	return dma_ctrl;
  }
  
-@@ -2910,8 +2918,8 @@ static int bcmgenet_open(struct net_devi
- 		bcmgenet_ext_writel(priv, reg, EXT_EXT_PWR_MGMT);
- 	}
+@@ -2911,8 +2919,8 @@ static int bcmgenet_open(struct net_devi
+ 
+ 	bcmgenet_set_hw_addr(priv, dev->dev_addr);
  
 -	/* Disable RX/TX DMA and flush TX queues */
 -	dma_ctrl = bcmgenet_dma_disable(priv);
@@ -59,7 +59,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  
  	/* Reinitialize TDMA and RDMA and SW housekeeping */
  	ret = bcmgenet_init_dma(priv);
-@@ -3671,7 +3679,7 @@ static int bcmgenet_resume(struct device
+@@ -3665,7 +3673,7 @@ static int bcmgenet_resume(struct device
  		bcmgenet_power_up(priv, GENET_POWER_WOL_MAGIC);
  
  	/* Disable RX/TX DMA and flush TX queues */
diff --git a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
index 355421ee26..149fd08d06 100644
--- a/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
+++ b/target/linux/bcm27xx/patches-5.4/950-0993-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
@@ -32,7 +32,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
-@@ -624,6 +624,16 @@ void xhci_find_new_dequeue_state(struct
+@@ -647,6 +647,16 @@ void xhci_find_new_dequeue_state(struct
  
  	} while (!cycle_found || !td_last_trb_found);
  
@@ -51,7 +51,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1876,6 +1876,7 @@ struct xhci_hcd {
+@@ -1877,6 +1877,7 @@ struct xhci_hcd {
  #define XHCI_EP_CTX_BROKEN_DCS	BIT_ULL(36)
  #define XHCI_SKIP_PHY_INIT	BIT_ULL(37)
  #define XHCI_DISABLE_SPARSE	BIT_ULL(38)
diff --git a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
index 5427d7368e..72ea0cbd3b 100644
--- a/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
+++ b/target/linux/bcm53xx/patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
@@ -127,7 +127,7 @@ it on BCM4708 family.
  /*
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1873,6 +1873,7 @@ struct xhci_hcd {
+@@ -1874,6 +1874,7 @@ struct xhci_hcd {
  #define XHCI_DEFAULT_PM_RUNTIME_ALLOW	BIT_ULL(33)
  #define XHCI_RESET_PLL_ON_DISCONNECT	BIT_ULL(34)
  #define XHCI_SNPS_BROKEN_SUSPEND    BIT_ULL(35)
diff --git a/target/linux/gemini/patches-5.4/0003-ARM-dts-gemini-Rename-IDE-nodes.patch b/target/linux/gemini/patches-5.4/0003-ARM-dts-gemini-Rename-IDE-nodes.patch
index 6477b2d2a4..cf4a74f86a 100644
--- a/target/linux/gemini/patches-5.4/0003-ARM-dts-gemini-Rename-IDE-nodes.patch
+++ b/target/linux/gemini/patches-5.4/0003-ARM-dts-gemini-Rename-IDE-nodes.patch
@@ -84,7 +84,7 @@ Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
  
 --- a/arch/arm/boot/dts/gemini.dtsi
 +++ b/arch/arm/boot/dts/gemini.dtsi
-@@ -356,7 +356,7 @@
+@@ -357,7 +357,7 @@
  			};
  		};
  
@@ -93,7 +93,7 @@ Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
  			compatible = "cortina,gemini-pata", "faraday,ftide010";
  			reg = <0x63000000 0x1000>;
  			interrupts = <4 IRQ_TYPE_EDGE_RISING>;
-@@ -365,9 +365,11 @@
+@@ -366,9 +366,11 @@
  			clock-names = "PCLK";
  			sata = <&sata>;
  			status = "disabled";
@@ -106,7 +106,7 @@ Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
  			compatible = "cortina,gemini-pata", "faraday,ftide010";
  			reg = <0x63400000 0x1000>;
  			interrupts = <5 IRQ_TYPE_EDGE_RISING>;
-@@ -376,6 +378,8 @@
+@@ -377,6 +379,8 @@
  			clock-names = "PCLK";
  			sata = <&sata>;
  			status = "disabled";
diff --git a/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch
index 30ff8aeab6..a23f45075f 100644
--- a/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch
+++ b/target/linux/generic/backport-5.4/747-v5.5-net-dsa-mv88e6xxx-Add-support-for-port-mirroring.patch
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -4922,6 +4922,80 @@ static int mv88e6xxx_port_mdb_del(struct
+@@ -4926,6 +4926,80 @@ static int mv88e6xxx_port_mdb_del(struct
  	return err;
  }
  
@@ -106,7 +106,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int mv88e6xxx_port_egress_floods(struct dsa_switch *ds, int port,
  					 bool unicast, bool multicast)
  {
-@@ -4976,6 +5050,8 @@ static const struct dsa_switch_ops mv88e
+@@ -4980,6 +5054,8 @@ static const struct dsa_switch_ops mv88e
  	.port_mdb_prepare       = mv88e6xxx_port_mdb_prepare,
  	.port_mdb_add           = mv88e6xxx_port_mdb_add,
  	.port_mdb_del           = mv88e6xxx_port_mdb_del,
diff --git a/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch
index d8ec1240f7..37e7a7f2a9 100644
--- a/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch
+++ b/target/linux/generic/backport-5.4/748-v5.5-net-dsa-mv88e6xxx-fix-broken-if-statement-because-of.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -4989,7 +4989,7 @@ static void mv88e6xxx_port_mirror_del(st
+@@ -4993,7 +4993,7 @@ static void mv88e6xxx_port_mirror_del(st
  		if (chip->info->ops->set_egress_port(chip,
  						     direction,
  						     dsa_upstream_port(ds,
diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index 7a4c6b2bee..50e627297e 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -499,6 +499,7 @@ CONFIG_BASE_SMALL=0
 # CONFIG_BATTERY_MAX17040 is not set
 # CONFIG_BATTERY_MAX17042 is not set
 # CONFIG_BATTERY_MAX1721X is not set
+# CONFIG_BATTERY_RT5033 is not set
 # CONFIG_BATTERY_SBS is not set
 # CONFIG_BAYCOM_EPP is not set
 # CONFIG_BAYCOM_PAR is not set
diff --git a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 8871f3457a..4839ac5e70 100644
--- a/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-5.4/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (netif_elide_gro(skb->dev))
  		goto normal;
  
-@@ -7284,6 +7287,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -7291,6 +7294,48 @@ static void __netdev_adjacent_dev_unlink
  					   &upper_dev->adj_list.lower);
  }
  
@@ -91,7 +91,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,
-@@ -7334,6 +7379,7 @@ static int __netdev_upper_dev_link(struc
+@@ -7341,6 +7386,7 @@ static int __netdev_upper_dev_link(struc
  	if (ret)
  		return ret;
  
@@ -99,7 +99,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);
-@@ -7427,6 +7473,7 @@ void netdev_upper_dev_unlink(struct net_
+@@ -7434,6 +7480,7 @@ void netdev_upper_dev_unlink(struct net_
  
  	__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
  
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
  				      &changeupper_info.info);
  
-@@ -8157,6 +8204,7 @@ int dev_set_mac_address(struct net_devic
+@@ -8164,6 +8211,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-5.4/690-net-add-support-for-threaded-NAPI-polling.patch b/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
index b30482468b..f45efdf12b 100644
--- a/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
+++ b/target/linux/generic/pending-5.4/690-net-add-support-for-threaded-NAPI-polling.patch
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	local_irq_save(flags);
  	____napi_schedule(this_cpu_ptr(&softnet_data), n);
  	local_irq_restore(flags);
-@@ -5978,6 +5984,11 @@ EXPORT_SYMBOL(napi_schedule_prep);
+@@ -5982,6 +5988,11 @@ EXPORT_SYMBOL(napi_schedule_prep);
   */
  void __napi_schedule_irqoff(struct napi_struct *n)
  {
@@ -116,10 +116,10 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +		return;
 +	}
 +
- 	____napi_schedule(this_cpu_ptr(&softnet_data), n);
- }
- EXPORT_SYMBOL(__napi_schedule_irqoff);
-@@ -6239,9 +6250,89 @@ static void init_gro_hash(struct napi_st
+ 	if (!IS_ENABLED(CONFIG_PREEMPT_RT))
+ 		____napi_schedule(this_cpu_ptr(&softnet_data), n);
+ 	else
+@@ -6246,9 +6257,89 @@ static void init_gro_hash(struct napi_st
  	napi->gro_bitmask = 0;
  }
  
@@ -209,7 +209,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	INIT_LIST_HEAD(&napi->poll_list);
  	hrtimer_init(&napi->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_PINNED);
  	napi->timer.function = napi_watchdog;
-@@ -6258,6 +6349,7 @@ void netif_napi_add(struct net_device *d
+@@ -6265,6 +6356,7 @@ void netif_napi_add(struct net_device *d
  #ifdef CONFIG_NETPOLL
  	napi->poll_owner = -1;
  #endif
@@ -217,7 +217,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	set_bit(NAPI_STATE_SCHED, &napi->state);
  	set_bit(NAPI_STATE_NPSVC, &napi->state);
  	list_add_rcu(&napi->dev_list, &dev->napi_list);
-@@ -6298,6 +6390,7 @@ static void flush_gro_hash(struct napi_s
+@@ -6305,6 +6397,7 @@ static void flush_gro_hash(struct napi_s
  void netif_napi_del(struct napi_struct *napi)
  {
  	might_sleep();
@@ -225,7 +225,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (napi_hash_del(napi))
  		synchronize_net();
  	list_del_init(&napi->dev_list);
-@@ -6310,50 +6403,18 @@ EXPORT_SYMBOL(netif_napi_del);
+@@ -6317,50 +6410,18 @@ EXPORT_SYMBOL(netif_napi_del);
  
  static int napi_poll(struct napi_struct *n, struct list_head *repoll)
  {
@@ -280,7 +280,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	/* Some drivers may have called napi_schedule
  	 * prior to exhausting their budget.
-@@ -10333,6 +10394,10 @@ static int __init net_dev_init(void)
+@@ -10340,6 +10401,10 @@ static int __init net_dev_init(void)
  		sd->backlog.weight = weight_p;
  	}
  
diff --git a/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
index 653a782f52..cb421f164b 100644
--- a/target/linux/generic/pending-5.4/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
+++ b/target/linux/generic/pending-5.4/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
-@@ -5076,6 +5076,7 @@ static int mv88e6xxx_register_switch(str
+@@ -5080,6 +5080,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-5.4/810-pci_disable_common_quirks.patch b/target/linux/generic/pending-5.4/810-pci_disable_common_quirks.patch
index 3f89103fa2..c840a7e2c6 100644
--- a/target/linux/generic/pending-5.4/810-pci_disable_common_quirks.patch
+++ b/target/linux/generic/pending-5.4/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
-@@ -205,6 +205,7 @@ static void quirk_mmio_always_on(struct
+@@ -206,6 +206,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"
-@@ -3320,6 +3321,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -3321,6 +3322,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
-@@ -3345,6 +3348,8 @@ static void quirk_intel_ntb(struct pci_d
+@@ -3346,6 +3349,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
-@@ -3383,6 +3388,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3384,6 +3389,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/layerscape/patches-5.4/302-dts-0010-arm64-dts-ls208xa-accumulated-change-to-ls208xa-boar.patch b/target/linux/layerscape/patches-5.4/302-dts-0010-arm64-dts-ls208xa-accumulated-change-to-ls208xa-boar.patch
index 2b1bd825a4..a763e05724 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0010-arm64-dts-ls208xa-accumulated-change-to-ls208xa-boar.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0010-arm64-dts-ls208xa-accumulated-change-to-ls208xa-boar.patch
@@ -702,7 +702,7 @@ binding
  	};
  
  	pmu {
-@@ -560,15 +559,126 @@
+@@ -559,15 +558,126 @@
  			#interrupt-cells = <2>;
  		};
  
@@ -831,7 +831,7 @@ binding
  		};
  
  		i2c1: i2c at 2010000 {
-@@ -579,7 +689,7 @@
+@@ -578,7 +688,7 @@
  			reg = <0x0 0x2010000 0x0 0x10000>;
  			interrupts = <0 34 0x4>; /* Level high type */
  			clock-names = "i2c";
@@ -840,7 +840,7 @@ binding
  		};
  
  		i2c2: i2c at 2020000 {
-@@ -590,7 +700,7 @@
+@@ -589,7 +699,7 @@
  			reg = <0x0 0x2020000 0x0 0x10000>;
  			interrupts = <0 35 0x4>; /* Level high type */
  			clock-names = "i2c";
@@ -849,7 +849,7 @@ binding
  		};
  
  		i2c3: i2c at 2030000 {
-@@ -601,7 +711,7 @@
+@@ -600,7 +710,7 @@
  			reg = <0x0 0x2030000 0x0 0x10000>;
  			interrupts = <0 35 0x4>; /* Level high type */
  			clock-names = "i2c";
@@ -858,7 +858,7 @@ binding
  		};
  
  		ifc: ifc at 2240000 {
-@@ -633,8 +743,8 @@
+@@ -632,8 +742,8 @@
  		pcie1: pcie at 3400000 {
  			compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
  			reg-names = "regs", "config";
@@ -869,7 +869,7 @@ binding
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -642,6 +752,7 @@
+@@ -641,6 +751,7 @@
  			num-viewport = <6>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -877,7 +877,7 @@ binding
  			#interrupt-cells = <1>;
  			interrupt-map-mask = <0 0 0 7>;
  			interrupt-map = <0000 0 0 1 &gic 0 0 0 109 4>,
-@@ -654,8 +765,8 @@
+@@ -653,8 +764,8 @@
  		pcie2: pcie at 3500000 {
  			compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
  			reg-names = "regs", "config";
@@ -888,7 +888,7 @@ binding
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -663,6 +774,7 @@
+@@ -662,6 +773,7 @@
  			num-viewport = <6>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -896,7 +896,7 @@ binding
  			#interrupt-cells = <1>;
  			interrupt-map-mask = <0 0 0 7>;
  			interrupt-map = <0000 0 0 1 &gic 0 0 0 114 4>,
-@@ -675,8 +787,8 @@
+@@ -674,8 +786,8 @@
  		pcie3: pcie at 3600000 {
  			compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
  			reg-names = "regs", "config";
@@ -907,7 +907,7 @@ binding
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -684,6 +796,7 @@
+@@ -683,6 +795,7 @@
  			num-viewport = <256>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -915,7 +915,7 @@ binding
  			#interrupt-cells = <1>;
  			interrupt-map-mask = <0 0 0 7>;
  			interrupt-map = <0000 0 0 1 &gic 0 0 0 119 4>,
-@@ -696,8 +809,8 @@
+@@ -695,8 +808,8 @@
  		pcie4: pcie at 3700000 {
  			compatible = "fsl,ls2080a-pcie", "fsl,ls2085a-pcie";
  			reg-names = "regs", "config";
@@ -926,7 +926,7 @@ binding
  			#address-cells = <3>;
  			#size-cells = <2>;
  			device_type = "pci";
-@@ -705,6 +818,7 @@
+@@ -704,6 +817,7 @@
  			num-viewport = <6>;
  			bus-range = <0x0 0xff>;
  			msi-parent = <&its>;
@@ -934,7 +934,7 @@ binding
  			#interrupt-cells = <1>;
  			interrupt-map-mask = <0 0 0 7>;
  			interrupt-map = <0000 0 0 1 &gic 0 0 0 124 4>,
-@@ -754,11 +868,22 @@
+@@ -753,11 +867,22 @@
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
  		};
  
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0025-arm64-dts-nxp-ls208xa-add-more-thermal-zone-support.patch b/target/linux/layerscape/patches-5.4/302-dts-0025-arm64-dts-nxp-ls208xa-add-more-thermal-zone-support.patch
index 42deb82ea3..5434e1f913 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0025-arm64-dts-nxp-ls208xa-add-more-thermal-zone-support.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0025-arm64-dts-nxp-ls208xa-add-more-thermal-zone-support.patch
@@ -146,7 +146,7 @@ Signed-off-by: Yuantian Tang <andy.tang at nxp.com>
  
  	timer: timer {
  		compatible = "arm,armv8-timer";
-@@ -907,3 +872,36 @@
+@@ -906,3 +871,36 @@
  		};
  	};
  };
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0032-arm64-dts-Added-endianness-information-to-dts-serdes.patch b/target/linux/layerscape/patches-5.4/302-dts-0032-arm64-dts-Added-endianness-information-to-dts-serdes.patch
index 2552506815..b19431d567 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0032-arm64-dts-Added-endianness-information-to-dts-serdes.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0032-arm64-dts-Added-endianness-information-to-dts-serdes.patch
@@ -27,7 +27,7 @@ Signed-off-by: Florinel Iordache <florinel.iordache at nxp.com>
  		tmu: tmu at 1f80000 {
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -834,8 +834,9 @@
+@@ -833,8 +833,9 @@
  		};
  
  		serdes1: serdes at 1ea0000 {
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0045-arm64-dts-Fix-DWC3-IP-VBUS-glitch-issue-on-Layerscap.patch b/target/linux/layerscape/patches-5.4/302-dts-0045-arm64-dts-Fix-DWC3-IP-VBUS-glitch-issue-on-Layerscap.patch
index c2b7e1fde2..10eca4a083 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0045-arm64-dts-Fix-DWC3-IP-VBUS-glitch-issue-on-Layerscap.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0045-arm64-dts-Fix-DWC3-IP-VBUS-glitch-issue-on-Layerscap.patch
@@ -98,7 +98,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -820,6 +820,7 @@
+@@ -819,6 +819,7 @@
  			snps,quirk-frame-length-adjustment = <0x20>;
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
@@ -106,7 +106,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  		};
  
  		usb1: usb3 at 3110000 {
-@@ -831,6 +832,7 @@
+@@ -830,6 +831,7 @@
  			snps,quirk-frame-length-adjustment = <0x20>;
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0051-arm64-dts-fsl-layerscape-fix-warnings-when-compiling.patch b/target/linux/layerscape/patches-5.4/302-dts-0051-arm64-dts-fsl-layerscape-fix-warnings-when-compiling.patch
index d4875bc877..7ac2f3166b 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0051-arm64-dts-fsl-layerscape-fix-warnings-when-compiling.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0051-arm64-dts-fsl-layerscape-fix-warnings-when-compiling.patch
@@ -117,7 +117,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
   *
   * Abhimanyu Saini <abhimanyu.saini at nxp.com>
   *
-@@ -525,7 +525,7 @@
+@@ -524,7 +524,7 @@
  		};
  
  		/* TODO: WRIOP (CCSR?) */
@@ -126,7 +126,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  					  * E-MDIO1: 0x1_6000
  					  */
  			compatible = "fsl,fman-memac-mdio";
-@@ -538,7 +538,7 @@
+@@ -537,7 +537,7 @@
  			#size-cells = <0>;
  		};
  
@@ -135,7 +135,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  					  * E-MDIO2: 0x1_7000
  					  */
  			compatible = "fsl,fman-memac-mdio";
-@@ -550,7 +550,7 @@
+@@ -549,7 +549,7 @@
  			#size-cells = <0>;
  		};
  
@@ -144,7 +144,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c07000 0x0 0x1000>;
  			device_type = "mdio";
-@@ -560,7 +560,7 @@
+@@ -559,7 +559,7 @@
  			#size-cells = <0>;
  		};
  
@@ -153,7 +153,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c0b000 0x0 0x1000>;
  			device_type = "mdio";
-@@ -570,7 +570,7 @@
+@@ -569,7 +569,7 @@
  			#size-cells = <0>;
  		};
  
@@ -162,7 +162,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c0f000 0x0 0x1000>;
  			device_type = "mdio";
-@@ -580,7 +580,7 @@
+@@ -579,7 +579,7 @@
  			#size-cells = <0>;
  		};
  
@@ -171,7 +171,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c13000 0x0 0x1000>;
  			device_type = "mdio";
-@@ -590,7 +590,7 @@
+@@ -589,7 +589,7 @@
  			#size-cells = <0>;
  		};
  
@@ -180,7 +180,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			status = "disabled";
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c17000 0x0 0x1000>;
-@@ -601,7 +601,7 @@
+@@ -600,7 +600,7 @@
  			#size-cells = <0>;
  		};
  
@@ -189,7 +189,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			status = "disabled";
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c1b000 0x0 0x1000>;
-@@ -612,7 +612,7 @@
+@@ -611,7 +611,7 @@
  			#size-cells = <0>;
  		};
  
@@ -198,7 +198,7 @@ Signed-off-by: Pankaj Bansal <pankaj.bansal at nxp.com>
  			status = "disabled";
  			compatible = "fsl,fman-memac-mdio";
  			reg = <0x0 0x8c1f000 0x0 0x1000>;
-@@ -623,7 +623,7 @@
+@@ -622,7 +622,7 @@
  			#size-cells = <0>;
  		};
  
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0063-arm64-dts-fsl-remove-backplane-support.patch b/target/linux/layerscape/patches-5.4/302-dts-0063-arm64-dts-fsl-remove-backplane-support.patch
index d65b222c33..749df043e0 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0063-arm64-dts-fsl-remove-backplane-support.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0063-arm64-dts-fsl-remove-backplane-support.patch
@@ -260,7 +260,7 @@ Signed-off-by: Florinel Iordache <florinel.iordache at nxp.com>
  	phy-handle = <&mdio0_phy12>;
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -550,90 +550,6 @@
+@@ -549,90 +549,6 @@
  			#size-cells = <0>;
  		};
  
@@ -351,7 +351,7 @@ Signed-off-by: Florinel Iordache <florinel.iordache at nxp.com>
  		i2c0: i2c at 2000000 {
  			status = "disabled";
  			compatible = "fsl,vf610-i2c", "fsl,ls208xa-vf610-i2c";
-@@ -835,12 +751,6 @@
+@@ -834,12 +750,6 @@
  			snps,host-vbus-glitches;
  		};
  
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0070-arm64-dts-ls1012a-ls1043a-ls1046a-ls1088a-ls208xa-re.patch b/target/linux/layerscape/patches-5.4/302-dts-0070-arm64-dts-ls1012a-ls1043a-ls1046a-ls1088a-ls208xa-re.patch
index baa4c79586..78713d778e 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0070-arm64-dts-ls1012a-ls1043a-ls1046a-ls1088a-ls208xa-re.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0070-arm64-dts-ls1012a-ls1043a-ls1046a-ls1088a-ls208xa-re.patch
@@ -276,7 +276,7 @@ Signed-off-by: Biwen Li <biwen.li at nxp.com>
  	};
  
  	cpu: cpus {
-@@ -757,9 +758,16 @@
+@@ -756,9 +757,16 @@
  			interrupts = <0 12 4>;
  		};
  
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch b/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch
index 53a8a5506a..4aabcebcae 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0078-arm64-dts-fix-endianness-of-rcpm.patch
@@ -34,7 +34,7 @@ Signed-off-by: Biwen Li <biwen.li at nxp.com>
  		ftm_alarm0: timer at 2800000 {
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -762,6 +762,7 @@
+@@ -761,6 +761,7 @@
  			compatible = "fsl,ls208xa-rcpm", "fsl,qoriq-rcpm-2.1+";
  			reg = <0x0 0x1e34040 0x0 0x18>;
  			#fsl,rcpm-wakeup-cells = <6>;
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0097-LF-387-5-arm64-dts-layerscape-add-chip-specific-comp.patch b/target/linux/layerscape/patches-5.4/302-dts-0097-LF-387-5-arm64-dts-layerscape-add-chip-specific-comp.patch
index 333fecb3fd..25d66a4ba6 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0097-LF-387-5-arm64-dts-layerscape-add-chip-specific-comp.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0097-LF-387-5-arm64-dts-layerscape-add-chip-specific-comp.patch
@@ -110,7 +110,7 @@ Reviewed-by: Leo Li <leo.li at nxp.com>
  			dr_mode = "host";
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -730,7 +730,7 @@
+@@ -729,7 +729,7 @@
  
  		usb0: usb3 at 3100000 {
  			status = "disabled";
@@ -119,7 +119,7 @@ Reviewed-by: Leo Li <leo.li at nxp.com>
  			reg = <0x0 0x3100000 0x0 0x10000>;
  			interrupts = <0 80 0x4>; /* Level high type */
  			dr_mode = "host";
-@@ -742,7 +742,7 @@
+@@ -741,7 +741,7 @@
  
  		usb1: usb3 at 3110000 {
  			status = "disabled";
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch b/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch
index 5d325baabc..ef719e393b 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0099-arm64-dts-layerscape-apply-dma-coherent-for-dwc3-nod.patch
@@ -122,7 +122,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -738,6 +738,7 @@
+@@ -737,6 +737,7 @@
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
  			snps,host-vbus-glitches;
@@ -130,7 +130,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  		};
  
  		usb1: usb3 at 3110000 {
-@@ -750,6 +751,7 @@
+@@ -749,6 +750,7 @@
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
  			snps,host-vbus-glitches;
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0100-arm64-dts-ls208xa-Update-qspi-node-properties-for-LS.patch b/target/linux/layerscape/patches-5.4/302-dts-0100-arm64-dts-ls208xa-Update-qspi-node-properties-for-LS.patch
index 0b2de32302..6efbe1ecf1 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0100-arm64-dts-ls208xa-Update-qspi-node-properties-for-LS.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0100-arm64-dts-ls208xa-Update-qspi-node-properties-for-LS.patch
@@ -42,7 +42,7 @@ Signed-off-by: Kuldeep Singh <kuldeep.singh at nxp.com>
  };
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -610,16 +610,16 @@
+@@ -609,16 +609,16 @@
  		};
  
  		qspi: spi at 20c0000 {
diff --git a/target/linux/layerscape/patches-5.4/302-dts-0101-arm64-dts-ls208xa-Remove-dma-coherent-from-dwc3-node.patch b/target/linux/layerscape/patches-5.4/302-dts-0101-arm64-dts-ls208xa-Remove-dma-coherent-from-dwc3-node.patch
index dcd3beeb04..dc90175362 100644
--- a/target/linux/layerscape/patches-5.4/302-dts-0101-arm64-dts-ls208xa-Remove-dma-coherent-from-dwc3-node.patch
+++ b/target/linux/layerscape/patches-5.4/302-dts-0101-arm64-dts-ls208xa-Remove-dma-coherent-from-dwc3-node.patch
@@ -18,7 +18,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
 
 --- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
 +++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
-@@ -738,7 +738,6 @@
+@@ -737,7 +737,6 @@
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
  			snps,host-vbus-glitches;
@@ -26,7 +26,7 @@ Signed-off-by: Ran Wang <ran.wang_1 at nxp.com>
  		};
  
  		usb1: usb3 at 3110000 {
-@@ -751,7 +750,6 @@
+@@ -750,7 +749,6 @@
  			snps,dis_rxdet_inp3_quirk;
  			snps,incr-burst-type-adjustment = <1>, <4>, <8>, <16>;
  			snps,host-vbus-glitches;
diff --git a/target/linux/layerscape/patches-5.4/812-pcie-0005-MLK-20684-PCI-Disable-MSI-on-CYW4356-and-CYW4359-chi.patch b/target/linux/layerscape/patches-5.4/812-pcie-0005-MLK-20684-PCI-Disable-MSI-on-CYW4356-and-CYW4359-chi.patch
index 5a00cf765f..5163f5fd95 100644
--- a/target/linux/layerscape/patches-5.4/812-pcie-0005-MLK-20684-PCI-Disable-MSI-on-CYW4356-and-CYW4359-chi.patch
+++ b/target/linux/layerscape/patches-5.4/812-pcie-0005-MLK-20684-PCI-Disable-MSI-on-CYW4356-and-CYW4359-chi.patch
@@ -19,7 +19,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
 
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -2523,6 +2523,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VI
+@@ -2524,6 +2524,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VI
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT3364, quirk_disable_all_msi);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8380_0, quirk_disable_all_msi);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, 0x0761, quirk_disable_all_msi);
diff --git a/target/linux/layerscape/patches-5.4/812-pcie-0006-MLK-20716-PCI-add-quirk-for-cyw4356-to-disable-D3-mo.patch b/target/linux/layerscape/patches-5.4/812-pcie-0006-MLK-20716-PCI-add-quirk-for-cyw4356-to-disable-D3-mo.patch
index cb81748844..1f9eb5c83c 100644
--- a/target/linux/layerscape/patches-5.4/812-pcie-0006-MLK-20716-PCI-add-quirk-for-cyw4356-to-disable-D3-mo.patch
+++ b/target/linux/layerscape/patches-5.4/812-pcie-0006-MLK-20716-PCI-add-quirk-for-cyw4356-to-disable-D3-mo.patch
@@ -17,7 +17,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade at mentor.com>
 
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -1356,6 +1356,10 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR
+@@ -1357,6 +1357,10 @@ DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR
     occur when mode detecting */
  DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_VENDOR_ID_VIA, PCI_ANY_ID,
  				PCI_CLASS_STORAGE_IDE, 8, quirk_no_ata_d3);
diff --git a/target/linux/layerscape/patches-5.4/812-pcie-0007-PCI-Disable-MSI-on-marvel-88w9098-and-88w8997-chips.patch b/target/linux/layerscape/patches-5.4/812-pcie-0007-PCI-Disable-MSI-on-marvel-88w9098-and-88w8997-chips.patch
index 835b5cedb9..98d556386d 100644
--- a/target/linux/layerscape/patches-5.4/812-pcie-0007-PCI-Disable-MSI-on-marvel-88w9098-and-88w8997-chips.patch
+++ b/target/linux/layerscape/patches-5.4/812-pcie-0007-PCI-Disable-MSI-on-marvel-88w9098-and-88w8997-chips.patch
@@ -14,7 +14,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
 
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -2529,6 +2529,9 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VI
+@@ -2530,6 +2530,9 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VI
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_SI, 0x0761, quirk_disable_all_msi);
  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x43ec, quirk_disable_all_msi);
  DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_BROADCOM, 0x43ef, quirk_disable_all_msi);
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch
index ce93640b55..120a14c3be 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0001-tty-serial-lpuart-add-power-domain-support.patch
@@ -27,7 +27,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
  #include <linux/serial_core.h>
  #include <linux/slab.h>
  #include <linux/tty_flip.h>
-@@ -2391,6 +2393,54 @@ static struct uart_driver lpuart_reg = {
+@@ -2394,6 +2396,54 @@ static struct uart_driver lpuart_reg = {
  	.cons		= LPUART_CONSOLE,
  };
  
@@ -82,7 +82,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
  static int lpuart_probe(struct platform_device *pdev)
  {
  	const struct of_device_id *of_id = of_match_device(lpuart_dt_ids,
-@@ -2428,6 +2478,10 @@ static int lpuart_probe(struct platform_
+@@ -2431,6 +2481,10 @@ static int lpuart_probe(struct platform_
  
  	sport->port.rs485_config = lpuart_config_rs485;
  
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch b/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch
index f3ff330281..5ea3d50c37 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0004-MLK-18137-fsl_lpuart-Fix-loopback-mode.patch
@@ -17,7 +17,7 @@ Signed-off-by: Adriana Reus <adriana.reus at nxp.com>
 
 --- a/drivers/tty/serial/fsl_lpuart.c
 +++ b/drivers/tty/serial/fsl_lpuart.c
-@@ -2476,7 +2476,7 @@ static int lpuart_probe(struct platform_
+@@ -2479,7 +2479,7 @@ static int lpuart_probe(struct platform_
  		return PTR_ERR(sport->port.membase);
  
  	sport->port.membase += sdata->reg_off;
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch
index 6edcc398d0..f07abc2469 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0005-tty-serial-fsl_lpuart-enable-dma-mode-for-imx8qxp.patch
@@ -536,7 +536,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
  		lpuart_dma_rx_free(&sport->port);
  	}
  
-@@ -2480,6 +2636,10 @@ static int lpuart_probe(struct platform_
+@@ -2483,6 +2639,10 @@ static int lpuart_probe(struct platform_
  	sport->port.dev = &pdev->dev;
  	sport->port.type = PORT_LPUART;
  	sport->devtype = sdata->devtype;
@@ -547,7 +547,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
  	ret = platform_get_irq(pdev, 0);
  	if (ret < 0)
  		return ret;
-@@ -2642,7 +2802,7 @@ static int lpuart_suspend(struct device
+@@ -2645,7 +2805,7 @@ static int lpuart_suspend(struct device
  		 * Rx DMA path before suspend and start Rx DMA path on resume.
  		 */
  		if (irq_wake) {
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch
index ab52567a3c..a655a5df01 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0008-MLK-21445-serial-fsl_lpuart-do-HW-reset-for-communic.patch
@@ -105,7 +105,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade at mentor.com>
  static void lpuart_stop_tx(struct uart_port *port)
  {
  	unsigned char temp;
-@@ -2728,6 +2770,10 @@ static int lpuart_probe(struct platform_
+@@ -2731,6 +2773,10 @@ static int lpuart_probe(struct platform_
  	if (ret)
  		goto failed_attach_port;
  
@@ -116,7 +116,7 @@ Signed-off-by: Shrikant Bobade <Shrikant_Bobade at mentor.com>
  	uart_get_rs485_mode(&pdev->dev, &sport->port.rs485);
  
  	if (sport->port.rs485.flags & SER_RS485_RX_DURING_TX)
-@@ -2751,6 +2797,8 @@ static int lpuart_probe(struct platform_
+@@ -2754,6 +2800,8 @@ static int lpuart_probe(struct platform_
  
  	return 0;
  
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch
index d819f4790a..5c0329583b 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0009-MLK-17133-02-tty-serial-lpuart-add-runtime-pm-suppor.patch
@@ -59,7 +59,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  	.set_termios	= lpuart32_set_termios,
  	.type		= lpuart_type,
  	.request_port	= lpuart_request_port,
-@@ -2766,6 +2783,11 @@ static int lpuart_probe(struct platform_
+@@ -2769,6 +2786,11 @@ static int lpuart_probe(struct platform_
  	if (ret)
  		goto failed_irq_request;
  
@@ -71,7 +71,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  	ret = uart_add_one_port(&lpuart_reg, &sport->port);
  	if (ret)
  		goto failed_attach_port;
-@@ -2800,6 +2822,9 @@ static int lpuart_probe(struct platform_
+@@ -2803,6 +2825,9 @@ static int lpuart_probe(struct platform_
  failed_reset:
  	uart_remove_one_port(&lpuart_reg, &sport->port);
  failed_attach_port:
@@ -81,7 +81,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  failed_irq_request:
  	lpuart_disable_clks(sport);
  failed_clock_enable:
-@@ -2826,15 +2851,41 @@ static int lpuart_remove(struct platform
+@@ -2829,15 +2854,41 @@ static int lpuart_remove(struct platform
  	if (sport->dma_rx_chan)
  		dma_release_channel(sport->dma_rx_chan);
  
@@ -123,7 +123,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  
  	if (lpuart_is_32(sport)) {
  		/* disable Rx/Tx and interrupts */
-@@ -2848,10 +2899,14 @@ static int lpuart_suspend(struct device
+@@ -2851,10 +2902,14 @@ static int lpuart_suspend(struct device
  		writeb(temp, sport->port.membase + UARTCR2);
  	}
  
@@ -138,7 +138,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  
  	if (sport->lpuart_dma_rx_use) {
  		/*
-@@ -2882,9 +2937,6 @@ static int lpuart_suspend(struct device
+@@ -2885,9 +2940,6 @@ static int lpuart_suspend(struct device
  		dmaengine_terminate_all(sport->dma_tx_chan);
  	}
  
@@ -148,7 +148,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  	return 0;
  }
  
-@@ -2892,9 +2944,11 @@ static int lpuart_resume(struct device *
+@@ -2895,9 +2947,11 @@ static int lpuart_resume(struct device *
  {
  	struct lpuart_port *sport = dev_get_drvdata(dev);
  	bool irq_wake = irqd_is_wakeup_set(irq_get_irq_data(sport->port.irq));
@@ -162,7 +162,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  
  	if (lpuart_is_32(sport))
  		lpuart32_setup_watermark_enable(sport);
-@@ -2915,13 +2969,23 @@ static int lpuart_resume(struct device *
+@@ -2918,13 +2972,23 @@ static int lpuart_resume(struct device *
  	if (lpuart_is_32(sport))
  		lpuart32_configure(sport);
  
@@ -188,7 +188,7 @@ Reviewed-by: Robin Gong <yibin.gong at nxp.com>
  
  static struct platform_driver lpuart_driver = {
  	.probe		= lpuart_probe,
-@@ -2929,7 +2993,7 @@ static struct platform_driver lpuart_dri
+@@ -2932,7 +2996,7 @@ static struct platform_driver lpuart_dri
  	.driver		= {
  		.name	= "fsl-lpuart",
  		.of_match_table = lpuart_dt_ids,
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch
index 69dc1b465a..1f42e5cb5d 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0010-tty-serial-lpuart-enable-wakeup-source-for-lpuart.patch
@@ -117,7 +117,7 @@ Signed-off-by: Fugang Duan <fugang.duan at nxp.com>
  	return 0;
  }
  
-@@ -2876,108 +2890,205 @@ static int lpuart_runtime_resume(struct
+@@ -2879,108 +2893,205 @@ static int lpuart_runtime_resume(struct
  	return lpuart_enable_clks(sport);
  };
  
diff --git a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch
index 4223d1e2f2..522d7023ca 100644
--- a/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch
+++ b/target/linux/layerscape/patches-5.4/819-uart-0013-LF-484-tty-serial-lpuart-support-UPIO_MEM32-for-lpua.patch
@@ -24,7 +24,7 @@ Signed-off-by: Peng Fan <peng.fan at nxp.com>
 
 --- a/drivers/tty/serial/fsl_lpuart.c
 +++ b/drivers/tty/serial/fsl_lpuart.c
-@@ -2614,7 +2614,9 @@ static int __init lpuart32_early_console
+@@ -2617,7 +2617,9 @@ static int __init lpuart32_early_console
  	if (!device->port.membase)
  		return -ENODEV;
  
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
index 58cccfff5e..ffe429929b 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0015-MLK-17380-4-usb-host-xhci-add-EH-SINGLE_STEP_SET_FEA.patch
@@ -42,7 +42,7 @@ Signed-off-by: Peter Chen <peter.chen at nxp.com>
  			retval = xhci_enter_test_mode(xhci, test_mode, wIndex,
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -3592,6 +3592,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
+@@ -3624,6 +3624,129 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
  	return 0;
  }
  
@@ -184,7 +184,7 @@ Signed-off-by: Peter Chen <peter.chen at nxp.com>
  void xhci_init_driver(struct hc_driver *drv,
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -2150,6 +2150,16 @@ int xhci_find_raw_port_number(struct usb
+@@ -2151,6 +2151,16 @@ int xhci_find_raw_port_number(struct usb
  struct xhci_hub *xhci_get_rhub(struct usb_hcd *hcd);
  
  void xhci_hc_died(struct xhci_hcd *xhci);
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch
index 40d6399439..e866bef1df 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch
@@ -32,7 +32,7 @@ Signed-off-by: Peter Chen <peter.chen at nxp.com>
  	ret = xhci_handshake(&xhci->op_regs->command,
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1873,6 +1873,7 @@ struct xhci_hcd {
+@@ -1874,6 +1874,7 @@ struct xhci_hcd {
  #define XHCI_DEFAULT_PM_RUNTIME_ALLOW	BIT_ULL(33)
  #define XHCI_RESET_PLL_ON_DISCONNECT	BIT_ULL(34)
  #define XHCI_SNPS_BROKEN_SUSPEND    BIT_ULL(35)
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
index b08633eb88..637d514d76 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0017-MLK-19153-2-usb-host-xhci-do-not-return-error-status.patch
@@ -22,7 +22,7 @@ Signed-off-by: Peter Chen <peter.chen at nxp.com>
 
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -2058,12 +2058,9 @@ static int process_ctrl_td(struct xhci_h
+@@ -2091,12 +2091,9 @@ static int process_ctrl_td(struct xhci_h
  
  	switch (trb_comp_code) {
  	case COMP_SUCCESS:
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
index 3f805756fa..2fc5ba3f06 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0018-MLK-18794-1-usb-host-xhci-add-.bus_suspend-override.patch
@@ -35,7 +35,7 @@ Signed-off-by: Peter Chen <peter.chen at nxp.com>
  EXPORT_SYMBOL_GPL(xhci_init_driver);
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1916,6 +1916,7 @@ struct xhci_driver_overrides {
+@@ -1917,6 +1917,7 @@ struct xhci_driver_overrides {
  	int (*start)(struct usb_hcd *hcd);
  	int (*check_bandwidth)(struct usb_hcd *, struct usb_device *);
  	void (*reset_bandwidth)(struct usb_hcd *, struct usb_device *);
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch b/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch
index e444af408a..e02f08579c 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0019-MLK-9829-usb-core-print-suggested-message-if-failed-.patch
@@ -20,7 +20,7 @@ Signed-off-by: Li Jun <jun.li at freescale.com>
 
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -4731,7 +4731,8 @@ hub_port_init(struct usb_hub *hub, struc
+@@ -4779,7 +4779,8 @@ hub_port_init(struct usb_hub *hub, struc
  			}
  			if (r) {
  				if (r != -ENODEV)
diff --git a/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch b/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch
index fd64f2f10b..00034e38f3 100644
--- a/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch
+++ b/target/linux/layerscape/patches-5.4/820-usb-0021-MLK-22099-usb-host-xhci-do-warm-reset-for-link-state.patch
@@ -16,7 +16,7 @@ Signed-off-by: Li Jun <jun.li at nxp.com>
 
 --- a/drivers/usb/host/xhci-hub.c
 +++ b/drivers/usb/host/xhci-hub.c
-@@ -1737,7 +1737,8 @@ static bool xhci_port_missing_cas_quirk(
+@@ -1738,7 +1738,8 @@ static bool xhci_port_missing_cas_quirk(
  		return false;
  
  	if (((portsc & PORT_PLS_MASK) != XDEV_POLLING) &&
diff --git a/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch b/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch
index 2df3306157..31f5accab6 100644
--- a/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch
+++ b/target/linux/mvebu/patches-5.4/001-PCI-aardvark-Wait-for-endpoint-to-be-ready-before-tr.patch
@@ -33,7 +33,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
 
 --- a/drivers/pci/controller/pci-aardvark.c
 +++ b/drivers/pci/controller/pci-aardvark.c
-@@ -338,6 +338,14 @@ static void advk_pcie_setup_hw(struct ad
+@@ -349,6 +349,14 @@ static void advk_pcie_setup_hw(struct ad
  	reg |= PIO_CTRL_ADDR_WIN_DISABLE;
  	advk_writel(pcie, reg, PIO_CTRL);
  
diff --git a/target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch b/target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch
index c9e49ac2f1..3ff0dcb166 100644
--- a/target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch
+++ b/target/linux/mvebu/patches-5.4/016-PCI-aardvark-Train-link-immediately-after-enabling-t.patch
@@ -29,7 +29,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
 
 --- a/drivers/pci/controller/pci-aardvark.c
 +++ b/drivers/pci/controller/pci-aardvark.c
-@@ -300,11 +300,6 @@ static void advk_pcie_setup_hw(struct ad
+@@ -311,11 +311,6 @@ static void advk_pcie_setup_hw(struct ad
  	reg |= LANE_COUNT_1;
  	advk_writel(pcie, reg, PCIE_CORE_CTRL0_REG);
  
@@ -41,7 +41,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	/* Enable MSI */
  	reg = advk_readl(pcie, PCIE_CORE_CTRL2_REG);
  	reg |= PCIE_CORE_CTRL2_MSI_ENABLE;
-@@ -346,7 +341,15 @@ static void advk_pcie_setup_hw(struct ad
+@@ -357,7 +352,15 @@ static void advk_pcie_setup_hw(struct ad
  	 */
  	msleep(PCI_PM_D3COLD_WAIT);
  
diff --git a/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch b/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch
index 19d0a5d513..e3a38740c3 100644
--- a/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch
+++ b/target/linux/mvebu/patches-5.4/017-PCI-aardvark-Improve-link-training.patch
@@ -42,7 +42,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  #define     PCIE_CORE_LINK_WIDTH_SHIFT				20
  #define PCIE_CORE_ERR_CAPCTL_REG				0x118
  #define     PCIE_CORE_ERR_CAPCTL_ECRC_CHK_TX			BIT(5)
-@@ -201,6 +202,7 @@ struct advk_pcie {
+@@ -202,6 +203,7 @@ struct advk_pcie {
  	struct mutex msi_used_lock;
  	u16 msi_msg;
  	int root_bus_nr;
@@ -50,7 +50,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	struct pci_bridge_emul bridge;
  };
  
-@@ -225,20 +227,16 @@ static int advk_pcie_link_up(struct advk
+@@ -226,20 +228,16 @@ static int advk_pcie_link_up(struct advk
  
  static int advk_pcie_wait_for_link(struct advk_pcie *pcie)
  {
@@ -72,7 +72,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	return -ETIMEDOUT;
  }
  
-@@ -253,6 +251,85 @@ static void advk_pcie_wait_for_retrain(s
+@@ -254,6 +252,85 @@ static void advk_pcie_wait_for_retrain(s
  	}
  }
  
@@ -158,7 +158,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  static void advk_pcie_setup_hw(struct advk_pcie *pcie)
  {
  	u32 reg;
-@@ -288,12 +365,6 @@ static void advk_pcie_setup_hw(struct ad
+@@ -299,12 +376,6 @@ static void advk_pcie_setup_hw(struct ad
  		PCIE_CORE_CTRL2_TD_ENABLE;
  	advk_writel(pcie, reg, PCIE_CORE_CTRL2_REG);
  
@@ -171,7 +171,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	/* Set lane X1 */
  	reg = advk_readl(pcie, PCIE_CORE_CTRL0_REG);
  	reg &= ~LANE_CNT_MSK;
-@@ -341,20 +412,7 @@ static void advk_pcie_setup_hw(struct ad
+@@ -352,20 +423,7 @@ static void advk_pcie_setup_hw(struct ad
  	 */
  	msleep(PCI_PM_D3COLD_WAIT);
  
@@ -193,7 +193,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  
  	reg = advk_readl(pcie, PCIE_CORE_CMD_STATUS_REG);
  	reg |= PCIE_CORE_CMD_MEM_ACCESS_EN |
-@@ -1066,6 +1124,12 @@ static int advk_pcie_probe(struct platfo
+@@ -1077,6 +1135,12 @@ static int advk_pcie_probe(struct platfo
  		return ret;
  	}
  
diff --git a/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch b/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch
index 0f2dab600b..fde01fa987 100644
--- a/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch
+++ b/target/linux/mvebu/patches-5.4/018-PCI-aardvark-Issue-PERST-via-GPIO.patch
@@ -48,7 +48,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  #include <linux/of_pci.h>
  
  #include "../pci.h"
-@@ -204,6 +206,7 @@ struct advk_pcie {
+@@ -205,6 +207,7 @@ struct advk_pcie {
  	int root_bus_nr;
  	int link_gen;
  	struct pci_bridge_emul bridge;
@@ -56,7 +56,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  };
  
  static inline void advk_writel(struct advk_pcie *pcie, u32 val, u64 reg)
-@@ -330,10 +333,31 @@ err:
+@@ -331,10 +334,31 @@ err:
  	dev_err(dev, "link never came up\n");
  }
  
@@ -88,7 +88,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	/* Set to Direct mode */
  	reg = advk_readl(pcie, CTRL_CONFIG_REG);
  	reg &= ~(CTRL_MODE_MASK << CTRL_MODE_SHIFT);
-@@ -406,7 +430,8 @@ static void advk_pcie_setup_hw(struct ad
+@@ -417,7 +441,8 @@ static void advk_pcie_setup_hw(struct ad
  
  	/*
  	 * PERST# signal could have been asserted by pinctrl subsystem before
@@ -98,7 +98,7 @@ Acked-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
  	 * fundamental reset. As required by PCI Express spec a delay for at
  	 * least 100ms after such a reset before link training is needed.
  	 */
-@@ -1124,6 +1149,22 @@ static int advk_pcie_probe(struct platfo
+@@ -1135,6 +1160,22 @@ static int advk_pcie_probe(struct platfo
  		return ret;
  	}
  
diff --git a/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch b/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch
index 640e4eb57c..edff5c4a9c 100644
--- a/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch
+++ b/target/linux/mvebu/patches-5.4/019-PCI-aardvark-Add-PHY-support.patch
@@ -56,7 +56,7 @@ Cc: Miqu?l Raynal <miquel.raynal at bootlin.com>
  #define PCIE_MSG_LOG_REG			(CONTROL_BASE_ADDR + 0x30)
  #define PCIE_ISR0_REG				(CONTROL_BASE_ADDR + 0x40)
  #define PCIE_MSG_PM_PME_MASK			BIT(7)
-@@ -207,6 +210,7 @@ struct advk_pcie {
+@@ -208,6 +211,7 @@ struct advk_pcie {
  	int link_gen;
  	struct pci_bridge_emul bridge;
  	struct gpio_desc *reset_gpio;
@@ -64,7 +64,7 @@ Cc: Miqu?l Raynal <miquel.raynal at bootlin.com>
  };
  
  static inline void advk_writel(struct advk_pcie *pcie, u32 val, u64 reg)
-@@ -358,6 +362,11 @@ static void advk_pcie_setup_hw(struct ad
+@@ -359,6 +363,11 @@ static void advk_pcie_setup_hw(struct ad
  
  	advk_pcie_issue_perst(pcie);
  
@@ -76,7 +76,7 @@ Cc: Miqu?l Raynal <miquel.raynal at bootlin.com>
  	/* Set to Direct mode */
  	reg = advk_readl(pcie, CTRL_CONFIG_REG);
  	reg &= ~(CTRL_MODE_MASK << CTRL_MODE_SHIFT);
-@@ -1114,6 +1123,62 @@ out_release_res:
+@@ -1125,6 +1134,62 @@ out_release_res:
  	return err;
  }
  
@@ -139,7 +139,7 @@ Cc: Miqu?l Raynal <miquel.raynal at bootlin.com>
  static int advk_pcie_probe(struct platform_device *pdev)
  {
  	struct device *dev = &pdev->dev;
-@@ -1171,6 +1236,10 @@ static int advk_pcie_probe(struct platfo
+@@ -1182,6 +1247,10 @@ static int advk_pcie_probe(struct platfo
  	else
  		pcie->link_gen = ret;
  
diff --git a/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch b/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch
index 9eeddaeba1..cd15b20ed1 100644
--- a/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch
+++ b/target/linux/mvebu/patches-5.4/020-arm64-dts-marvell-armada-37xx-Set-pcie_reset_pin-to-.patch
@@ -69,7 +69,7 @@ Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
  /* J6 */
 --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
 +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
-@@ -120,10 +120,6 @@
+@@ -126,10 +126,6 @@
  	};
  };
  
diff --git a/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch b/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch
index 0c7830cb47..b42192d9fd 100644
--- a/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch
+++ b/target/linux/mvebu/patches-5.4/021-arm64-dts-marvell-armada-37xx-Move-PCIe-comphy-handl.patch
@@ -37,7 +37,7 @@ Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
  	reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
 --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
 +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
-@@ -126,7 +126,6 @@
+@@ -132,7 +132,6 @@
  	status = "okay";
  	max-link-speed = <2>;
  	reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>;
diff --git a/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch b/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch
index 04002480cc..43cda3f29f 100644
--- a/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch
+++ b/target/linux/mvebu/patches-5.4/022-arm64-dts-marvell-armada-37xx-Move-PCIe-max-link-spe.patch
@@ -24,7 +24,7 @@ Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
 
 --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
 +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
-@@ -124,7 +124,6 @@
+@@ -130,7 +130,6 @@
  	pinctrl-names = "default";
  	pinctrl-0 = <&pcie_reset_pins &pcie_clkreq_pins>;
  	status = "okay";
diff --git a/target/linux/mvebu/patches-5.4/024-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch b/target/linux/mvebu/patches-5.4/024-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch
index dfc068c8cb..04803c90d8 100644
--- a/target/linux/mvebu/patches-5.4/024-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch
+++ b/target/linux/mvebu/patches-5.4/024-PCI-aardvark-Don-t-touch-PCIe-registers-if-no-card-c.patch
@@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi at arm.com>
 
 --- a/drivers/pci/controller/pci-aardvark.c
 +++ b/drivers/pci/controller/pci-aardvark.c
-@@ -639,6 +639,13 @@ static bool advk_pcie_valid_device(struc
+@@ -650,6 +650,13 @@ static bool advk_pcie_valid_device(struc
  	if ((bus->number == pcie->root_bus_nr) && PCI_SLOT(devfn) != 0)
  		return false;
  
diff --git a/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch b/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch
index 41fed6aded..ff67c9c02f 100644
--- a/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch
+++ b/target/linux/mvebu/patches-5.4/026-PCI-aardvark-Fix-initialization-with-old-Marvell-s-A.patch
@@ -31,7 +31,7 @@ Cc: <stable at vger.kernel.org> # 5.8+: ea17a0f153af: phy: marvell: comphy: Convert
 
 --- a/drivers/pci/controller/pci-aardvark.c
 +++ b/drivers/pci/controller/pci-aardvark.c
-@@ -1154,7 +1154,9 @@ static int advk_pcie_enable_phy(struct a
+@@ -1165,7 +1165,9 @@ static int advk_pcie_enable_phy(struct a
  	}
  
  	ret = phy_power_on(pcie->phy);
diff --git a/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch b/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
index c19e4cf90d..1c51ca5841 100644
--- a/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
+++ b/target/linux/octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
@@ -21,8 +21,8 @@ Signed-off-by: Tim Harvey <tharvey at gateworks.com>
 +#include <linux/of.h>
  #include <linux/platform_data/x86/apple.h>
  #include <linux/pm_runtime.h>
- #include <linux/switchtec.h>
-@@ -5714,3 +5715,34 @@ static void apex_pci_fixup_class(struct
+ #include <linux/suspend.h>
+@@ -5727,3 +5728,34 @@ static void apex_pci_fixup_class(struct
  }
  DECLARE_PCI_FIXUP_CLASS_HEADER(0x1ac1, 0x089a,
  			       PCI_CLASS_NOT_DEFINED, 8, apex_pci_fixup_class);
diff --git a/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch
index dbeee8a78b..306ae6cfda 100644
--- a/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch
+++ b/target/linux/ramips/patches-5.4/0031-uvc-add-iPassion-iP2970-support.patch
@@ -64,7 +64,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  #include <media/v4l2-common.h>
  
-@@ -1156,9 +1161,149 @@ static void uvc_video_decode_data(struct
+@@ -1183,9 +1188,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_trace(UVC_TRACE_FRAME, "Frame complete (EOF found).\n");
-@@ -1715,6 +1860,8 @@ static int uvc_init_video_isoc(struct uv
+@@ -1742,6 +1887,8 @@ static int uvc_init_video_isoc(struct uv
  	if (npackets == 0)
  		return -ENOMEM;
  


From lede-commits at lists.infradead.org  Sat Jul 31 12:26:55 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 31 Jul 2021 15:26:55 -0400
Subject: [openwrt/openwrt]  odhcp6c: update to latest git HEAD
In-Reply-To: <162775961517.19804.17009045508101007364@git-01.infra.openwrt.org>
References: <162775961517.19804.17009045508101007364@git-01.infra.openwrt.org>
Message-ID: <mailman.11513.1627759619.1072.lede-commits@lists.infradead.org>

dedeckeh pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e02a4c20809713922e2c52ac190e883b7a5dfe18

commit e02a4c20809713922e2c52ac190e883b7a5dfe18
Author: Hans Dedecker <dedeckeh at gmail.com>
AuthorDate: Sat Jul 31 21:24:14 2021 +0200

    odhcp6c: update to latest git HEAD
    
    94adc8b odhcp6c: use strpbrk to provide get_sep_pos
    e0d9a4b cmake: enable extra compiler checks
    
    Signed-off-by: Hans Dedecker <dedeckeh at gmail.com>
---
 package/network/ipv6/odhcp6c/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
index a4e62d04f2..4fd9681e40 100644
--- a/package/network/ipv6/odhcp6c/Makefile
+++ b/package/network/ipv6/odhcp6c/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=18
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
-PKG_SOURCE_DATE:=2021-01-09
-PKG_SOURCE_VERSION:=53f07e90b7f1da6977143a488dd5cb73a33b233b
-PKG_MIRROR_HASH:=ad3665b611d19177996771b11df28d92f066b0125484ea3bdfc0b3185c14f90e
+PKG_SOURCE_DATE:=2021-07-14
+PKG_SOURCE_VERSION:=94adc8bbfa5150d4c2ceb4e05ecd1840dfa3df08
+PKG_MIRROR_HASH:=ddc3b203b37d5f82b88f8dc70f0bfc1b34493cbcba6ed81815ccbe250350fe11
 PKG_MAINTAINER:=Hans Dedecker <dedeckeh at gmail.com>
 PKG_LICENSE:=GPL-2.0
 


From lede-commits at lists.infradead.org  Sat Jul 31 13:14:42 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 31 Jul 2021 16:14:42 -0400
Subject: [openwrt/openwrt] generic: add missing ARM64 crypto Kconfig symbols
In-Reply-To: <162776248251.28410.16641358700338230028@git-01.infra.openwrt.org>
References: <162776248251.28410.16641358700338230028@git-01.infra.openwrt.org>
Message-ID: <mailman.11514.1627762487.1072.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/191c4ff5e1d045c6a4f9086acfa77e6e14e1f17c

commit 191c4ff5e1d045c6a4f9086acfa77e6e14e1f17c
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Sat Jul 31 12:36:40 2021 +0200

    generic: add missing ARM64 crypto Kconfig symbols
    
    bcm27xx-bcm2710 builds are stalling when compiled with V=s.
    
    Explitily disable these unset symbols to avoid stalling
    builds.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 target/linux/generic/config-5.4 | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4
index 8f51585756..d9e2095f4d 100644
--- a/target/linux/generic/config-5.4
+++ b/target/linux/generic/config-5.4
@@ -961,7 +961,13 @@ CONFIG_CRYPTO_AES=y
 # CONFIG_CRYPTO_AES_586 is not set
 # CONFIG_CRYPTO_AES_ARM is not set
 # CONFIG_CRYPTO_AES_ARM_BS is not set
+# CONFIG_CRYPTO_AES_ARM64_BS is not set
 # CONFIG_CRYPTO_AES_ARM_CE is not set
+# CONFIG_CRYPTO_AES_ARM64 is not set
+# CONFIG_CRYPTO_AES_ARM64_CE is not set
+# CONFIG_CRYPTO_AES_ARM64_CE_BLK is not set
+# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set
+# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set
 # CONFIG_CRYPTO_AES_NI_INTEL is not set
 # CONFIG_CRYPTO_AES_TI is not set
 CONFIG_CRYPTO_ALGAPI=y
@@ -1050,6 +1056,7 @@ CONFIG_CRYPTO_BLKCIPHER2=y
 # CONFIG_CRYPTO_GF128MUL is not set
 # CONFIG_CRYPTO_GHASH is not set
 # CONFIG_CRYPTO_GHASH_ARM_CE is not set
+# CONFIG_CRYPTO_GHASH_ARM64_CE is not set
 # CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL is not set
 # CONFIG_CRYPTO_HASH is not set
 # CONFIG_CRYPTO_HMAC is not set
@@ -1105,15 +1112,19 @@ CONFIG_CRYPTO_PCRYPT=y
 # CONFIG_CRYPTO_SERPENT is not set
 # CONFIG_CRYPTO_SHA1 is not set
 # CONFIG_CRYPTO_SHA1_ARM is not set
+# CONFIG_CRYPTO_SHA1_ARM64_CE is not set
 # CONFIG_CRYPTO_SHA1_ARM_CE is not set
 # CONFIG_CRYPTO_SHA1_ARM_NEON is not set
 # CONFIG_CRYPTO_SHA256 is not set
 # CONFIG_CRYPTO_SHA256_ARM is not set
+# CONFIG_CRYPTO_SHA256_ARM64 is not set
 # CONFIG_CRYPTO_SHA2_ARM_CE is not set
+# CONFIG_CRYPTO_SHA2_ARM64_CE is not set
 # CONFIG_CRYPTO_SHA3 is not set
 # CONFIG_CRYPTO_SHA3_ARM64 is not set
 # CONFIG_CRYPTO_SHA512 is not set
 # CONFIG_CRYPTO_SHA512_ARM is not set
+# CONFIG_CRYPTO_SHA512_ARM64 is not set
 # CONFIG_CRYPTO_SHA512_ARM64_CE is not set
 # CONFIG_CRYPTO_SIMD is not set
 # CONFIG_CRYPTO_SM3 is not set


From lede-commits at lists.infradead.org  Sat Jul 31 19:48:09 2021
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 31 Jul 2021 22:48:09 -0400
Subject: [openwrt/openwrt]  dnsmasq: rework jail mounts
In-Reply-To: <162778608955.767.12947213490942332483@git-01.infra.openwrt.org>
References: <162778608955.767.12947213490942332483@git-01.infra.openwrt.org>
Message-ID: <mailman.11533.1627786093.1072.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/59c63224e11d6c4eca27131a73bf16218e47a271

commit 59c63224e11d6c4eca27131a73bf16218e47a271
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Aug 1 03:33:52 2021 +0100

    dnsmasq: rework jail mounts
    
     * split into multiple lines to improve readability
     * use EXTRA_MOUNT for addnhosts instead of blindly adding /tmp/hosts
     * remove no longer needed mount for /sbin/hotplug-call
     * add dhcp-script.sh dependencies (jshn, ubus)
    
    Fixes: 3a94c2ca5c ("dnsmasq: add /tmp/hosts/ to jail_mount")
    Fixes: aed95c4cb8 ("dnsmasq: switch to ubus-based hotplug call")
    Reported-by: Stijn Tintel <stijn at linux-ipv6.be>
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/network/services/dnsmasq/files/dnsmasq.init | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index d5f70a0ee5..460041d4b9 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -19,6 +19,7 @@ BASEDHCPSTAMPFILE="/var/run/dnsmasq"
 DHCPBOGUSHOSTNAMEFILE="/usr/share/dnsmasq/dhcpbogushostname.conf"
 RFC6761FILE="/usr/share/dnsmasq/rfc6761.conf"
 DHCPSCRIPT="/usr/lib/dnsmasq/dhcp-script.sh"
+DHCPSCRIPT_DEPENDS="/usr/share/libubox/jshn.sh /usr/bin/jshn /bin/ubus"
 
 DNSMASQ_DHCP_VER=4
 
@@ -187,6 +188,7 @@ append_notinterface() {
 }
 
 append_addnhosts() {
+	append EXTRA_MOUNT "$1"
 	xappend "--addn-hosts=$1"
 }
 
@@ -1119,7 +1121,11 @@ dnsmasq_start()
 	procd_set_param respawn
 
 	procd_add_jail dnsmasq ubus log
-	procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE $DHCPBOGUSHOSTNAMEFILE /etc/passwd /etc/group /etc/TZ /dev/null /dev/urandom $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript /etc/hosts /etc/ethers /sbin/hotplug-call $EXTRA_MOUNT $DHCPSCRIPT /tmp/hosts/
+	procd_add_jail_mount $CONFIGFILE $TRUSTANCHORSFILE $HOSTFILE $RFC6761FILE
+	procd_add_jail_mount $EXTRA_MOUNT $DHCPBOGUSHOSTNAMEFILE $DHCPSCRIPT $DHCPSCRIPT_DEPENDS
+	procd_add_jail_mount $dnsmasqconffile $dnsmasqconfdir $resolvdir $user_dhcpscript
+	procd_add_jail_mount /dev/null /dev/urandom
+	procd_add_jail_mount /etc/passwd /etc/group /etc/TZ /etc/hosts /etc/ethers
 	procd_add_jail_mount_rw /var/run/dnsmasq/ $leasefile
 
 	procd_close_instance


