* [PATCH net,v3 0/2] Update MT7629 to support PHYLINK API
@ 2019-10-14 7:15 MarkLee
2019-10-14 7:15 ` [PATCH net,v3 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support MarkLee
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: MarkLee @ 2019-10-14 7:15 UTC (permalink / raw)
To: David S. Miller, Sean Wang, John Crispin, Nelson Chang,
Matthias Brugger, Andrew Lunn
Cc: Rob Herring, Mark Rutland, Rene van Dorst, devicetree, netdev,
linux-arm-kernel, linux-mediatek, linux-kernel, Jakub Kicinski,
MarkLee
This patch set has two goals :
1. Fix mt7629 GMII mode issue after apply mediatek
PHYLINK support patch.
2. Update mt7629 dts to reflect the latest dt-binding
with PHYLINK support.
MarkLee (2):
net: ethernet: mediatek: Fix MT7629 missing GMII mode support
arm: dts: mediatek: Update mt7629 dts to reflect the latest dt-binding
arch/arm/boot/dts/mt7629-rfb.dts | 13 ++++++++++++-
arch/arm/boot/dts/mt7629.dtsi | 2 --
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 +
3 files changed, 13 insertions(+), 3 deletions(-)
--
2.17.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net,v3 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support
2019-10-14 7:15 [PATCH net,v3 0/2] Update MT7629 to support PHYLINK API MarkLee
@ 2019-10-14 7:15 ` MarkLee
2019-10-15 19:28 ` Jakub Kicinski
2019-10-14 7:15 ` [PATCH net,v3 2/2] arm: dts: mediatek: Update mt7629 dts to reflect the latest dt-binding MarkLee
2019-10-16 1:03 ` [PATCH net,v3 0/2] Update MT7629 to support PHYLINK API David Miller
2 siblings, 1 reply; 5+ messages in thread
From: MarkLee @ 2019-10-14 7:15 UTC (permalink / raw)
To: David S. Miller, Sean Wang, John Crispin, Nelson Chang,
Matthias Brugger, Andrew Lunn
Cc: Rob Herring, Mark Rutland, Rene van Dorst, devicetree, netdev,
linux-arm-kernel, linux-mediatek, linux-kernel, Jakub Kicinski,
MarkLee
In the original design, mtk_phy_connect function will set ge_mode=1
if phy-mode is GMII(PHY_INTERFACE_MODE_GMII) and then set the correct
ge_mode to ETHSYS_SYSCFG0 register. This logic was broken after apply
mediatek PHYLINK patch(Fixes tag), the new mtk_mac_config function will
not set ge_mode=1 for GMII mode hence the final ETHSYS_SYSCFG0 setting
will be incorrect for mt7629 GMII mode. This patch add the missing logic
back to fix it.
Fixes: b8fc9f30821e ("net: ethernet: mediatek: Add basic PHYLINK support")
Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
--
v2->v3:
* no change
v1->v2:
* no change
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index c61069340f4f..703adb96429e 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -261,6 +261,7 @@ static void mtk_mac_config(struct phylink_config *config, unsigned int mode,
ge_mode = 0;
switch (state->interface) {
case PHY_INTERFACE_MODE_MII:
+ case PHY_INTERFACE_MODE_GMII:
ge_mode = 1;
break;
case PHY_INTERFACE_MODE_REVMII:
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net,v3 2/2] arm: dts: mediatek: Update mt7629 dts to reflect the latest dt-binding
2019-10-14 7:15 [PATCH net,v3 0/2] Update MT7629 to support PHYLINK API MarkLee
2019-10-14 7:15 ` [PATCH net,v3 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support MarkLee
@ 2019-10-14 7:15 ` MarkLee
2019-10-16 1:03 ` [PATCH net,v3 0/2] Update MT7629 to support PHYLINK API David Miller
2 siblings, 0 replies; 5+ messages in thread
From: MarkLee @ 2019-10-14 7:15 UTC (permalink / raw)
To: David S. Miller, Sean Wang, John Crispin, Nelson Chang,
Matthias Brugger, Andrew Lunn
Cc: Rob Herring, Mark Rutland, Rene van Dorst, devicetree, netdev,
linux-arm-kernel, linux-mediatek, linux-kernel, Jakub Kicinski,
MarkLee
* Removes mediatek,physpeed property from dtsi that is useless in PHYLINK
* Use the fixed-link property speed = <2500> to set the phy in 2.5Gbit.
* Set gmac1 to gmii mode that connect to a internal gphy
Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
--
v2->v3:
* no change
v1->v2:
* SGMII port only support BASE-X at 2.5Gbit.
---
arch/arm/boot/dts/mt7629-rfb.dts | 13 ++++++++++++-
arch/arm/boot/dts/mt7629.dtsi | 2 --
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/mt7629-rfb.dts b/arch/arm/boot/dts/mt7629-rfb.dts
index 3621b7d2b22a..9980c10c6e29 100644
--- a/arch/arm/boot/dts/mt7629-rfb.dts
+++ b/arch/arm/boot/dts/mt7629-rfb.dts
@@ -66,9 +66,21 @@
pinctrl-1 = <&ephy_leds_pins>;
status = "okay";
+ gmac0: mac@0 {
+ compatible = "mediatek,eth-mac";
+ reg = <0>;
+ phy-mode = "2500base-x";
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ pause;
+ };
+ };
+
gmac1: mac@1 {
compatible = "mediatek,eth-mac";
reg = <1>;
+ phy-mode = "gmii";
phy-handle = <&phy0>;
};
@@ -78,7 +90,6 @@
phy0: ethernet-phy@0 {
reg = <0>;
- phy-mode = "gmii";
};
};
};
diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi
index 9608bc2ccb3f..867b88103b9d 100644
--- a/arch/arm/boot/dts/mt7629.dtsi
+++ b/arch/arm/boot/dts/mt7629.dtsi
@@ -468,14 +468,12 @@
compatible = "mediatek,mt7629-sgmiisys", "syscon";
reg = <0x1b128000 0x3000>;
#clock-cells = <1>;
- mediatek,physpeed = "2500";
};
sgmiisys1: syscon@1b130000 {
compatible = "mediatek,mt7629-sgmiisys", "syscon";
reg = <0x1b130000 0x3000>;
#clock-cells = <1>;
- mediatek,physpeed = "2500";
};
};
};
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net,v3 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support
2019-10-14 7:15 ` [PATCH net,v3 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support MarkLee
@ 2019-10-15 19:28 ` Jakub Kicinski
0 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2019-10-15 19:28 UTC (permalink / raw)
To: MarkLee
Cc: David S. Miller, Sean Wang, John Crispin, Nelson Chang,
Matthias Brugger, Andrew Lunn, Rob Herring, Mark Rutland,
Rene van Dorst, devicetree, netdev, linux-arm-kernel,
linux-mediatek, linux-kernel
On Mon, 14 Oct 2019 15:15:17 +0800, MarkLee wrote:
> In the original design, mtk_phy_connect function will set ge_mode=1
> if phy-mode is GMII(PHY_INTERFACE_MODE_GMII) and then set the correct
> ge_mode to ETHSYS_SYSCFG0 register. This logic was broken after apply
> mediatek PHYLINK patch(Fixes tag), the new mtk_mac_config function will
> not set ge_mode=1 for GMII mode hence the final ETHSYS_SYSCFG0 setting
> will be incorrect for mt7629 GMII mode. This patch add the missing logic
> back to fix it.
>
> Fixes: b8fc9f30821e ("net: ethernet: mediatek: Add basic PHYLINK support")
> Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
LGTM, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net,v3 0/2] Update MT7629 to support PHYLINK API
2019-10-14 7:15 [PATCH net,v3 0/2] Update MT7629 to support PHYLINK API MarkLee
2019-10-14 7:15 ` [PATCH net,v3 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support MarkLee
2019-10-14 7:15 ` [PATCH net,v3 2/2] arm: dts: mediatek: Update mt7629 dts to reflect the latest dt-binding MarkLee
@ 2019-10-16 1:03 ` David Miller
2 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2019-10-16 1:03 UTC (permalink / raw)
To: Mark-MC.Lee
Cc: sean.wang, john, nelson.chang, matthias.bgg, andrew, robh+dt,
mark.rutland, opensource, devicetree, netdev, linux-arm-kernel,
linux-mediatek, linux-kernel, jakub.kicinski
From: MarkLee <Mark-MC.Lee@mediatek.com>
Date: Mon, 14 Oct 2019 15:15:16 +0800
> This patch set has two goals :
> 1. Fix mt7629 GMII mode issue after apply mediatek
> PHYLINK support patch.
> 2. Update mt7629 dts to reflect the latest dt-binding
> with PHYLINK support.
Series applied, thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-10-16 1:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14 7:15 [PATCH net,v3 0/2] Update MT7629 to support PHYLINK API MarkLee
2019-10-14 7:15 ` [PATCH net,v3 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support MarkLee
2019-10-15 19:28 ` Jakub Kicinski
2019-10-14 7:15 ` [PATCH net,v3 2/2] arm: dts: mediatek: Update mt7629 dts to reflect the latest dt-binding MarkLee
2019-10-16 1:03 ` [PATCH net,v3 0/2] Update MT7629 to support PHYLINK API David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).