aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files-4.14/drivers
diff options
context:
space:
mode:
authorPawel Dembicki <paweldembicki@gmail.com>2018-11-17 08:43:41 +0000
committerJohn Crispin <john@phrozen.org>2018-11-26 12:16:52 +0100
commitb85fe43ec8c4d4aa34d3c0bbb3e57da3f176526b (patch)
tree21b18a68ed4f111712a41065e5fa45a6a32bd9c9 /target/linux/ramips/files-4.14/drivers
parente61812fd346c43edbb16e87e61ff1a2110ca8eeb (diff)
downloadupstream-b85fe43ec8c4d4aa34d3c0bbb3e57da3f176526b.tar.gz
upstream-b85fe43ec8c4d4aa34d3c0bbb3e57da3f176526b.tar.bz2
upstream-b85fe43ec8c4d4aa34d3c0bbb3e57da3f176526b.zip
ramips: mt7620: add force use of mdio-mode
Some boards have external switches different than mt7530. This patch allow to use mdio-mode without 0x1f register. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Diffstat (limited to 'target/linux/ramips/files-4.14/drivers')
-rw-r--r--target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c
index ffcf70c45a..5fc5080aaf 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/gsw_mt7620.c
@@ -69,6 +69,9 @@ static int mt7620_mdio_mode(struct device_node *eth_node)
mdiobus_node = of_get_child_by_name(eth_node, "mdio-bus");
if (mdiobus_node) {
+ if (of_property_read_bool(mdiobus_node, "mediatek,mdio-mode"))
+ ret = 1;
+
for_each_child_of_node(mdiobus_node, phy_node) {
id = of_get_property(phy_node, "reg", NULL);
if (id && (be32_to_cpu(*id) == 0x1f))