linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode"
@ 2017-07-02 12:31 Corentin Labbe
  2017-07-02 12:31 ` [PATCH 1/6] arm: sun8i: nanopi-neo: revert use internal phy-mode Corentin Labbe
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Corentin Labbe @ 2017-07-02 12:31 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, maxime.ripard, wens,
	peppe.cavallaro, alexandre.torgue, andre.przywara
  Cc: devicetree, linux-arm-kernel, linux-kernel, netdev, linux-sunxi,
	Corentin Labbe

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/6] arm: sun8i: nanopi-neo: revert use internal phy-mode
  2017-07-02 12:31 [PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe
@ 2017-07-02 12:31 ` Corentin Labbe
  2017-07-02 12:31 ` [PATCH 2/6] arm: sun8i: orangepi-2: revert "use internal phy-mode" Corentin Labbe
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Corentin Labbe @ 2017-07-02 12:31 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, maxime.ripard, wens,
	peppe.cavallaro, alexandre.torgue, andre.przywara
  Cc: devicetree, linux-arm-kernel, linux-kernel, netdev, linux-sunxi,
	Corentin Labbe

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 <clabbe.montjoie@gmail.com>
---
 arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
index 5c5ba806e2f1..78f6c24952dd 100644
--- a/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/boot/dts/sun8i-h3-nanopi-neo.dts
@@ -49,7 +49,7 @@
 
 &emac {
 	phy-handle = <&int_mii_phy>;
-	phy-mode = "internal";
+	phy-mode = "mii";
 	allwinner,leds-active-low;
 	status = "okay";
 };
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/6] arm: sun8i: orangepi-2: revert "use internal phy-mode"
  2017-07-02 12:31 [PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe
  2017-07-02 12:31 ` [PATCH 1/6] arm: sun8i: nanopi-neo: revert use internal phy-mode Corentin Labbe
@ 2017-07-02 12:31 ` Corentin Labbe
  2017-07-02 12:31 ` [PATCH 3/6] arm: sun8i: orangepi-one: " Corentin Labbe
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Corentin Labbe @ 2017-07-02 12:31 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, maxime.ripard, wens,
	peppe.cavallaro, alexandre.torgue, andre.przywara
  Cc: devicetree, linux-arm-kernel, linux-kernel, netdev, linux-sunxi,
	Corentin Labbe

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 <clabbe.montjoie@gmail.com>
---
 arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
index a2a2b11dfeed..17cdeae19c6f 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts
@@ -120,7 +120,7 @@
 
 &emac {
 	phy-handle = <&int_mii_phy>;
-	phy-mode = "internal";
+	phy-mode = "mii";
 	allwinner,leds-active-low;
 	status = "okay";
 };
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/6] arm: sun8i: orangepi-one: revert "use internal phy-mode"
  2017-07-02 12:31 [PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe
  2017-07-02 12:31 ` [PATCH 1/6] arm: sun8i: nanopi-neo: revert use internal phy-mode Corentin Labbe
  2017-07-02 12:31 ` [PATCH 2/6] arm: sun8i: orangepi-2: revert "use internal phy-mode" Corentin Labbe
@ 2017-07-02 12:31 ` Corentin Labbe
  2017-07-02 12:31 ` [PATCH 4/6] arm: sun8i: orangepi-zero: " Corentin Labbe
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: Corentin Labbe @ 2017-07-02 12:31 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, maxime.ripard, wens,
	peppe.cavallaro, alexandre.torgue, andre.przywara
  Cc: devicetree, linux-arm-kernel, linux-kernel, netdev, linux-sunxi,
	Corentin Labbe

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 <clabbe.montjoie@gmail.com>
---
 arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
index 27e7ef4e42f2..6880268e8b87 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-one.dts
@@ -100,7 +100,7 @@
 
 &emac {
 	phy-handle = <&int_mii_phy>;
-	phy-mode = "internal";
+	phy-mode = "mii";
 	allwinner,leds-active-low;
 	status = "okay";
 };
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 4/6] arm: sun8i: orangepi-zero: revert "use internal phy-mode"
  2017-07-02 12:31 [PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe
                   ` (2 preceding siblings ...)
  2017-07-02 12:31 ` [PATCH 3/6] arm: sun8i: orangepi-one: " Corentin Labbe
@ 2017-07-02 12:31 ` Corentin Labbe
  2017-07-02 12:31 ` [PATCH 5/6] arm: sun8i: orangepipc: " Corentin Labbe
  2017-07-02 12:31 ` [PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe
  5 siblings, 0 replies; 10+ messages in thread
From: Corentin Labbe @ 2017-07-02 12:31 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, maxime.ripard, wens,
	peppe.cavallaro, alexandre.torgue, andre.przywara
  Cc: devicetree, linux-arm-kernel, linux-kernel, netdev, linux-sunxi,
	Corentin Labbe

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 <clabbe.montjoie@gmail.com>
---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index 7c154b845baa..6713d0f2b3f4 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -106,7 +106,7 @@
 
 &emac {
 	phy-handle = <&int_mii_phy>;
-	phy-mode = "internal";
+	phy-mode = "mii";
 	allwinner,leds-active-low;
 	status = "okay";
 };
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 5/6] arm: sun8i: orangepipc: revert "use internal phy-mode"
  2017-07-02 12:31 [PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe
                   ` (3 preceding siblings ...)
  2017-07-02 12:31 ` [PATCH 4/6] arm: sun8i: orangepi-zero: " Corentin Labbe
@ 2017-07-02 12:31 ` Corentin Labbe
  2017-07-02 12:31 ` [PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe
  5 siblings, 0 replies; 10+ messages in thread
From: Corentin Labbe @ 2017-07-02 12:31 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, maxime.ripard, wens,
	peppe.cavallaro, alexandre.torgue, andre.przywara
  Cc: devicetree, linux-arm-kernel, linux-kernel, netdev, linux-sunxi,
	Corentin Labbe

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 <clabbe.montjoie@gmail.com>
---
 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
index 94edeb889e55..f5f0f15a2088 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts
@@ -120,7 +120,7 @@
 
 &emac {
 	phy-handle = <&int_mii_phy>;
-	phy-mode = "internal";
+	phy-mode = "mii";
 	allwinner,leds-active-low;
 	status = "okay";
 };
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode"
  2017-07-02 12:31 [PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe
                   ` (4 preceding siblings ...)
  2017-07-02 12:31 ` [PATCH 5/6] arm: sun8i: orangepipc: " Corentin Labbe
@ 2017-07-02 12:31 ` Corentin Labbe
  2017-07-06  8:51   ` Corentin Labbe
  5 siblings, 1 reply; 10+ messages in thread
From: Corentin Labbe @ 2017-07-02 12:31 UTC (permalink / raw)
  To: robh+dt, mark.rutland, linux, maxime.ripard, wens,
	peppe.cavallaro, alexandre.torgue, andre.przywara
  Cc: devicetree, linux-arm-kernel, linux-kernel, netdev, linux-sunxi,
	Corentin Labbe

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>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 6c2d1da05588..fffd6d5fc907 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -638,7 +638,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
 {
 	struct sunxi_priv_data *gmac = priv->plat->bsp_priv;
 	struct device_node *node = priv->device->of_node;
-	int ret, phy_interface;
+	int ret;
 	u32 reg, 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) {
 	case PHY_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);
-- 
2.13.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode"
  2017-07-02 12:31 ` [PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe
@ 2017-07-06  8:51   ` Corentin Labbe
  2017-07-06  9:45     ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Corentin Labbe @ 2017-07-06  8:51 UTC (permalink / raw)
  To: davem; +Cc: devicetree, linux-arm-kernel, linux-kernel, netdev, linux-sunxi

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode"
  2017-07-06  8:51   ` Corentin Labbe
@ 2017-07-06  9:45     ` David Miller
  2017-07-06 10:37       ` [linux-sunxi] " Chen-Yu Tsai
  0 siblings, 1 reply; 10+ messages in thread
From: David Miller @ 2017-07-06  9:45 UTC (permalink / raw)
  To: clabbe.montjoie
  Cc: devicetree, linux-arm-kernel, linux-kernel, netdev, linux-sunxi

From: Corentin Labbe <clabbe.montjoie@gmail.com>
Date: Thu, 6 Jul 2017 10:51:47 +0200

> 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:"

You never need to ask questions like this.

If it's not active in my patchwork queue, you must resend.

Thank you.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [linux-sunxi] Re: [PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode"
  2017-07-06  9:45     ` David Miller
@ 2017-07-06 10:37       ` Chen-Yu Tsai
  0 siblings, 0 replies; 10+ messages in thread
From: Chen-Yu Tsai @ 2017-07-06 10:37 UTC (permalink / raw)
  To: LABBE Corentin
  Cc: David Miller, devicetree, linux-arm-kernel, linux-kernel, netdev,
	linux-sunxi

Hi Corentin,

On Thu, Jul 6, 2017 at 5:45 PM, David Miller <davem@davemloft.net> wrote:
> From: Corentin Labbe <clabbe.montjoie@gmail.com>
> Date: Thu, 6 Jul 2017 10:51:47 +0200
>
>> 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:"
>
> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-07-06 10:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-02 12:31 [PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe
2017-07-02 12:31 ` [PATCH 1/6] arm: sun8i: nanopi-neo: revert use internal phy-mode Corentin Labbe
2017-07-02 12:31 ` [PATCH 2/6] arm: sun8i: orangepi-2: revert "use internal phy-mode" Corentin Labbe
2017-07-02 12:31 ` [PATCH 3/6] arm: sun8i: orangepi-one: " Corentin Labbe
2017-07-02 12:31 ` [PATCH 4/6] arm: sun8i: orangepi-zero: " Corentin Labbe
2017-07-02 12:31 ` [PATCH 5/6] arm: sun8i: orangepipc: " Corentin Labbe
2017-07-02 12:31 ` [PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe
2017-07-06  8:51   ` Corentin Labbe
2017-07-06  9:45     ` David Miller
2017-07-06 10:37       ` [linux-sunxi] " Chen-Yu Tsai

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).