summaryrefslogtreecommitdiff
path: root/target/linux/mediatek/patches-4.9
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2017-04-21 09:40:01 +0200
committerJohn Crispin <john@phrozen.org>2017-04-24 11:11:52 +0200
commitf3bae0fa4b2e2e3eea64102eb40cd0dffb59f9d3 (patch)
tree011e058645afb2aee6fa0b934fa2f2f3b8d67ac7 /target/linux/mediatek/patches-4.9
parent956e31b1e447a3a3d5cc4c17cda089ccb49b0f29 (diff)
downloadmtk-20170518-f3bae0fa4b2e2e3eea64102eb40cd0dffb59f9d3.zip
mtk-20170518-f3bae0fa4b2e2e3eea64102eb40cd0dffb59f9d3.tar.gz
mtk-20170518-f3bae0fa4b2e2e3eea64102eb40cd0dffb59f9d3.tar.bz2
mediatek: fix support for gmac1 using external PHY
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/mediatek/patches-4.9')
-rw-r--r--target/linux/mediatek/patches-4.9/0095-ephy.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-4.9/0095-ephy.patch b/target/linux/mediatek/patches-4.9/0095-ephy.patch
new file mode 100644
index 0000000..52d8299
--- /dev/null
+++ b/target/linux/mediatek/patches-4.9/0095-ephy.patch
@@ -0,0 +1,30 @@
+Index: linux-4.9.20/drivers/net/dsa/mt7530.c
+===================================================================
+--- linux-4.9.20.orig/drivers/net/dsa/mt7530.c
++++ linux-4.9.20/drivers/net/dsa/mt7530.c
+@@ -629,6 +629,11 @@ mt7530_setup(struct dsa_switch *ds)
+ val = mt7530_read(priv, MT7530_MHWTRAP);
+ val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS;
+ val |= MHWTRAP_MANUAL;
++ if (!dsa_is_cpu_port(ds, 5)) {
++ val |= MHWTRAP_P5_DIS;
++ val |= MHWTRAP_P5_MAC_SEL;
++ val |= MHWTRAP_P5_RGMII_MODE;
++ }
+ mt7530_write(priv, MT7530_MHWTRAP, val);
+
+ /* Enable and reset MIB counters */
+Index: linux-4.9.20/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+===================================================================
+--- linux-4.9.20.orig/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ linux-4.9.20/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -221,6 +221,9 @@ static void mtk_phy_link_adjust(struct n
+ netif_carrier_on(dev);
+ else
+ netif_carrier_off(dev);
++
++ if (!of_phy_is_fixed_link(mac->of_node))
++ phy_print_status(dev->phydev);
+ }
+
+ static int mtk_phy_connect_node(struct mtk_eth *eth, struct mtk_mac *mac,