[openwrt/openwrt] ramips: mt7620: power up ephy port 4
LEDE Commits
lede-commits at lists.infradead.org
Tue Mar 6 10:52:29 PST 2018
mkresin pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/39b5218434d38715a85b7bd6dd8d279c3e1e905d
commit 39b5218434d38715a85b7bd6dd8d279c3e1e905d
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Mon Feb 19 22:15:56 2018 +0100
ramips: mt7620: power up ephy port 4
In some boards port 4 of mt7620 switch is powered down in bootloader
configuration as lan/wan package leak mitigation.
Reset ephy port 4 to default settings to power up the port.
Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
[clarify issue in commit message]
Signed-off-by: Mathias Kresin <dev at kresin.me>
---
target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/gsw_mt7620.c | 1 +
target/linux/ramips/files-4.9/drivers/net/ethernet/mtk/gsw_mt7620.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/gsw_mt7620.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/gsw_mt7620.c
index b675ad0..4093f09 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/gsw_mt7620.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/gsw_mt7620.c
@@ -166,6 +166,7 @@ static void mt7620_hw_init(struct mt7620_gsw *gsw, struct device_node *np)
_mt7620_mii_write(gsw, 4, 30, 0xa000);
_mt7620_mii_write(gsw, 4, 4, 0x05e1);
_mt7620_mii_write(gsw, 4, 16, 0x1313);
+ _mt7620_mii_write(gsw, 4, 0, 0x3100);
pr_info("gsw: setting port4 to ephy mode\n");
}
}
diff --git a/target/linux/ramips/files-4.9/drivers/net/ethernet/mtk/gsw_mt7620.c b/target/linux/ramips/files-4.9/drivers/net/ethernet/mtk/gsw_mt7620.c
index b675ad0..4093f09 100644
--- a/target/linux/ramips/files-4.9/drivers/net/ethernet/mtk/gsw_mt7620.c
+++ b/target/linux/ramips/files-4.9/drivers/net/ethernet/mtk/gsw_mt7620.c
@@ -166,6 +166,7 @@ static void mt7620_hw_init(struct mt7620_gsw *gsw, struct device_node *np)
_mt7620_mii_write(gsw, 4, 30, 0xa000);
_mt7620_mii_write(gsw, 4, 4, 0x05e1);
_mt7620_mii_write(gsw, 4, 16, 0x1313);
+ _mt7620_mii_write(gsw, 4, 0, 0x3100);
pr_info("gsw: setting port4 to ephy mode\n");
}
}
More information about the lede-commits
mailing list