Update MT7629 to support PHYLINK API
Subsystems (4)
v3 cover Update MT7629 to support PHYLINK API
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(-)
Signature · 1 line
2.17.1
PATCH v3 1/2 net: ethernet: mediatek: Fix MT7629 missing GMII mode support
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.
Re: [PATCH net,v3 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support
Quoted 10 lines · MarkLee
In the original design,
mtk_phy_connectfunction will set ge_mode=1 if phy-mode isGMII(PHY_INTERFACE_MODE_GMII)and then set the correctge_modetoETHSYS_SYSCFG0register. This logic was broken after apply mediatek PHYLINK patch(Fixes tag), the newmtk_mac_configfunction will not set ge_mode=1 for GMII mode hence the finalETHSYS_SYSCFG0setting 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 <[email protected]>
LGTM, thanks
PATCH v3 2/2 arm: dts: mediatek: Update mt7629 dts to reflect the latest dt-binding
In reply to 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
--v2->v3:
* no changev1->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(-)
arch/arm/boot/dts/mt7629-rfb.dts +12 -1
@@ -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"; }; }; };
arch/arm/boot/dts/mt7629.dtsi +0 -2
@@ -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"; }; }; };
Signature · 1 line
2.17.1
David Miller
maintainerFrom: MarkLee <[email protected]>
Date: Mon, 14 Oct 2019 15:15:16 +0800
Quoted 5 lines
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.