From 97f10c21d271421c8430824d60321dcf3415a0ff Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 20 Jun 2016 22:57:36 +0200 Subject: mediatek: update patches * fixes NAND * adds latest ethernet patches Signed-off-by: John Crispin --- ...9-net-next-mediatek-add-fixed-phy-support.patch | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 target/linux/mediatek/patches-4.4/0079-net-next-mediatek-add-fixed-phy-support.patch (limited to 'target/linux/mediatek/patches-4.4/0079-net-next-mediatek-add-fixed-phy-support.patch') diff --git a/target/linux/mediatek/patches-4.4/0079-net-next-mediatek-add-fixed-phy-support.patch b/target/linux/mediatek/patches-4.4/0079-net-next-mediatek-add-fixed-phy-support.patch new file mode 100644 index 0000000000..6ebc1d275a --- /dev/null +++ b/target/linux/mediatek/patches-4.4/0079-net-next-mediatek-add-fixed-phy-support.patch @@ -0,0 +1,43 @@ +From 09f0b50ae838bd6e2bbf0aa22de9f352122297de Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Fri, 22 Apr 2016 11:06:03 +0200 +Subject: [PATCH 079/102] net-next: mediatek: add fixed-phy support + +The MT7623 SoC has a builtin gigabit switch. If we want to use it, GMAC1 +needs to be configured using a fixed link speed and flow control settings. +The easiest way to do this is to used the fixed-phy driver, allowing us to +reuse the existing mdio polling code to setup the MAC. + +Reviewed-by: Andrew Lunn +Signed-off-by: John Crispin +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +index 3436c7b..ab61789 100644 +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -229,6 +229,9 @@ static int mtk_phy_connect(struct mtk_mac *mac) + u32 val, ge_mode; + + np = of_parse_phandle(mac->of_node, "phy-handle", 0); ++ if (!np && of_phy_is_fixed_link(mac->of_node)) ++ if (!of_phy_register_fixed_link(mac->of_node)) ++ np = of_node_get(mac->of_node); + if (!np) + return -ENODEV; + +@@ -257,6 +260,9 @@ static int mtk_phy_connect(struct mtk_mac *mac) + mac->phy_dev->autoneg = AUTONEG_ENABLE; + mac->phy_dev->speed = 0; + mac->phy_dev->duplex = 0; ++ if (of_phy_is_fixed_link(mac->of_node)) ++ mac->phy_dev->supported |= SUPPORTED_Pause | ++ SUPPORTED_Asym_Pause; + mac->phy_dev->supported &= PHY_GBIT_FEATURES | SUPPORTED_Pause | + SUPPORTED_Asym_Pause; + mac->phy_dev->advertising = mac->phy_dev->supported | +-- +1.7.10.4 + -- cgit v1.2.3 From 9d81678ab01a06ee718e33c2f2d3913cec684840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Mon, 20 Jun 2016 23:26:13 +0200 Subject: kernel: update kernel 4.4 to version 4.4.12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Fernández Rojas --- .../0079-net-next-mediatek-add-fixed-phy-support.patch | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'target/linux/mediatek/patches-4.4/0079-net-next-mediatek-add-fixed-phy-support.patch') diff --git a/target/linux/mediatek/patches-4.4/0079-net-next-mediatek-add-fixed-phy-support.patch b/target/linux/mediatek/patches-4.4/0079-net-next-mediatek-add-fixed-phy-support.patch index 6ebc1d275a..669febbdf1 100644 --- a/target/linux/mediatek/patches-4.4/0079-net-next-mediatek-add-fixed-phy-support.patch +++ b/target/linux/mediatek/patches-4.4/0079-net-next-mediatek-add-fixed-phy-support.patch @@ -14,11 +14,9 @@ Signed-off-by: John Crispin drivers/net/ethernet/mediatek/mtk_eth_soc.c | 6 ++++++ 1 file changed, 6 insertions(+) -diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -index 3436c7b..ab61789 100644 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -229,6 +229,9 @@ static int mtk_phy_connect(struct mtk_mac *mac) +@@ -229,6 +229,9 @@ static int mtk_phy_connect(struct mtk_ma u32 val, ge_mode; np = of_parse_phandle(mac->of_node, "phy-handle", 0); @@ -28,7 +26,7 @@ index 3436c7b..ab61789 100644 if (!np) return -ENODEV; -@@ -257,6 +260,9 @@ static int mtk_phy_connect(struct mtk_mac *mac) +@@ -257,6 +260,9 @@ static int mtk_phy_connect(struct mtk_ma mac->phy_dev->autoneg = AUTONEG_ENABLE; mac->phy_dev->speed = 0; mac->phy_dev->duplex = 0; @@ -38,6 +36,3 @@ index 3436c7b..ab61789 100644 mac->phy_dev->supported &= PHY_GBIT_FEATURES | SUPPORTED_Pause | SUPPORTED_Asym_Pause; mac->phy_dev->advertising = mac->phy_dev->supported | --- -1.7.10.4 - -- cgit v1.2.3