[openwrt/openwrt] generic: 6.12: backport b53 RGMII port patches

LEDE Commits lede-commits at lists.infradead.org
Sat Jun 7 00:57:35 PDT 2025


noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1a97278ee1dccebda344b9e9497c5b5ec54b8d50

commit 1a97278ee1dccebda344b9e9497c5b5ec54b8d50
Author: Álvaro Fernández Rojas <noltari at gmail.com>
AuthorDate: Wed Jun 4 09:30:34 2025 +0200

    generic: 6.12: backport b53 RGMII port patches
    
    Update b53 RGMII port patches to the accepted upstream version.
    
    Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
 .../linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi   |  6 +-
 .../linux/bmips/dts/bcm63168-actiontec-t1200h.dts  |  4 +-
 .../bmips/dts/bcm63168-sagem-fast-3864-op.dts      |  4 +-
 .../linux/bmips/dts/bcm63168-sercomm-shg2500.dts   |  4 +-
 .../linux/bmips/dts/bcm63169-comtrend-vg-8050.dts  |  4 +-
 target/linux/bmips/dts/bcm6328-inteno-xg6846.dts   |  2 +-
 .../linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts   |  6 +-
 .../bmips/dts/bcm6362-netgear-dgnd3700-v2.dts      |  4 +-
 .../linux/bmips/dts/bcm6368-actiontec-r1000h.dts   |  4 +-
 .../linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi  |  4 +-
 .../linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts |  4 +-
 target/linux/bmips/dts/bcm6369-netgear-evg2000.dts |  4 +-
 ...b53-invert-bcm531x5-rgmii-delay-heuristic.patch | 55 +++++++++++++++++
 .../122-net-dsa-b53-support-legacy-FCS-tags.patch  |  2 +-
 ...-add-support-for-FDB-operations-on-5325-5.patch | 14 ++---
 ...sa-b53-prevent-FAST_AGE-access-on-BCM5325.patch |  6 +-
 ...b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch |  2 +-
 ...-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch |  2 +-
 ...53-prevent-DIS_LEARNING-access-on-BCM5325.patch |  2 +-
 ...sa-b53-prevent-BRCM_HDR-access-on-BCM5325.patch |  2 +-
 ...-prevent-GMII_PORT_OVERRIDE_CTRL-access-o.patch |  6 +-
 ...-fix-unicast-multicast-flooding-on-BCM532.patch |  4 +-
 ...sa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch |  2 +-
 ...t-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch |  2 +-
 ...net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch} | 12 +++-
 ...-b53-do-not-enable-RGMII-delay-on-bcm63xx.patch | 49 +++++++++++++++
 ...-do-not-configure-bcm63xx-s-IMP-port-inte.patch | 70 ++++++++++++++++++++++
 ...-b53-allow-RGMII-for-bcm63xx-RGMII-ports.patch} | 12 ++--
 ...dsa-b53-do-not-touch-DLL_IQQD-on-bcm53115.patch | 59 ++++++++++++++++++
 29 files changed, 296 insertions(+), 55 deletions(-)

diff --git a/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi b/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi
index 66c64d990b..e0cdca71b0 100644
--- a/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi
+++ b/target/linux/bmips/dts/bcm63167-sercomm-h500-s.dtsi
@@ -145,7 +145,7 @@
 				reg = <5>;
 				label = "wifi";
 
-				phy-mode = "rgmii";
+				phy-mode = "rgmii-id";
 
 				fixed-link {
 					speed = <1000>;
@@ -156,7 +156,7 @@
 			port at 8 {
 				reg = <8>;
 
-				phy-mode = "rgmii-txid";
+				phy-mode = "rgmii-id";
 				ethernet = <&switch0port4>;
 
 				fixed-link {
@@ -272,7 +272,7 @@
 			reg = <4>;
 			label = "extsw";
 
-			phy-mode = "rgmii-txid";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
diff --git a/target/linux/bmips/dts/bcm63168-actiontec-t1200h.dts b/target/linux/bmips/dts/bcm63168-actiontec-t1200h.dts
index 86fce53a79..6d353a84b6 100644
--- a/target/linux/bmips/dts/bcm63168-actiontec-t1200h.dts
+++ b/target/linux/bmips/dts/bcm63168-actiontec-t1200h.dts
@@ -149,7 +149,7 @@
 			port at 8 {
 				reg = <0x8>;
 
-				phy-mode = "rgmii";
+				phy-mode = "rgmii-id";
 				ethernet = <&switch0port6>;
 
 				fixed-link {
@@ -234,7 +234,7 @@
 			reg = <6>;
 			label = "extsw";
 
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
diff --git a/target/linux/bmips/dts/bcm63168-sagem-fast-3864-op.dts b/target/linux/bmips/dts/bcm63168-sagem-fast-3864-op.dts
index d4c76cdf7c..91d22a2eb5 100644
--- a/target/linux/bmips/dts/bcm63168-sagem-fast-3864-op.dts
+++ b/target/linux/bmips/dts/bcm63168-sagem-fast-3864-op.dts
@@ -160,7 +160,7 @@
 			port at 8 {
 				reg = <8>;
 
-				phy-mode = "rgmii";
+				phy-mode = "rgmii-id";
 				ethernet = <&switch0port4>;
 
 				fixed-link {
@@ -264,7 +264,7 @@
 			reg = <4>;
 			label = "extsw";
 
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
diff --git a/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts b/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts
index 3f9ca000cc..79c25c8c46 100644
--- a/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts
+++ b/target/linux/bmips/dts/bcm63168-sercomm-shg2500.dts
@@ -163,7 +163,7 @@
 			port at 8 {
 				reg = <8>;
 
-				phy-mode = "rgmii";
+				phy-mode = "rgmii-id";
 				ethernet = <&switch0port4>;
 
 				fixed-link {
@@ -299,7 +299,7 @@
 			reg = <4>;
 			label = "extsw";
 
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
diff --git a/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts b/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts
index 05004462e7..efe9bb6ec4 100644
--- a/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts
+++ b/target/linux/bmips/dts/bcm63169-comtrend-vg-8050.dts
@@ -90,7 +90,7 @@
 			port at 8 {
 				reg = <8>;
 
-				phy-mode = "rgmii";
+				phy-mode = "rgmii-id";
 				ethernet = <&switch0port6>;
 
 				fixed-link {
@@ -222,7 +222,7 @@
 			reg = <6>;
 			label = "extsw";
 
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
diff --git a/target/linux/bmips/dts/bcm6328-inteno-xg6846.dts b/target/linux/bmips/dts/bcm6328-inteno-xg6846.dts
index 91b771a2bd..d55d2d3701 100644
--- a/target/linux/bmips/dts/bcm6328-inteno-xg6846.dts
+++ b/target/linux/bmips/dts/bcm6328-inteno-xg6846.dts
@@ -419,7 +419,7 @@
 			reg = <4>;
 			label = "extsw";
 
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
diff --git a/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts b/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts
index 596ccf998f..50ff927045 100644
--- a/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts
+++ b/target/linux/bmips/dts/bcm6362-huawei-hg253s-v2.dts
@@ -121,7 +121,7 @@
 			port at 8 {
 				reg = <8>;
 
-				phy-mode = "rgmii";
+				phy-mode = "rgmii-id";
 				ethernet = <&switch0port4>;
 
 				fixed-link {
@@ -210,7 +210,7 @@
 			reg = <4>;
 			label = "extsw";
 
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
@@ -223,7 +223,7 @@
 			label = "wan";
 
 			phy-handle = <&phy24>;
-			phy-mode = "rgmii-txid";
+			phy-mode = "rgmii-id";
 		};
 	};
 };
diff --git a/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts b/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts
index 7c1fde3132..3a18d326d4 100644
--- a/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts
+++ b/target/linux/bmips/dts/bcm6362-netgear-dgnd3700-v2.dts
@@ -185,7 +185,7 @@
 			port at 8 {
 				reg = <8>;
 
-				phy-mode = "rgmii";
+				phy-mode = "rgmii-id";
 				ethernet = <&switch0port4>;
 
 				fixed-link {
@@ -294,7 +294,7 @@
 			reg = <4>;
 			label = "extsw";
 
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
diff --git a/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts b/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts
index 7f4a725e9a..719c41cd67 100644
--- a/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts
+++ b/target/linux/bmips/dts/bcm6368-actiontec-r1000h.dts
@@ -143,7 +143,7 @@
 			port at 8 {
 				reg = <8>;
 
-				phy-mode = "rgmii";
+				phy-mode = "rgmii-id";
 				ethernet = <&switch0port5>;
 
 				fixed-link {
@@ -163,7 +163,7 @@
 			reg = <5>;
 			label = "extsw";
 
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
diff --git a/target/linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi b/target/linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi
index 43225cdd52..4102a4bf08 100644
--- a/target/linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi
+++ b/target/linux/bmips/dts/bcm6368-netgear-dgnd3700.dtsi
@@ -159,7 +159,7 @@
 			port at 8 {
 				reg = <8>;
 
-				phy-mode = "rgmii";
+				phy-mode = "rgmii-id";
 				ethernet = <&switch0port5>;
 
 				fixed-link {
@@ -254,7 +254,7 @@
 			reg = <5>;
 			label = "extsw";
 
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
diff --git a/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts b/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts
index 5fa511816b..f9ee3bbd52 100644
--- a/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts
+++ b/target/linux/bmips/dts/bcm6369-comtrend-wap-5813n.dts
@@ -149,7 +149,7 @@
 			port at 5 {
 				reg = <5>;
 
-				phy-mode = "rgmii";
+				phy-mode = "rgmii-id";
 				ethernet = <&switch0port4>;
 
 				fixed-link {
@@ -216,7 +216,7 @@
 			reg = <4>;
 			label = "extsw";
 
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
diff --git a/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts b/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts
index cf91c0ad23..358042ae4d 100644
--- a/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts
+++ b/target/linux/bmips/dts/bcm6369-netgear-evg2000.dts
@@ -151,7 +151,7 @@
 			port at 8 {
 				reg = <8>;
 
-				phy-mode = "rgmii";
+				phy-mode = "rgmii-id";
 				ethernet = <&switch0port5>;
 
 				fixed-link {
@@ -171,7 +171,7 @@
 			reg = <5>;
 			label = "extsw";
 
-			phy-mode = "rgmii";
+			phy-mode = "rgmii-id";
 
 			fixed-link {
 				speed = <1000>;
diff --git a/target/linux/bmips/patches-6.12/110-net-dsa-b53-invert-bcm531x5-rgmii-delay-heuristic.patch b/target/linux/bmips/patches-6.12/110-net-dsa-b53-invert-bcm531x5-rgmii-delay-heuristic.patch
new file mode 100644
index 0000000000..2c3e27c45c
--- /dev/null
+++ b/target/linux/bmips/patches-6.12/110-net-dsa-b53-invert-bcm531x5-rgmii-delay-heuristic.patch
@@ -0,0 +1,55 @@
+From eb9e6142ac5f42beee48c9ec8edf1da3a3d7ff81 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski at gmail.com>
+Date: Thu, 5 Jun 2025 16:39:20 +0200
+Subject: [PATCH] net: dsa: b53: invert bcm531x5 rgmii delay heuristic
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When configuring the RGMII port for BCM531x5, we are only doing so in
+MLO_AN_FIXED, i.e. fixed link mode. This implies this port is used as
+cpu port and thus connected to an ethernet mac, so the switch takes the
+role of the PHY.
+
+Therefore we need to enable delays when the interface mode is rgmii-id,
+and not rgmii. Enabling delays for rgmii is wrong in any case.
+
+Also update the comment with the incomplete sentence to match what we
+are now doing, and add a comment about rgmii-id.
+
+Luckily there are at least no in-tree users of rgmii or rgmii-id mode
+that would be affected, as the only user with a defined link mode uses
+rgmii-txid, which we already handle correctly.
+
+Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
+Reported-by: Álvaro Fernández Rojas <noltari at gmail.com>
+Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
+---
+ drivers/net/dsa/b53/b53_common.c | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/dsa/b53/b53_common.c
++++ b/drivers/net/dsa/b53/b53_common.c
+@@ -1363,16 +1363,15 @@ static void b53_adjust_531x5_rgmii(struc
+ 	 *
+ 	 * PHY_INTERFACE_MODE_RGMII means that we are not introducing
+ 	 * any delay neither on transmission nor reception, so the
+-	 * BCM53125 must also be configured accordingly to account for
+-	 * the lack of delay and introduce
+-	 *
+-	 * The BCM53125 switch has its RX clock and TX clock control
+-	 * swapped, hence the reason why we modify the TX clock path in
+-	 * the "RGMII" case
++	 * BCM53125 must also be configured accordingly, and not enable
++	 * either delay.
++	 * 
++	 * PHY_INTERFACE_MODE_RGMII_ID means both TX internal delay and RX
++	 * interal delay, so enable delay on both paths.
+ 	 */
+ 	if (interface == PHY_INTERFACE_MODE_RGMII_TXID)
+ 		rgmii_ctrl |= RGMII_CTRL_DLL_TXC;
+-	if (interface == PHY_INTERFACE_MODE_RGMII)
++	if (interface == PHY_INTERFACE_MODE_RGMII_ID)
+ 		rgmii_ctrl |= RGMII_CTRL_DLL_TXC | RGMII_CTRL_DLL_RXC;
+ 
+ 	if (dev->chip_id != BCM53115_DEVICE_ID)
diff --git a/target/linux/bmips/patches-6.12/122-net-dsa-b53-support-legacy-FCS-tags.patch b/target/linux/bmips/patches-6.12/122-net-dsa-b53-support-legacy-FCS-tags.patch
index 30319b6443..661d071c91 100644
--- a/target/linux/bmips/patches-6.12/122-net-dsa-b53-support-legacy-FCS-tags.patch
+++ b/target/linux/bmips/patches-6.12/122-net-dsa-b53-support-legacy-FCS-tags.patch
@@ -29,7 +29,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  	  This driver adds support for Broadcom managed switch chips. It supports
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2266,8 +2266,11 @@ enum dsa_tag_protocol b53_get_tag_protoc
+@@ -2244,8 +2244,11 @@ enum dsa_tag_protocol b53_get_tag_protoc
  		goto out;
  	}
  
diff --git a/target/linux/bmips/patches-6.12/130-net-dsa-b53-add-support-for-FDB-operations-on-5325-5.patch b/target/linux/bmips/patches-6.12/130-net-dsa-b53-add-support-for-FDB-operations-on-5325-5.patch
index e61f7cbd38..557f78e7eb 100644
--- a/target/linux/bmips/patches-6.12/130-net-dsa-b53-add-support-for-FDB-operations-on-5325-5.patch
+++ b/target/linux/bmips/patches-6.12/130-net-dsa-b53-add-support-for-FDB-operations-on-5325-5.patch
@@ -22,7 +22,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1760,13 +1760,15 @@ static int b53_arl_read(struct b53_devic
+@@ -1738,13 +1738,15 @@ static int b53_arl_read(struct b53_devic
  	/* Read the bins */
  	for (i = 0; i < dev->num_arl_bins; i++) {
  		u64 mac_vid;
@@ -42,7 +42,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  
  		if (!(fwd_entry & ARLTBL_VALID)) {
  			set_bit(i, free_bins);
-@@ -1799,7 +1801,8 @@ static int b53_arl_op(struct b53_device
+@@ -1777,7 +1779,8 @@ static int b53_arl_op(struct b53_device
  
  	/* Perform a read for the given MAC and VID */
  	b53_write48(dev, B53_ARLIO_PAGE, B53_MAC_ADDR_IDX, mac);
@@ -52,7 +52,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  
  	/* Issue a read operation for this MAC */
  	ret = b53_arl_rw_op(dev, 1);
-@@ -1850,12 +1853,14 @@ static int b53_arl_op(struct b53_device
+@@ -1828,12 +1831,14 @@ static int b53_arl_op(struct b53_device
  	ent.is_static = true;
  	ent.is_age = false;
  	memcpy(ent.mac, addr, ETH_ALEN);
@@ -70,7 +70,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  
  	return b53_arl_rw_op(dev, 0);
  }
-@@ -1867,12 +1872,6 @@ int b53_fdb_add(struct dsa_switch *ds, i
+@@ -1845,12 +1850,6 @@ int b53_fdb_add(struct dsa_switch *ds, i
  	struct b53_device *priv = ds->priv;
  	int ret;
  
@@ -83,7 +83,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  	mutex_lock(&priv->arl_mutex);
  	ret = b53_arl_op(priv, 0, port, addr, vid, true);
  	mutex_unlock(&priv->arl_mutex);
-@@ -1899,10 +1898,15 @@ EXPORT_SYMBOL(b53_fdb_del);
+@@ -1877,10 +1876,15 @@ EXPORT_SYMBOL(b53_fdb_del);
  static int b53_arl_search_wait(struct b53_device *dev)
  {
  	unsigned int timeout = 1000;
@@ -101,7 +101,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  		if (!(reg & ARL_SRCH_STDN))
  			return 0;
  
-@@ -1919,13 +1923,21 @@ static void b53_arl_search_rd(struct b53
+@@ -1897,13 +1901,21 @@ static void b53_arl_search_rd(struct b53
  			      struct b53_arl_entry *ent)
  {
  	u64 mac_vid;
@@ -129,7 +129,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  }
  
  static int b53_fdb_copy(int port, const struct b53_arl_entry *ent,
-@@ -1946,14 +1958,20 @@ int b53_fdb_dump(struct dsa_switch *ds,
+@@ -1924,14 +1936,20 @@ int b53_fdb_dump(struct dsa_switch *ds,
  	struct b53_device *priv = ds->priv;
  	struct b53_arl_entry results[2];
  	unsigned int count = 0;
diff --git a/target/linux/bmips/patches-6.12/131-net-dsa-b53-prevent-FAST_AGE-access-on-BCM5325.patch b/target/linux/bmips/patches-6.12/131-net-dsa-b53-prevent-FAST_AGE-access-on-BCM5325.patch
index 2a70c431ff..19c0657577 100644
--- a/target/linux/bmips/patches-6.12/131-net-dsa-b53-prevent-FAST_AGE-access-on-BCM5325.patch
+++ b/target/linux/bmips/patches-6.12/131-net-dsa-b53-prevent-FAST_AGE-access-on-BCM5325.patch
@@ -17,7 +17,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -486,6 +486,9 @@ static int b53_flush_arl(struct b53_devi
+@@ -487,6 +487,9 @@ static int b53_flush_arl(struct b53_devi
  {
  	unsigned int i;
  
@@ -27,7 +27,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  	b53_write8(dev, B53_CTRL_PAGE, B53_FAST_AGE_CTRL,
  		   FAST_AGE_DONE | FAST_AGE_DYNAMIC | mask);
  
-@@ -510,6 +513,9 @@ out:
+@@ -511,6 +514,9 @@ out:
  
  static int b53_fast_age_port(struct b53_device *dev, int port)
  {
@@ -37,7 +37,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  	b53_write8(dev, B53_CTRL_PAGE, B53_FAST_AGE_PORT_CTRL, port);
  
  	return b53_flush_arl(dev, FAST_AGE_PORT);
-@@ -517,6 +523,9 @@ static int b53_fast_age_port(struct b53_
+@@ -518,6 +524,9 @@ static int b53_fast_age_port(struct b53_
  
  static int b53_fast_age_vlan(struct b53_device *dev, u16 vid)
  {
diff --git a/target/linux/bmips/patches-6.12/132-net-dsa-b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch b/target/linux/bmips/patches-6.12/132-net-dsa-b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch
index 64d2cdf3ae..cffcef3137 100644
--- a/target/linux/bmips/patches-6.12/132-net-dsa-b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch
+++ b/target/linux/bmips/patches-6.12/132-net-dsa-b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch
@@ -17,7 +17,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -360,11 +360,12 @@ static void b53_set_forwarding(struct b5
+@@ -361,11 +361,12 @@ static void b53_set_forwarding(struct b5
  
  	b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, mgmt);
  
diff --git a/target/linux/bmips/patches-6.12/133-net-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch b/target/linux/bmips/patches-6.12/133-net-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch
index 437f132b2c..e8d8d2414c 100644
--- a/target/linux/bmips/patches-6.12/133-net-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch
+++ b/target/linux/bmips/patches-6.12/133-net-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch
@@ -17,7 +17,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -367,11 +367,16 @@ static void b53_set_forwarding(struct b5
+@@ -368,11 +368,16 @@ static void b53_set_forwarding(struct b5
  		b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, mgmt);
  	}
  
diff --git a/target/linux/bmips/patches-6.12/134-net-dsa-b53-prevent-DIS_LEARNING-access-on-BCM5325.patch b/target/linux/bmips/patches-6.12/134-net-dsa-b53-prevent-DIS_LEARNING-access-on-BCM5325.patch
index e08308ffa9..ce57e42e6c 100644
--- a/target/linux/bmips/patches-6.12/134-net-dsa-b53-prevent-DIS_LEARNING-access-on-BCM5325.patch
+++ b/target/linux/bmips/patches-6.12/134-net-dsa-b53-prevent-DIS_LEARNING-access-on-BCM5325.patch
@@ -17,7 +17,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -593,6 +593,9 @@ static void b53_port_set_learning(struct
+@@ -594,6 +594,9 @@ static void b53_port_set_learning(struct
  {
  	u16 reg;
  
diff --git a/target/linux/bmips/patches-6.12/135-net-dsa-b53-prevent-BRCM_HDR-access-on-BCM5325.patch b/target/linux/bmips/patches-6.12/135-net-dsa-b53-prevent-BRCM_HDR-access-on-BCM5325.patch
index 9fc827bdbf..251832198a 100644
--- a/target/linux/bmips/patches-6.12/135-net-dsa-b53-prevent-BRCM_HDR-access-on-BCM5325.patch
+++ b/target/linux/bmips/patches-6.12/135-net-dsa-b53-prevent-BRCM_HDR-access-on-BCM5325.patch
@@ -17,7 +17,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -730,6 +730,10 @@ void b53_brcm_hdr_setup(struct dsa_switc
+@@ -731,6 +731,10 @@ void b53_brcm_hdr_setup(struct dsa_switc
  		hdr_ctl |= GC_FRM_MGMT_PORT_M;
  	b53_write8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, hdr_ctl);
  
diff --git a/target/linux/bmips/patches-6.12/136-net-dsa-b53-prevent-GMII_PORT_OVERRIDE_CTRL-access-o.patch b/target/linux/bmips/patches-6.12/136-net-dsa-b53-prevent-GMII_PORT_OVERRIDE_CTRL-access-o.patch
index 90ef4c9785..a69e80316a 100644
--- a/target/linux/bmips/patches-6.12/136-net-dsa-b53-prevent-GMII_PORT_OVERRIDE_CTRL-access-o.patch
+++ b/target/linux/bmips/patches-6.12/136-net-dsa-b53-prevent-GMII_PORT_OVERRIDE_CTRL-access-o.patch
@@ -21,7 +21,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1278,6 +1278,8 @@ static void b53_force_link(struct b53_de
+@@ -1279,6 +1279,8 @@ static void b53_force_link(struct b53_de
  	if (port == dev->imp_port) {
  		off = B53_PORT_OVERRIDE_CTRL;
  		val = PORT_OVERRIDE_EN;
@@ -30,7 +30,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  	} else {
  		off = B53_GMII_PORT_OVERRIDE_CTRL(port);
  		val = GMII_PO_EN;
-@@ -1302,6 +1304,8 @@ static void b53_force_port_config(struct
+@@ -1303,6 +1305,8 @@ static void b53_force_port_config(struct
  	if (port == dev->imp_port) {
  		off = B53_PORT_OVERRIDE_CTRL;
  		val = PORT_OVERRIDE_EN;
@@ -39,7 +39,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  	} else {
  		off = B53_GMII_PORT_OVERRIDE_CTRL(port);
  		val = GMII_PO_EN;
-@@ -1332,10 +1336,19 @@ static void b53_force_port_config(struct
+@@ -1333,10 +1337,19 @@ static void b53_force_port_config(struct
  		return;
  	}
  
diff --git a/target/linux/bmips/patches-6.12/137-net-dsa-b53-fix-unicast-multicast-flooding-on-BCM532.patch b/target/linux/bmips/patches-6.12/137-net-dsa-b53-fix-unicast-multicast-flooding-on-BCM532.patch
index fe57bbf33b..3971797353 100644
--- a/target/linux/bmips/patches-6.12/137-net-dsa-b53-fix-unicast-multicast-flooding-on-BCM532.patch
+++ b/target/linux/bmips/patches-6.12/137-net-dsa-b53-fix-unicast-multicast-flooding-on-BCM532.patch
@@ -19,7 +19,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -560,12 +560,36 @@ static void b53_port_set_ucast_flood(str
+@@ -561,12 +561,36 @@ static void b53_port_set_ucast_flood(str
  {
  	u16 uc;
  
@@ -62,7 +62,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
  }
  
  static void b53_port_set_mcast_flood(struct b53_device *dev, int port,
-@@ -573,19 +597,44 @@ static void b53_port_set_mcast_flood(str
+@@ -574,19 +598,44 @@ static void b53_port_set_mcast_flood(str
  {
  	u16 mc;
  
diff --git a/target/linux/bmips/patches-6.12/138-net-dsa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch b/target/linux/bmips/patches-6.12/138-net-dsa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch
index c1a0bc52c9..834555b2fd 100644
--- a/target/linux/bmips/patches-6.12/138-net-dsa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch
+++ b/target/linux/bmips/patches-6.12/138-net-dsa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch
@@ -17,7 +17,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -543,6 +543,10 @@ void b53_imp_vlan_setup(struct dsa_switc
+@@ -544,6 +544,10 @@ void b53_imp_vlan_setup(struct dsa_switc
  	unsigned int i;
  	u16 pvlan;
  
diff --git a/target/linux/bmips/patches-6.12/139-net-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch b/target/linux/bmips/patches-6.12/139-net-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch
index 7491b6cbbc..f3ac6ea302 100644
--- a/target/linux/bmips/patches-6.12/139-net-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch
+++ b/target/linux/bmips/patches-6.12/139-net-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch
@@ -16,7 +16,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1299,6 +1299,9 @@ static int b53_setup(struct dsa_switch *
+@@ -1300,6 +1300,9 @@ static int b53_setup(struct dsa_switch *
  
  	b53_reset_mib(dev);
  
diff --git a/target/linux/bmips/patches-6.12/110-net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch b/target/linux/generic/backport-6.12/710-05-v6.16-net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch
similarity index 77%
rename from target/linux/bmips/patches-6.12/110-net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch
rename to target/linux/generic/backport-6.12/710-05-v6.16-net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch
index 96a9d9ff14..9a53b709af 100644
--- a/target/linux/bmips/patches-6.12/110-net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch
+++ b/target/linux/generic/backport-6.12/710-05-v6.16-net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch
@@ -1,7 +1,10 @@
-From 2ba8f6d6759ec0bb1eaf3840eb2201a5d4931126 Mon Sep 17 00:00:00 2001
+From 1237c2d4a8db79dfd4369bff6930b0e385ed7d5c Mon Sep 17 00:00:00 2001
 From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Mon, 19 May 2025 19:45:48 +0200
+Date: Mon, 2 Jun 2025 21:39:49 +0200
 Subject: [PATCH] net: dsa: b53: do not enable EEE on bcm63xx
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 BCM63xx internal switches do not support EEE, but provide multiple RGMII
 ports where external PHYs may be connected. If one of these PHYs are EEE
@@ -12,8 +15,11 @@ Fix this by checking if the switch actually supports EEE before
 attempting to configure it.
 
 Fixes: 22256b0afb12 ("net: dsa: b53: Move EEE functions to b53")
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
 Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Tested-by: Álvaro Fernández Rojas <noltari at gmail.com>
+Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
+Link: https://patch.msgid.link/20250602193953.1010487-2-jonas.gorski@gmail.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 ---
  drivers/net/dsa/b53/b53_common.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/target/linux/generic/backport-6.12/710-06-v6.16-net-dsa-b53-do-not-enable-RGMII-delay-on-bcm63xx.patch b/target/linux/generic/backport-6.12/710-06-v6.16-net-dsa-b53-do-not-enable-RGMII-delay-on-bcm63xx.patch
new file mode 100644
index 0000000000..6f15ea3cdc
--- /dev/null
+++ b/target/linux/generic/backport-6.12/710-06-v6.16-net-dsa-b53-do-not-enable-RGMII-delay-on-bcm63xx.patch
@@ -0,0 +1,49 @@
+From 4af523551d876ab8b8057d1e5303a860fd736fcb Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski at gmail.com>
+Date: Mon, 2 Jun 2025 21:39:50 +0200
+Subject: [PATCH] net: dsa: b53: do not enable RGMII delay on bcm63xx
+
+bcm63xx's RGMII ports are always in MAC mode, never in PHY mode, so we
+shouldn't enable any delays and let the PHY handle any delays as
+necessary.
+
+This fixes using RGMII ports with normal PHYs like BCM54612E, which will
+handle the delay in the PHY.
+
+Fixes: ce3bf94871f7 ("net: dsa: b53: add support for BCM63xx RGMIIs")
+Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Link: https://patch.msgid.link/20250602193953.1010487-3-jonas.gorski@gmail.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/b53/b53_common.c | 19 +------------------
+ 1 file changed, 1 insertion(+), 18 deletions(-)
+
+--- a/drivers/net/dsa/b53/b53_common.c
++++ b/drivers/net/dsa/b53/b53_common.c
+@@ -1330,24 +1330,7 @@ static void b53_adjust_63xx_rgmii(struct
+ 		off = B53_RGMII_CTRL_P(port);
+ 
+ 	b53_read8(dev, B53_CTRL_PAGE, off, &rgmii_ctrl);
+-
+-	switch (interface) {
+-	case PHY_INTERFACE_MODE_RGMII_ID:
+-		rgmii_ctrl |= (RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC);
+-		break;
+-	case PHY_INTERFACE_MODE_RGMII_RXID:
+-		rgmii_ctrl &= ~(RGMII_CTRL_DLL_TXC);
+-		rgmii_ctrl |= RGMII_CTRL_DLL_RXC;
+-		break;
+-	case PHY_INTERFACE_MODE_RGMII_TXID:
+-		rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC);
+-		rgmii_ctrl |= RGMII_CTRL_DLL_TXC;
+-		break;
+-	case PHY_INTERFACE_MODE_RGMII:
+-	default:
+-		rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC);
+-		break;
+-	}
++	rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC);
+ 
+ 	if (port != dev->imp_port) {
+ 		if (is63268(dev))
diff --git a/target/linux/generic/backport-6.12/710-07-v6.16-net-dsa-b53-do-not-configure-bcm63xx-s-IMP-port-inte.patch b/target/linux/generic/backport-6.12/710-07-v6.16-net-dsa-b53-do-not-configure-bcm63xx-s-IMP-port-inte.patch
new file mode 100644
index 0000000000..739e1b7030
--- /dev/null
+++ b/target/linux/generic/backport-6.12/710-07-v6.16-net-dsa-b53-do-not-configure-bcm63xx-s-IMP-port-inte.patch
@@ -0,0 +1,70 @@
+From 75f4f7b2b13008803f84768ff90396f9d7553221 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski at gmail.com>
+Date: Mon, 2 Jun 2025 21:39:51 +0200
+Subject: [PATCH] net: dsa: b53: do not configure bcm63xx's IMP port interface
+
+The IMP port is not a valid RGMII interface, but hard wired to internal,
+so we shouldn't touch the undefined register B53_RGMII_CTRL_IMP.
+
+While this does not seem to have any side effects, let's not touch it at
+all, so limit RGMII configuration on bcm63xx to the actual RGMII ports.
+
+Fixes: ce3bf94871f7 ("net: dsa: b53: add support for BCM63xx RGMIIs")
+Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Link: https://patch.msgid.link/20250602193953.1010487-4-jonas.gorski@gmail.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/b53/b53_common.c | 22 ++++++++--------------
+ 1 file changed, 8 insertions(+), 14 deletions(-)
+
+--- a/drivers/net/dsa/b53/b53_common.c
++++ b/drivers/net/dsa/b53/b53_common.c
+@@ -22,6 +22,7 @@
+ #include <linux/gpio.h>
+ #include <linux/kernel.h>
+ #include <linux/math.h>
++#include <linux/minmax.h>
+ #include <linux/module.h>
+ #include <linux/platform_data/b53.h>
+ #include <linux/phy.h>
+@@ -1322,24 +1323,17 @@ static void b53_adjust_63xx_rgmii(struct
+ 				  phy_interface_t interface)
+ {
+ 	struct b53_device *dev = ds->priv;
+-	u8 rgmii_ctrl = 0, off;
++	u8 rgmii_ctrl = 0;
+ 
+-	if (port == dev->imp_port)
+-		off = B53_RGMII_CTRL_IMP;
+-	else
+-		off = B53_RGMII_CTRL_P(port);
+-
+-	b53_read8(dev, B53_CTRL_PAGE, off, &rgmii_ctrl);
++	b53_read8(dev, B53_CTRL_PAGE, B53_RGMII_CTRL_P(port), &rgmii_ctrl);
+ 	rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC);
+ 
+-	if (port != dev->imp_port) {
+-		if (is63268(dev))
+-			rgmii_ctrl |= RGMII_CTRL_MII_OVERRIDE;
++	if (is63268(dev))
++		rgmii_ctrl |= RGMII_CTRL_MII_OVERRIDE;
+ 
+-		rgmii_ctrl |= RGMII_CTRL_ENABLE_GMII;
+-	}
++	rgmii_ctrl |= RGMII_CTRL_ENABLE_GMII;
+ 
+-	b53_write8(dev, B53_CTRL_PAGE, off, rgmii_ctrl);
++	b53_write8(dev, B53_CTRL_PAGE, B53_RGMII_CTRL_P(port), rgmii_ctrl);
+ 
+ 	dev_dbg(ds->dev, "Configured port %d for %s\n", port,
+ 		phy_modes(interface));
+@@ -1484,7 +1478,7 @@ static void b53_phylink_mac_config(struc
+ 	struct b53_device *dev = ds->priv;
+ 	int port = dp->index;
+ 
+-	if (is63xx(dev) && port >= B53_63XX_RGMII0)
++	if (is63xx(dev) && in_range(port, B53_63XX_RGMII0, 4))
+ 		b53_adjust_63xx_rgmii(ds, port, interface);
+ 
+ 	if (mode == MLO_AN_FIXED) {
diff --git a/target/linux/bmips/patches-6.12/111-net-dsa-b53-allow-RGMII-for-bcm63xx-RGMII-ports.patch b/target/linux/generic/backport-6.12/710-08-v6.16-net-dsa-b53-allow-RGMII-for-bcm63xx-RGMII-ports.patch
similarity index 79%
rename from target/linux/bmips/patches-6.12/111-net-dsa-b53-allow-RGMII-for-bcm63xx-RGMII-ports.patch
rename to target/linux/generic/backport-6.12/710-08-v6.16-net-dsa-b53-allow-RGMII-for-bcm63xx-RGMII-ports.patch
index 8ef8f1c10b..9b74dd177e 100644
--- a/target/linux/bmips/patches-6.12/111-net-dsa-b53-allow-RGMII-for-bcm63xx-RGMII-ports.patch
+++ b/target/linux/generic/backport-6.12/710-08-v6.16-net-dsa-b53-allow-RGMII-for-bcm63xx-RGMII-ports.patch
@@ -1,6 +1,6 @@
-From b1308c8642f6a75b4494370784fba86dd2f0b0e0 Mon Sep 17 00:00:00 2001
+From 5ea0d42c1980e6d10e5cb56a78021db5bfcebaaf Mon Sep 17 00:00:00 2001
 From: Jonas Gorski <jonas.gorski at gmail.com>
-Date: Mon, 19 May 2025 19:45:50 +0200
+Date: Mon, 2 Jun 2025 21:39:52 +0200
 Subject: [PATCH] net: dsa: b53: allow RGMII for bcm63xx RGMII ports
 
 Add RGMII to supported interfaces for BCM63xx RGMII ports so they can be
@@ -13,20 +13,22 @@ Without this, phylink will fail to configure them:
 [    3.610000] b53-switch 10700000.switch GbE3 (uninitialized): error -22 setting up PHY for tree 0, switch 0, port 4
 
 Fixes: ce3bf94871f7 ("net: dsa: b53: add support for BCM63xx RGMIIs")
-Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
 Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
+Link: https://patch.msgid.link/20250602193953.1010487-5-jonas.gorski@gmail.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 ---
  drivers/net/dsa/b53/b53_common.c | 4 ++++
  1 file changed, 4 insertions(+)
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1462,6 +1462,10 @@ static void b53_phylink_get_caps(struct
+@@ -1439,6 +1439,10 @@ static void b53_phylink_get_caps(struct
  	__set_bit(PHY_INTERFACE_MODE_MII, config->supported_interfaces);
  	__set_bit(PHY_INTERFACE_MODE_REVMII, config->supported_interfaces);
  
 +	/* BCM63xx RGMII ports support RGMII */
-+	if (is63xx(dev) && port >= B53_63XX_RGMII0)
++	if (is63xx(dev) && in_range(port, B53_63XX_RGMII0, 4))
 +		phy_interface_set_rgmii(config->supported_interfaces);
 +
  	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
diff --git a/target/linux/generic/backport-6.12/710-09-v6.16-net-dsa-b53-do-not-touch-DLL_IQQD-on-bcm53115.patch b/target/linux/generic/backport-6.12/710-09-v6.16-net-dsa-b53-do-not-touch-DLL_IQQD-on-bcm53115.patch
new file mode 100644
index 0000000000..9f2143d816
--- /dev/null
+++ b/target/linux/generic/backport-6.12/710-09-v6.16-net-dsa-b53-do-not-touch-DLL_IQQD-on-bcm53115.patch
@@ -0,0 +1,59 @@
+From bc1a65eb81a21e2aa3c3dca058ee8adf687b6ef5 Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski at gmail.com>
+Date: Mon, 2 Jun 2025 21:39:53 +0200
+Subject: [PATCH] net: dsa: b53: do not touch DLL_IQQD on bcm53115
+
+According to OpenMDK, bit 2 of the RGMII register has a different
+meaning for BCM53115 [1]:
+
+"DLL_IQQD         1: In the IDDQ mode, power is down0: Normal function
+                  mode"
+
+Configuring RGMII delay works without setting this bit, so let's keep it
+at the default. For other chips, we always set it, so not clearing it
+is not an issue.
+
+One would assume BCM53118 works the same, but OpenMDK is not quite sure
+what this bit actually means [2]:
+
+"BYPASS_IMP_2NS_DEL #1: In the IDDQ mode, power is down#0: Normal
+                    function mode1: Bypass dll65_2ns_del IP0: Use
+                    dll65_2ns_del IP"
+
+So lets keep setting it for now.
+
+[1] https://github.com/Broadcom-Network-Switching-Software/OpenMDK/blob/master/cdk/PKG/chip/bcm53115/bcm53115_a0_defs.h#L19871
+[2] https://github.com/Broadcom-Network-Switching-Software/OpenMDK/blob/master/cdk/PKG/chip/bcm53118/bcm53118_a0_defs.h#L14392
+
+Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
+Signed-off-by: Jonas Gorski <jonas.gorski at gmail.com>
+Link: https://patch.msgid.link/20250602193953.1010487-6-jonas.gorski@gmail.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/b53/b53_common.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/dsa/b53/b53_common.c
++++ b/drivers/net/dsa/b53/b53_common.c
+@@ -1354,8 +1354,7 @@ static void b53_adjust_531x5_rgmii(struc
+ 	 * tx_clk aligned timing (restoring to reset defaults)
+ 	 */
+ 	b53_read8(dev, B53_CTRL_PAGE, off, &rgmii_ctrl);
+-	rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC |
+-			RGMII_CTRL_TIMING_SEL);
++	rgmii_ctrl &= ~(RGMII_CTRL_DLL_RXC | RGMII_CTRL_DLL_TXC);
+ 
+ 	/* PHY_INTERFACE_MODE_RGMII_TXID means TX internal delay, make
+ 	 * sure that we enable the port TX clock internal delay to
+@@ -1375,7 +1374,10 @@ static void b53_adjust_531x5_rgmii(struc
+ 		rgmii_ctrl |= RGMII_CTRL_DLL_TXC;
+ 	if (interface == PHY_INTERFACE_MODE_RGMII)
+ 		rgmii_ctrl |= RGMII_CTRL_DLL_TXC | RGMII_CTRL_DLL_RXC;
+-	rgmii_ctrl |= RGMII_CTRL_TIMING_SEL;
++
++	if (dev->chip_id != BCM53115_DEVICE_ID)
++		rgmii_ctrl |= RGMII_CTRL_TIMING_SEL;
++
+ 	b53_write8(dev, B53_CTRL_PAGE, off, rgmii_ctrl);
+ 
+ 	dev_info(ds->dev, "Configured port %d for %s\n", port,




More information about the lede-commits mailing list