Hello
The current way to find if the phy is internal is to compare DT phy-mode
and emac_variant/internal_phy.
But it will negate a possible future SoC where an external PHY use the
same phy mode than the internal one.
My first idea was to use phy-mode = "internal" but since internal phy-mode
is reserved for non-xMII protocol we cannot use it with dwmac-sun8i
I will send an additionnal patch for documenting more phy-mode = "internal"
Corentin Labbe (6):
arm: sun8i: nanopi-neo: revert use internal phy-mode
arm: sun8i: orangepi-2: revert "use internal phy-mode"
arm: sun8i: orangepi-one: revert "use internal phy-mode"
arm: sun8i: orangepi-zero: revert "use internal phy-mode"
arm: sun8i: orangepipc: revert "use internal phy-mode"
net: stmmac: revert "support future possible different internal phy
mode"
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 2 +-
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 2 +-
arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 2 +-
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 2 +-
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 10 +++-------
6 files changed, 8 insertions(+), 12 deletions(-)
--
2.13.0
Since internal phy-mode is reserved for non-xMII protocol we cannot use
it with dwmac-sun8i
This reverts commit 4ac57180eab2 ("arm: sun8i: orangepi-one: use internal phy-mode")
Signed-off-by: Corentin Labbe <redacted>
---
arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Since internal phy-mode is reserved for non-xMII protocol we cannot use
it with dwmac-sun8i
This reverts commit 6066de6848d4 ("arm: sun8i: orangepi-zero: use internal phy-mode")
Signed-off-by: Corentin Labbe <redacted>
---
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Since internal phy-mode is reserved for non-xMII protocol we cannot use
it with dwmac-sun8i
This reverts commit bdcc005beac9 ("arm: sun8i: nanopi-neo: use internal phy-mode")
Signed-off-by: Corentin Labbe <redacted>
---
arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Since internal phy-mode is reserved for non-xMII protocol we cannot use
it with dwmac-sun8i
This reverts commit 1c2fa5f84683 ("net: stmmac: support future possible different internal phy mode")
Signed-off-by: Corentin Labbe <redacted>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
@@ -638,7 +638,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv){structsunxi_priv_data*gmac=priv->plat->bsp_priv;structdevice_node*node=priv->device->of_node;-intret,phy_interface;+intret;u32reg,val;regmap_read(gmac->regmap,SYSCON_EMAC_REG,&val);
@@ -718,11 +718,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)if(gmac->variant->support_rmii)reg&=~SYSCON_RMII_EN;-phy_interface=priv->plat->interface;-/* if PHY is internal, select the mode (xMII) used by the SoC */-if(gmac->use_internal_phy)-phy_interface=gmac->variant->internal_phy;-switch(phy_interface){+switch(priv->plat->interface){casePHY_INTERFACE_MODE_MII:/* default */break;
@@ -936,7 +932,7 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)}plat_dat->interface=of_get_phy_mode(dev->of_node);-if(plat_dat->interface==PHY_INTERFACE_MODE_INTERNAL){+if(plat_dat->interface==gmac->variant->internal_phy){dev_info(&pdev->dev,"Will use internal PHY\n");gmac->use_internal_phy=true;gmac->ephy_clk=of_clk_get(plat_dat->phy_node,0);
Since internal phy-mode is reserved for non-xMII protocol we cannot use
it with dwmac-sun8i
This reverts commit 3432a86e641c ("arm: sun8i: orangepipc: use internal phy-mode")
Signed-off-by: Corentin Labbe <redacted>
---
arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Since internal phy-mode is reserved for non-xMII protocol we cannot use
it with dwmac-sun8i
This reverts commit 5a79b4f2a5e7 ("arm: sun8i: orangepi-2: use internal phy-mode")
Signed-off-by: Corentin Labbe <redacted>
---
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On Sun, Jul 02, 2017 at 02:31:59PM +0200, Corentin Labbe wrote:
Since internal phy-mode is reserved for non-xMII protocol we cannot use
it with dwmac-sun8i
This reverts commit 1c2fa5f84683 ("net: stmmac: support future possible different internal phy mode")
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
---
Hello
This patch was left not applied but all other patch from this serie was.
Could you apply it, or perhaps you prefer I resend it with some "Fixes:"
Regards
Corentin Labbe
On Sun, Jul 02, 2017 at 02:31:59PM +0200, Corentin Labbe wrote:
quoted
Since internal phy-mode is reserved for non-xMII protocol we cannot use
it with dwmac-sun8i
This reverts commit 1c2fa5f84683 ("net: stmmac: support future possible different internal phy mode")
Signed-off-by: Corentin Labbe <redacted>
---
Hello
This patch was left not applied but all other patch from this serie was.
Could you apply it, or perhaps you prefer I resend it with some "Fixes:"
You never need to ask questions like this.
If it's not active in my patchwork queue, you must resend.
Thank you.
On Sun, Jul 02, 2017 at 02:31:59PM +0200, Corentin Labbe wrote:
quoted
Since internal phy-mode is reserved for non-xMII protocol we cannot use
it with dwmac-sun8i
This reverts commit 1c2fa5f84683 ("net: stmmac: support future possible different internal phy mode")
Signed-off-by: Corentin Labbe <redacted>
---
Hello
This patch was left not applied but all other patch from this serie was.
Could you apply it, or perhaps you prefer I resend it with some "Fixes:"
You never need to ask questions like this.
If it's not active in my patchwork queue, you must resend.
Thank you.
Your series was not applied at all. See the status on patchwork:
http://patchwork.ozlabs.org/patch/783179/
Maxime's patch to revert all device tree changes in net-next was
applied first.
Please rebase and resend this patch for netdev (not net-next).
ChenYu