kernel: bump 4.14 to 4.14.20
[openwrt/openwrt.git] / target / linux / mediatek / patches-4.14 / 0032-net-dsa-mediatek-add-support-for-GMAC2-wired-to-ext-.patch
1 From 52e9ce30a2b3c414e0efb20632fefa7cfc5096e6 Mon Sep 17 00:00:00 2001
2 From: John Crispin <john@phrozen.org>
3 Date: Thu, 10 Aug 2017 14:44:18 +0200
4 Subject: [PATCH 32/57] net: dsa: mediatek: add support for GMAC2 wired to ext
5 phy
6
7 Signed-off-by: John Crispin <john@phrozen.org>
8 ---
9 drivers/net/dsa/mt7530.c | 5 +++++
10 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +++
11 2 files changed, 8 insertions(+)
12
13 --- a/drivers/net/dsa/mt7530.c
14 +++ b/drivers/net/dsa/mt7530.c
15 @@ -991,6 +991,11 @@ mt7530_setup(struct dsa_switch *ds)
16 val = mt7530_read(priv, MT7530_MHWTRAP);
17 val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS;
18 val |= MHWTRAP_MANUAL;
19 + if (!dsa_is_cpu_port(ds, 5)) {
20 + val |= MHWTRAP_P5_DIS;
21 + val |= MHWTRAP_P5_MAC_SEL;
22 + val |= MHWTRAP_P5_RGMII_MODE;
23 + }
24 mt7530_write(priv, MT7530_MHWTRAP, val);
25
26 /* Enable and reset MIB counters */