Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1679452 > unrolled thread

[PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode"

Started byCorentin Labbe <clabbe.montjoie@gmail.com>
First post2017-07-02 14:40 +0200
Last post2017-07-02 14:40 +0200
Articles 6 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-07-02 14:40 +0200
    [PATCH 4/6] arm: sun8i: orangepi-zero: revert "use internal phy-mode" Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-07-02 14:40 +0200
    [PATCH 2/6] arm: sun8i: orangepi-2: revert "use internal phy-mode" Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-07-02 14:40 +0200
    [PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode" Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-07-02 14:40 +0200
    [PATCH 5/6] arm: sun8i: orangepipc: revert "use internal phy-mode" Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-07-02 14:40 +0200
    [PATCH 3/6] arm: sun8i: orangepi-one: revert "use internal phy-mode" Corentin Labbe <clabbe.montjoie@gmail.com> - 2017-07-02 14:40 +0200

#1679452 — [PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode"

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-07-02 14:40 +0200
Subject[PATCH 0/6] net: stmmac: revert "support future possible different internal phy mode"
Message-ID<tYMkp-1Qk-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1679453 — [PATCH 4/6] arm: sun8i: orangepi-zero: revert "use internal phy-mode"

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-07-02 14:40 +0200
Subject[PATCH 4/6] arm: sun8i: orangepi-zero: revert "use internal phy-mode"
Message-ID<tYMkq-1Qk-5@gated-at.bofh.it>
In reply to#1679452
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

[toc] | [prev] | [next] | [standalone]


#1679454 — [PATCH 2/6] arm: sun8i: orangepi-2: revert "use internal phy-mode"

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-07-02 14:40 +0200
Subject[PATCH 2/6] arm: sun8i: orangepi-2: revert "use internal phy-mode"
Message-ID<tYMkq-1Qk-7@gated-at.bofh.it>
In reply to#1679452
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

[toc] | [prev] | [next] | [standalone]


#1679456 — [PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode"

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-07-02 14:40 +0200
Subject[PATCH 6/6] net: stmmac: revert "support future possible different internal phy mode"
Message-ID<tYMkq-1Qk-13@gated-at.bofh.it>
In reply to#1679452
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

[toc] | [prev] | [next] | [standalone]


#1679458 — [PATCH 5/6] arm: sun8i: orangepipc: revert "use internal phy-mode"

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-07-02 14:40 +0200
Subject[PATCH 5/6] arm: sun8i: orangepipc: revert "use internal phy-mode"
Message-ID<tYMkq-1Qk-19@gated-at.bofh.it>
In reply to#1679452
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

[toc] | [prev] | [next] | [standalone]


#1679461 — [PATCH 3/6] arm: sun8i: orangepi-one: revert "use internal phy-mode"

FromCorentin Labbe <clabbe.montjoie@gmail.com>
Date2017-07-02 14:40 +0200
Subject[PATCH 3/6] arm: sun8i: orangepi-one: revert "use internal phy-mode"
Message-ID<tYMkq-1Qk-23@gated-at.bofh.it>
In reply to#1679452
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web