mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
ec8c837eab
Manually rebased: Removed upstreamed: backport-5.15/743-v6.3-0005-net-dsa-b53-mmap-fix-device-tree-support.patch[1] backport-5.15/743-v6.3-0006-net-dsa-tag_brcm-legacy-fix-daisy-chained-switches.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.105&id=9bbb3d3f218f1cf51f57a43cf8fd63b05be1b821 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.105&id=48f52431af9980582b6faa32ff8b581edb10486c Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
29 lines
932 B
Diff
29 lines
932 B
Diff
From 3fb8841513c4ec3a2e5d366df86230c45f239a57 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Couzens <lynxis@fe80.eu>
|
|
Date: Sat, 13 Aug 2022 13:08:22 +0200
|
|
Subject: [PATCH 03/10] net: mt7531: ensure all MACs are powered down before
|
|
reset
|
|
|
|
The datasheet [1] explicit describes it as requirement for a reset.
|
|
|
|
[1] MT7531 Reference Manual for Development Board rev 1.0, page 735
|
|
|
|
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
|
|
---
|
|
drivers/net/dsa/mt7530.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
--- a/drivers/net/dsa/mt7530.c
|
|
+++ b/drivers/net/dsa/mt7530.c
|
|
@@ -2347,6 +2347,10 @@ mt7531_setup(struct dsa_switch *ds)
|
|
return -ENODEV;
|
|
}
|
|
|
|
+ /* all MACs must be forced link-down before sw reset */
|
|
+ for (i = 0; i < MT7530_NUM_PORTS; i++)
|
|
+ mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
|
|
+
|
|
/* Reset the switch through internal reset */
|
|
mt7530_write(priv, MT7530_SYS_CTRL,
|
|
SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
|