* [PATCH net 0/2] Update MT7629 to support PHYLINK API
@ 2019-10-01 12:31 MarkLee
2019-10-01 12:31 ` [PATCH net 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support MarkLee
2019-10-01 12:31 ` [PATCH net 2/2] arm: dts: mediatek: Fix mt7629 dts to reflect the latest dt-binding MarkLee
0 siblings, 2 replies; 7+ messages in thread
From: MarkLee @ 2019-10-01 12:31 UTC (permalink / raw)
To: David S. Miller, Sean Wang, John Crispin, Felix Fietkau,
Nelson Chang, Matthias Brugger
Cc: Mark Rutland, devicetree, netdev, linux-kernel, Rene van Dorst,
Rob Herring, linux-mediatek, MarkLee, linux-arm-kernel
This patch target to update mt7629 eth driver and dts to
support PHYLINK API
MarkLee (2):
net: ethernet: mediatek: Fix MT7629 missing GMII mode support
arm: dts: mediatek: Fix 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH net 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support
2019-10-01 12:31 [PATCH net 0/2] Update MT7629 to support PHYLINK API MarkLee
@ 2019-10-01 12:31 ` MarkLee
2019-10-01 12:42 ` Andrew Lunn
2019-10-01 12:31 ` [PATCH net 2/2] arm: dts: mediatek: Fix mt7629 dts to reflect the latest dt-binding MarkLee
1 sibling, 1 reply; 7+ messages in thread
From: MarkLee @ 2019-10-01 12:31 UTC (permalink / raw)
To: David S. Miller, Sean Wang, John Crispin, Felix Fietkau,
Nelson Chang, Matthias Brugger
Cc: Mark Rutland, devicetree, netdev, linux-kernel, Rene van Dorst,
Rob Herring, linux-mediatek, MarkLee, linux-arm-kernel
Add missing configuration for mt7629 gmii mode support
Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
---
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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net 2/2] arm: dts: mediatek: Fix mt7629 dts to reflect the latest dt-binding
2019-10-01 12:31 [PATCH net 0/2] Update MT7629 to support PHYLINK API MarkLee
2019-10-01 12:31 ` [PATCH net 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support MarkLee
@ 2019-10-01 12:31 ` MarkLee
2019-10-01 13:56 ` René van Dorst
1 sibling, 1 reply; 7+ messages in thread
From: MarkLee @ 2019-10-01 12:31 UTC (permalink / raw)
To: David S. Miller, Sean Wang, John Crispin, Felix Fietkau,
Nelson Chang, Matthias Brugger
Cc: Mark Rutland, devicetree, netdev, linux-kernel, Rene van Dorst,
Rob Herring, linux-mediatek, MarkLee, linux-arm-kernel
* Removes mediatek,physpeed property from dtsi that is useless in PHYLINK
* Set gmac0 to fixed-link sgmii 2.5Gbit mode
* Set gmac1 to gmii mode that connect to a internal gphy
Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
---
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..6bf1f7d8ddb5 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 = "sgmii";
+ 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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support
2019-10-01 12:31 ` [PATCH net 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support MarkLee
@ 2019-10-01 12:42 ` Andrew Lunn
2019-10-02 9:21 ` mtk15127
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2019-10-01 12:42 UTC (permalink / raw)
To: MarkLee
Cc: Mark Rutland, devicetree, Felix Fietkau, Nelson Chang, netdev,
Sean Wang, linux-kernel, Rene van Dorst, Rob Herring,
linux-mediatek, John Crispin, Matthias Brugger, David S. Miller,
linux-arm-kernel
On Tue, Oct 01, 2019 at 08:31:49PM +0800, MarkLee wrote:
> Add missing configuration for mt7629 gmii mode support
>
> Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
Hi Mark
Since this is for net, it should have a Fixes: tag.
Thanks
Andrew
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net 2/2] arm: dts: mediatek: Fix mt7629 dts to reflect the latest dt-binding
2019-10-01 12:31 ` [PATCH net 2/2] arm: dts: mediatek: Fix mt7629 dts to reflect the latest dt-binding MarkLee
@ 2019-10-01 13:56 ` René van Dorst
2019-10-02 9:21 ` mtk15127
0 siblings, 1 reply; 7+ messages in thread
From: René van Dorst @ 2019-10-01 13:56 UTC (permalink / raw)
To: MarkLee
Cc: Mark Rutland, devicetree, Felix Fietkau, Nelson Chang, netdev,
Sean Wang, linux-kernel, Rob Herring, linux-mediatek,
John Crispin, Matthias Brugger, David S. Miller,
linux-arm-kernel
Hi MarkLee,
Quoting MarkLee <Mark-MC.Lee@mediatek.com>:
> * Removes mediatek,physpeed property from dtsi that is useless in PHYLINK
> * Set gmac0 to fixed-link sgmii 2.5Gbit mode
> * Set gmac1 to gmii mode that connect to a internal gphy
>
> Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
> ---
> 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..6bf1f7d8ddb5 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 = "sgmii";
> + 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
Does MT7629 soc has the same SGMII IP block as on the MT7622?
If that is the case then phy-mode should set to "2500base-x".
See discussion about the MT7622 [1] and dts of
mt7622-bananapi-bpi-r64.dts[2][3]
Note the code only set the phy in overclock mode if phymode =
2500base-x and the
link is a fixed-link, see [4].
Alsp the current code doesn't support sgmii so well. Sgmii at 2.5Gbit is not
supported at all.
Greats,
René
[1]:
https://lore.kernel.org/netdev/20190822144433.GT13294@shell.armlinux.org.uk/
[2]:
https://lore.kernel.org/netdev/20190825174341.20750-4-opensource@vdorst.com/
[3]:
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/tree/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts#n122
[4]:
https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/tree/drivers/net/ethernet/mediatek/mtk_sgmii.c#n72
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support
2019-10-01 12:42 ` Andrew Lunn
@ 2019-10-02 9:21 ` mtk15127
0 siblings, 0 replies; 7+ messages in thread
From: mtk15127 @ 2019-10-02 9:21 UTC (permalink / raw)
To: Andrew Lunn
Cc: Mark Rutland, devicetree, Felix Fietkau, Nelson Chang, netdev,
Sean Wang, linux-kernel, MarkLee, Rene van Dorst, Rob Herring,
linux-mediatek, John Crispin, Matthias Brugger, David S. Miller,
linux-arm-kernel
On Tue, 2019-10-01 at 14:42 +0200, Andrew Lunn wrote:
> On Tue, Oct 01, 2019 at 08:31:49PM +0800, MarkLee wrote:
> > Add missing configuration for mt7629 gmii mode support
> >
> > Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
>
> Hi Mark
>
> Since this is for net, it should have a Fixes: tag.
>
> Thanks
> Andrew
Hi Andrew,
Thanks for your reminder,will add a Fixes tag in the next patch.
Mark
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net 2/2] arm: dts: mediatek: Fix mt7629 dts to reflect the latest dt-binding
2019-10-01 13:56 ` René van Dorst
@ 2019-10-02 9:21 ` mtk15127
0 siblings, 0 replies; 7+ messages in thread
From: mtk15127 @ 2019-10-02 9:21 UTC (permalink / raw)
To: René van Dorst
Cc: Mark Rutland, devicetree, Felix Fietkau, Nelson Chang, netdev,
Sean Wang, linux-kernel, MarkLee, Rob Herring, linux-mediatek,
John Crispin, Matthias Brugger, David S. Miller,
linux-arm-kernel
On Tue, 2019-10-01 at 13:56 +0000, René van Dorst wrote:
> Hi MarkLee,
>
> Quoting MarkLee <Mark-MC.Lee@mediatek.com>:
>
> > * Removes mediatek,physpeed property from dtsi that is useless in PHYLINK
> > * Set gmac0 to fixed-link sgmii 2.5Gbit mode
> > * Set gmac1 to gmii mode that connect to a internal gphy
> >
> > Signed-off-by: MarkLee <Mark-MC.Lee@mediatek.com>
> > ---
> > 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..6bf1f7d8ddb5 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 = "sgmii";
> > + 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
>
> Does MT7629 soc has the same SGMII IP block as on the MT7622?
> If that is the case then phy-mode should set to "2500base-x".
Yes,MT7629 and MT7622 use the same SGMII block.
Thanks for your suggestion, will change gmac0 phy-mode to "2500base-x"
in the next patch.
Mark
> See discussion about the MT7622 [1] and dts of
> mt7622-bananapi-bpi-r64.dts[2][3]
>
> Note the code only set the phy in overclock mode if phymode =
> 2500base-x and the
> link is a fixed-link, see [4].
> Alsp the current code doesn't support sgmii so well. Sgmii at 2.5Gbit is not
> supported at all.
>
> Greats,
>
> René
>
> [1]:
> https://lore.kernel.org/netdev/20190822144433.GT13294@shell.armlinux.org.uk/
> [2]:
> https://lore.kernel.org/netdev/20190825174341.20750-4-opensource@vdorst.com/
> [3]:
> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/tree/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts#n122
> [4]:
> https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/tree/drivers/net/ethernet/mediatek/mtk_sgmii.c#n72
>
>
>
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-10-02 9:43 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 12:31 [PATCH net 0/2] Update MT7629 to support PHYLINK API MarkLee
2019-10-01 12:31 ` [PATCH net 1/2] net: ethernet: mediatek: Fix MT7629 missing GMII mode support MarkLee
2019-10-01 12:42 ` Andrew Lunn
2019-10-02 9:21 ` mtk15127
2019-10-01 12:31 ` [PATCH net 2/2] arm: dts: mediatek: Fix mt7629 dts to reflect the latest dt-binding MarkLee
2019-10-01 13:56 ` René van Dorst
2019-10-02 9:21 ` mtk15127
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).