linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high"
@ 2020-10-24 16:25 Chen-Yu Tsai
  2020-10-24 16:25 ` [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY Chen-Yu Tsai
                   ` (9 more replies)
  0 siblings, 10 replies; 27+ messages in thread
From: Chen-Yu Tsai @ 2020-10-24 16:25 UTC (permalink / raw)
  To: Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

This reverts commit 75ee680cbd2e4d0156b94f9fec50076361ab12f2.

Turns out the activity and link LEDs on the RJ45 port are active low,
just like on the Orange Pi PC.

Revert the commit that says otherwise.

Fixes: 75ee680cbd2e ("arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high")
Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
If you have this board, please help test it.

For me, the correct lighting of the LEDs is both LEDs should be lit
when connected at 100 Mbps.
---
 arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
index 71fb73208939..babf4cf1b2f6 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
@@ -53,11 +53,6 @@ aliases {
 	};
 };
 
-&emac {
-	/* LEDs changed to active high on the plus */
-	/delete-property/ allwinner,leds-active-low;
-};
-
 &mmc1 {
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
-- 
2.28.0


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

* [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Chen-Yu Tsai
@ 2020-10-24 16:25 ` Chen-Yu Tsai
  2020-10-24 17:51   ` [linux-sunxi] " Icenowy Zheng
  2020-10-25  8:58   ` Jernej Škrabec
  2020-10-24 16:25 ` [PATCH 03/10] ARM: dts: sun7i: cubietruck: " Chen-Yu Tsai
                   ` (8 subsequent siblings)
  9 siblings, 2 replies; 27+ messages in thread
From: Chen-Yu Tsai @ 2020-10-24 16:25 UTC (permalink / raw)
  To: Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The Ethernet PHY on the A31 Hummingbird has the RX and TX delays
enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: c220aec2bb79 ("ARM: dts: sun6i: Add Merrii A31 Hummingbird support")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
index 049e6ab3cf56..73de34ae37fd 100644
--- a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
+++ b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
@@ -154,7 +154,7 @@ &gmac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&gmac_rgmii_pins>;
 	phy-handle = <&phy1>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	status = "okay";
 };
 
-- 
2.28.0


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

* [PATCH 03/10] ARM: dts: sun7i: cubietruck: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Chen-Yu Tsai
  2020-10-24 16:25 ` [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY Chen-Yu Tsai
@ 2020-10-24 16:25 ` Chen-Yu Tsai
  2020-10-24 17:04   ` [linux-sunxi] " Emilio López
  2020-10-24 16:25 ` [PATCH 04/10] ARM: dts: sun7i: bananapi-m1-plus: " Chen-Yu Tsai
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 27+ messages in thread
From: Chen-Yu Tsai @ 2020-10-24 16:25 UTC (permalink / raw)
  To: Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The Ethernet PHY on the Cubietruck has the RX and TX delays
enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: 67073d97672d ("ARM: dts: sun7i: cubietruck: Enable the GMAC")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
index 8c8dee6ea461..9109ca0919ad 100644
--- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
@@ -151,7 +151,7 @@ &gmac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&gmac_rgmii_pins>;
 	phy-handle = <&phy1>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	status = "okay";
 };
 
-- 
2.28.0


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

* [PATCH 04/10] ARM: dts: sun7i: bananapi-m1-plus: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Chen-Yu Tsai
  2020-10-24 16:25 ` [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY Chen-Yu Tsai
  2020-10-24 16:25 ` [PATCH 03/10] ARM: dts: sun7i: cubietruck: " Chen-Yu Tsai
@ 2020-10-24 16:25 ` Chen-Yu Tsai
  2020-10-25  8:51   ` Jernej Škrabec
  2020-10-24 16:25 ` [PATCH 05/10] ARM: dts: sun8i: h3: orangepi-plus2e: " Chen-Yu Tsai
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 27+ messages in thread
From: Chen-Yu Tsai @ 2020-10-24 16:25 UTC (permalink / raw)
  To: Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The Ethernet PHY on the Bananapi M1+ has the RX and TX delays
enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: 04c85ecad32a ("ARM: dts: sun7i: Add dts file for Bananapi M1 Plus board")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
index 32d5d45a35c0..8945dbb114a2 100644
--- a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
+++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts
@@ -130,7 +130,7 @@ &gmac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&gmac_rgmii_pins>;
 	phy-handle = <&phy1>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	phy-supply = <&reg_gmac_3v3>;
 	status = "okay";
 };
-- 
2.28.0


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

* [PATCH 05/10] ARM: dts: sun8i: h3: orangepi-plus2e: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Chen-Yu Tsai
                   ` (2 preceding siblings ...)
  2020-10-24 16:25 ` [PATCH 04/10] ARM: dts: sun7i: bananapi-m1-plus: " Chen-Yu Tsai
@ 2020-10-24 16:25 ` Chen-Yu Tsai
  2020-10-25  7:53   ` Jernej Škrabec
  2020-10-24 16:25 ` [PATCH 06/10] ARM: dts: sun8i: a83t: Enable both " Chen-Yu Tsai
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 27+ messages in thread
From: Chen-Yu Tsai @ 2020-10-24 16:25 UTC (permalink / raw)
  To: Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The Ethernet PHY on the Orange Pi Plus 2E has the RX and TX delays
enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
Fixes: 7a78ef92cdc5 ("ARM: sun8i: h3: Enable EMAC with external PHY on Orange Pi Plus 2E")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
index 6dbf7b2e0c13..b6ca45d18e51 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts
@@ -67,7 +67,7 @@ &emac {
 	pinctrl-0 = <&emac_rgmii_pins>;
 	phy-supply = <&reg_gmac_3v3>;
 	phy-handle = <&ext_rgmii_phy>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	status = "okay";
 };
 
-- 
2.28.0


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

* [PATCH 06/10] ARM: dts: sun8i: a83t: Enable both RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Chen-Yu Tsai
                   ` (3 preceding siblings ...)
  2020-10-24 16:25 ` [PATCH 05/10] ARM: dts: sun8i: h3: orangepi-plus2e: " Chen-Yu Tsai
@ 2020-10-24 16:25 ` Chen-Yu Tsai
  2020-10-25  8:48   ` Jernej Škrabec
  2020-10-24 16:25 ` [PATCH 07/10] ARM: dts: sun9i: " Chen-Yu Tsai
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 27+ messages in thread
From: Chen-Yu Tsai @ 2020-10-24 16:25 UTC (permalink / raw)
  To: Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The Ethernet PHY on the Bananapi M3 and Cubietruck Plus have the RX
and TX delays enabled on the PHY, using pull-ups on the RXDLY and
TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: 039359948a4b ("ARM: dts: sun8i: a83t: Enable Ethernet on two boards")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts     | 2 +-
 arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
index 9d34eabba121..431f70234d36 100644
--- a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
+++ b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
@@ -131,7 +131,7 @@ &emac {
 	pinctrl-0 = <&emac_rgmii_pins>;
 	phy-supply = <&reg_sw>;
 	phy-handle = <&rgmii_phy>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	allwinner,rx-delay-ps = <700>;
 	allwinner,tx-delay-ps = <700>;
 	status = "okay";
diff --git a/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts b/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts
index d9be511f054f..d8326a5c681d 100644
--- a/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts
+++ b/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts
@@ -183,7 +183,7 @@ &emac {
 	pinctrl-0 = <&emac_rgmii_pins>;
 	phy-supply = <&reg_dldo4>;
 	phy-handle = <&rgmii_phy>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	status = "okay";
 };
 
-- 
2.28.0


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

* [PATCH 07/10] ARM: dts: sun9i: Enable both RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Chen-Yu Tsai
                   ` (4 preceding siblings ...)
  2020-10-24 16:25 ` [PATCH 06/10] ARM: dts: sun8i: a83t: Enable both " Chen-Yu Tsai
@ 2020-10-24 16:25 ` Chen-Yu Tsai
  2020-10-25  8:40   ` Jernej Škrabec
  2020-10-24 16:25 ` [PATCH 08/10] ARM: dts: sunxi: bananapi-m2-plus: Enable " Chen-Yu Tsai
                   ` (3 subsequent siblings)
  9 siblings, 1 reply; 27+ messages in thread
From: Chen-Yu Tsai @ 2020-10-24 16:25 UTC (permalink / raw)
  To: Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The Ethernet PHY on the Cubieboard 4 and A80 Optimus have the RX
and TX delays enabled on the PHY, using pull-ups on the RXDLY and
TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: 98048143b7f8 ("ARM: dts: sun9i: cubieboard4: Enable GMAC")
Fixes: bc9bd03a44f9 ("ARM: dts: sun9i: a80-optimus: Enable GMAC")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 2 +-
 arch/arm/boot/dts/sun9i-a80-optimus.dts     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts b/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
index d3b337b043a1..484b93df20cb 100644
--- a/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
+++ b/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
@@ -129,7 +129,7 @@ &gmac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&gmac_rgmii_pins>;
 	phy-handle = <&phy1>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	phy-supply = <&reg_cldo1>;
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/sun9i-a80-optimus.dts b/arch/arm/boot/dts/sun9i-a80-optimus.dts
index bbc6335e5631..5c3580d712e4 100644
--- a/arch/arm/boot/dts/sun9i-a80-optimus.dts
+++ b/arch/arm/boot/dts/sun9i-a80-optimus.dts
@@ -124,7 +124,7 @@ &gmac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&gmac_rgmii_pins>;
 	phy-handle = <&phy1>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	phy-supply = <&reg_cldo1>;
 	status = "okay";
 };
-- 
2.28.0


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

* [PATCH 08/10] ARM: dts: sunxi: bananapi-m2-plus: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Chen-Yu Tsai
                   ` (5 preceding siblings ...)
  2020-10-24 16:25 ` [PATCH 07/10] ARM: dts: sun9i: " Chen-Yu Tsai
@ 2020-10-24 16:25 ` Chen-Yu Tsai
  2020-10-25  8:01   ` Jernej Škrabec
  2020-10-24 16:25 ` [PATCH 09/10] arm64: dts: allwinner: h5: libretech-all-h5-cc: Enable RGMII RX/TX delay on PHY Chen-Yu Tsai
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 27+ messages in thread
From: Chen-Yu Tsai @ 2020-10-24 16:25 UTC (permalink / raw)
  To: Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The Ethernet PHY on the Bananapi M2+ has the RX and TX delays
enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: 8c7ba536e709 ("ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i")
Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
Fixes: aa8fee415f46 ("ARM: dts: sun8i: h3: Split out non-SoC-specific parts of Bananapi M2 Plus")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi
index 39263e74fbb5..8e5cb3b3fd68 100644
--- a/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi
+++ b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi
@@ -126,7 +126,7 @@ &emac {
 	pinctrl-0 = <&emac_rgmii_pins>;
 	phy-supply = <&reg_gmac_3v3>;
 	phy-handle = <&ext_rgmii_phy>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 
 	status = "okay";
 };
-- 
2.28.0


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

* [PATCH 09/10] arm64: dts: allwinner: h5: libretech-all-h5-cc: Enable RGMII RX/TX delay on PHY
  2020-10-24 16:25 [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Chen-Yu Tsai
                   ` (6 preceding siblings ...)
  2020-10-24 16:25 ` [PATCH 08/10] ARM: dts: sunxi: bananapi-m2-plus: Enable " Chen-Yu Tsai
@ 2020-10-24 16:25 ` Chen-Yu Tsai
  2020-10-25  9:02   ` Jernej Škrabec
  2020-10-24 16:25 ` [PATCH 10/10] arm64: dts: allwinner: a64: bananapi-m64: " Chen-Yu Tsai
  2020-10-25  7:35 ` [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Jernej Škrabec
  9 siblings, 1 reply; 27+ messages in thread
From: Chen-Yu Tsai @ 2020-10-24 16:25 UTC (permalink / raw)
  To: Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The Ethernet PHY on the Libre Computer ALL-H5-CC has the RX and TX
delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: 60d0426d7603 ("arm64: dts: allwinner: h5: Add Libre Computer ALL-H5-CC H5 board")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-h5-libretech-all-h5-cc.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-libretech-all-h5-cc.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-libretech-all-h5-cc.dts
index df1b9263ad0e..6e30a564c87f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-libretech-all-h5-cc.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-libretech-all-h5-cc.dts
@@ -36,7 +36,7 @@ &emac {
 	pinctrl-0 = <&emac_rgmii_pins>;
 	phy-supply = <&reg_gmac_3v3>;
 	phy-handle = <&ext_rgmii_phy>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	/delete-property/ allwinner,leds-active-low;
 	status = "okay";
 };
-- 
2.28.0


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

* [PATCH 10/10] arm64: dts: allwinner: a64: bananapi-m64: Enable RGMII RX/TX delay on PHY
  2020-10-24 16:25 [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Chen-Yu Tsai
                   ` (7 preceding siblings ...)
  2020-10-24 16:25 ` [PATCH 09/10] arm64: dts: allwinner: h5: libretech-all-h5-cc: Enable RGMII RX/TX delay on PHY Chen-Yu Tsai
@ 2020-10-24 16:25 ` Chen-Yu Tsai
  2020-10-24 19:58   ` [linux-sunxi] " Corentin Labbe
  2020-10-26 10:24   ` Maxime Ripard
  2020-10-25  7:35 ` [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Jernej Škrabec
  9 siblings, 2 replies; 27+ messages in thread
From: Chen-Yu Tsai @ 2020-10-24 16:25 UTC (permalink / raw)
  To: Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

From: Chen-Yu Tsai <wens@csie.org>

The Ethernet PHY on the Bananapi M64 has the RX and TX delays
enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: e7295499903d ("arm64: allwinner: bananapi-m64: Enable dwmac-sun8i")
Fixes: 94f442886711 ("arm64: dts: allwinner: A64: Restore EMAC changes")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 3ea5182ca489..e5e840b9fbb4 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -105,7 +105,7 @@ &ehci1 {
 &emac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii_pins>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	phy-handle = <&ext_rgmii_phy>;
 	phy-supply = <&reg_dc1sw>;
 	status = "okay";
-- 
2.28.0


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

* Re: [linux-sunxi] [PATCH 03/10] ARM: dts: sun7i: cubietruck: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 ` [PATCH 03/10] ARM: dts: sun7i: cubietruck: " Chen-Yu Tsai
@ 2020-10-24 17:04   ` Emilio López
  0 siblings, 0 replies; 27+ messages in thread
From: Emilio López @ 2020-10-24 17:04 UTC (permalink / raw)
  To: wens, Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

El 24/10/20 a las 13:25, Chen-Yu Tsai escribió:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The Ethernet PHY on the Cubietruck has the RX and TX delays
> enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> 
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
> 
> Fixes: 67073d97672d ("ARM: dts: sun7i: cubietruck: Enable the GMAC")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>   arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
> index 8c8dee6ea461..9109ca0919ad 100644
> --- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts
> @@ -151,7 +151,7 @@ &gmac {
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&gmac_rgmii_pins>;
>   	phy-handle = <&phy1>;
> -	phy-mode = "rgmii";
> +	phy-mode = "rgmii-id";
>   	status = "okay";
>   };
>   
> 

I upgraded kernels yesterday and saw that networking had stopped 
working. I can confirm that this patch fixes the problem and restores 
connectivity on my Cubietruck. I also verified the information with the 
schematics, and it looks alright to me :)

Reviewed-by: Emilio López <emilio@elopez.com.ar>
Tested-by: Emilio López <emilio@elopez.com.ar>

Thanks!
Emilio

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

* Re: [linux-sunxi] [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 ` [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY Chen-Yu Tsai
@ 2020-10-24 17:51   ` Icenowy Zheng
  2020-10-24 18:30     ` Jernej Škrabec
  2020-10-25  8:58   ` Jernej Škrabec
  1 sibling, 1 reply; 27+ messages in thread
From: Icenowy Zheng @ 2020-10-24 17:51 UTC (permalink / raw)
  To: wens, Maxime Ripard, Jernej Skrabec
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

在 2020-10-25星期日的 00:25 +0800,Chen-Yu Tsai写道:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The Ethernet PHY on the A31 Hummingbird has the RX and TX delays
> enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> 
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").

Personally I think they should revert this commit, and consider other
solution.

This commit breaks everything.

(Although the patch on individual DT patches are technically correct)

> 
> Fixes: c220aec2bb79 ("ARM: dts: sun6i: Add Merrii A31 Hummingbird
> support")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> index 049e6ab3cf56..73de34ae37fd 100644
> --- a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> +++ b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> @@ -154,7 +154,7 @@ &gmac {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&gmac_rgmii_pins>;
>  	phy-handle = <&phy1>;
> -	phy-mode = "rgmii";
> +	phy-mode = "rgmii-id";
>  	status = "okay";
>  };
>  
> -- 
> 2.28.0
> 

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

* Re: [linux-sunxi] [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 17:51   ` [linux-sunxi] " Icenowy Zheng
@ 2020-10-24 18:30     ` Jernej Škrabec
  2020-10-24 18:39       ` Icenowy Zheng
  0 siblings, 1 reply; 27+ messages in thread
From: Jernej Škrabec @ 2020-10-24 18:30 UTC (permalink / raw)
  To: wens, Maxime Ripard, Icenowy Zheng
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Dne sobota, 24. oktober 2020 ob 19:51:06 CEST je Icenowy Zheng napisal(a):
> 在 2020-10-25星期日的 00:25 +0800,Chen-Yu Tsai写道:
> 
> > From: Chen-Yu Tsai <wens@csie.org>
> > 
> > The Ethernet PHY on the A31 Hummingbird has the RX and TX delays
> > enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> > 
> > Fix the phy-mode description to correct reflect this so that the
> > implementation doesn't reconfigure the delays incorrectly. This
> > happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> > rx/tx delay config").
> 
> Personally I think they should revert this commit, and consider other
> solution.
> 
> This commit breaks everything.
> 

Previously broken driver allowed inproper DT to work, so you have to fix 
everything eventually.

Plus side, there is no need to have hack for Pine64 Plus ethernet anymore.

Best regards,
Jernej

> (Although the patch on individual DT patches are technically correct)
> 
> > Fixes: c220aec2bb79 ("ARM: dts: sun6i: Add Merrii A31 Hummingbird
> > support")
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> > 
> >  arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> > b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> > index 049e6ab3cf56..73de34ae37fd 100644
> > --- a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> > +++ b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> > @@ -154,7 +154,7 @@ &gmac {
> > 
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&gmac_rgmii_pins>;
> >  	phy-handle = <&phy1>;
> > 
> > -	phy-mode = "rgmii";
> > +	phy-mode = "rgmii-id";
> > 
> >  	status = "okay";
> >  
> >  };





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

* Re: [linux-sunxi] [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 18:30     ` Jernej Škrabec
@ 2020-10-24 18:39       ` Icenowy Zheng
  2020-10-24 19:09         ` Clément Péron
  2020-10-26  7:38         ` Ard Biesheuvel
  0 siblings, 2 replies; 27+ messages in thread
From: Icenowy Zheng @ 2020-10-24 18:39 UTC (permalink / raw)
  To: jernej.skrabec, Jernej Škrabec, wens, Maxime Ripard
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel



于 2020年10月25日 GMT+08:00 上午2:30:35, "Jernej Škrabec" <jernej.skrabec@siol.net> 写到:
>Dne sobota, 24. oktober 2020 ob 19:51:06 CEST je Icenowy Zheng
>napisal(a):
>> 在 2020-10-25星期日的 00:25 +0800,Chen-Yu Tsai写道:
>> 
>> > From: Chen-Yu Tsai <wens@csie.org>
>> > 
>> > The Ethernet PHY on the A31 Hummingbird has the RX and TX delays
>> > enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
>> > 
>> > Fix the phy-mode description to correct reflect this so that the
>> > implementation doesn't reconfigure the delays incorrectly. This
>> > happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
>> > rx/tx delay config").
>> 
>> Personally I think they should revert this commit, and consider other
>> solution.
>> 
>> This commit breaks everything.
>> 
>
>Previously broken driver allowed inproper DT to work, so you have to
>fix 
>everything eventually.

There is no "improper DT" if it's already shipped, DT should suffer driver
change, not changed to match driver.

I think at least Fedora tends to ship a DT with a system image that will
not get updated when kernel gets updated.

>
>Plus side, there is no need to have hack for Pine64 Plus ethernet
>anymore.
>
>Best regards,
>Jernej
>
>> (Although the patch on individual DT patches are technically correct)
>> 
>> > Fixes: c220aec2bb79 ("ARM: dts: sun6i: Add Merrii A31 Hummingbird
>> > support")
>> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> > ---
>> > 
>> >  arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 2 +-
>> >  1 file changed, 1 insertion(+), 1 deletion(-)
>> > 
>> > diff --git a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
>> > b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
>> > index 049e6ab3cf56..73de34ae37fd 100644
>> > --- a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
>> > +++ b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
>> > @@ -154,7 +154,7 @@ &gmac {
>> > 
>> >  	pinctrl-names = "default";
>> >  	pinctrl-0 = <&gmac_rgmii_pins>;
>> >  	phy-handle = <&phy1>;
>> > 
>> > -	phy-mode = "rgmii";
>> > +	phy-mode = "rgmii-id";
>> > 
>> >  	status = "okay";
>> >  
>> >  };

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

* Re: [linux-sunxi] [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 18:39       ` Icenowy Zheng
@ 2020-10-24 19:09         ` Clément Péron
  2020-10-26  7:38         ` Ard Biesheuvel
  1 sibling, 0 replies; 27+ messages in thread
From: Clément Péron @ 2020-10-24 19:09 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Jernej Škrabec, Chen-Yu Tsai, Maxime Ripard, linux-sunxi,
	Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Hi,

On Sat, 24 Oct 2020 at 20:39, Icenowy Zheng <icenowy@aosc.io> wrote:
>
>
>
> 于 2020年10月25日 GMT+08:00 上午2:30:35, "Jernej Škrabec" <jernej.skrabec@siol.net> 写到:
> >Dne sobota, 24. oktober 2020 ob 19:51:06 CEST je Icenowy Zheng
> >napisal(a):
> >> 在 2020-10-25星期日的 00:25 +0800,Chen-Yu Tsai写道:
> >>
> >> > From: Chen-Yu Tsai <wens@csie.org>
> >> >
> >> > The Ethernet PHY on the A31 Hummingbird has the RX and TX delays
> >> > enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> >> >
> >> > Fix the phy-mode description to correct reflect this so that the
> >> > implementation doesn't reconfigure the delays incorrectly. This
> >> > happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> >> > rx/tx delay config").
> >>
> >> Personally I think they should revert this commit, and consider other
> >> solution.
> >>
> >> This commit breaks everything.
> >>
> >
> >Previously broken driver allowed inproper DT to work, so you have to
> >fix
> >everything eventually.
>
> There is no "improper DT" if it's already shipped, DT should suffer driver
> change, not changed to match driver.
>
> I think at least Fedora tends to ship a DT with a system image that will
> not get updated when kernel gets updated.

I think we are missing a phy-mode saying use RGMII but don't change
the delay set by the hardware.
Or maybe introduce a phy-mode='rgmii-noid' to explicitly disable the
RX/TD delay using software bits
and use phy-mode='rgmii' to keep the delay set by the hardware.

Clement

>
> >
> >Plus side, there is no need to have hack for Pine64 Plus ethernet
> >anymore.
> >
> >Best regards,
> >Jernej
> >
> >> (Although the patch on individual DT patches are technically correct)
> >>
> >> > Fixes: c220aec2bb79 ("ARM: dts: sun6i: Add Merrii A31 Hummingbird
> >> > support")
> >> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> >> > ---
> >> >
> >> >  arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 2 +-
> >> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >> >
> >> > diff --git a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> >> > b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> >> > index 049e6ab3cf56..73de34ae37fd 100644
> >> > --- a/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> >> > +++ b/arch/arm/boot/dts/sun6i-a31-hummingbird.dts
> >> > @@ -154,7 +154,7 @@ &gmac {
> >> >
> >> >    pinctrl-names = "default";
> >> >    pinctrl-0 = <&gmac_rgmii_pins>;
> >> >    phy-handle = <&phy1>;
> >> >
> >> > -  phy-mode = "rgmii";
> >> > +  phy-mode = "rgmii-id";
> >> >
> >> >    status = "okay";
> >> >
> >> >  };
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/9D317C52-5F28-41A9-80DA-DBADA142B042%40aosc.io.

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

* Re: [linux-sunxi] [PATCH 10/10] arm64: dts: allwinner: a64: bananapi-m64: Enable RGMII RX/TX delay on PHY
  2020-10-24 16:25 ` [PATCH 10/10] arm64: dts: allwinner: a64: bananapi-m64: " Chen-Yu Tsai
@ 2020-10-24 19:58   ` Corentin Labbe
  2020-10-25  8:34     ` Jernej Škrabec
  2020-10-26 10:24   ` Maxime Ripard
  1 sibling, 1 reply; 27+ messages in thread
From: Corentin Labbe @ 2020-10-24 19:58 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, Jernej Skrabec, linux-sunxi, Chen-Yu Tsai,
	devicetree, linux-arm-kernel, linux-kernel

On Sun, Oct 25, 2020 at 12:25:15AM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The Ethernet PHY on the Bananapi M64 has the RX and TX delays
> enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> 
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
> 
> Fixes: e7295499903d ("arm64: allwinner: bananapi-m64: Enable dwmac-sun8i")
> Fixes: 94f442886711 ("arm64: dts: allwinner: A64: Restore EMAC changes")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
> index 3ea5182ca489..e5e840b9fbb4 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
> @@ -105,7 +105,7 @@ &ehci1 {
>  &emac {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&rgmii_pins>;
> -	phy-mode = "rgmii";
> +	phy-mode = "rgmii-id";
>  	phy-handle = <&ext_rgmii_phy>;
>  	phy-supply = <&reg_dc1sw>;
>  	status = "okay";
> -- 
> 2.28.0

Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Thanks

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

* Re: [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high"
  2020-10-24 16:25 [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Chen-Yu Tsai
                   ` (8 preceding siblings ...)
  2020-10-24 16:25 ` [PATCH 10/10] arm64: dts: allwinner: a64: bananapi-m64: " Chen-Yu Tsai
@ 2020-10-25  7:35 ` Jernej Škrabec
  9 siblings, 0 replies; 27+ messages in thread
From: Jernej Škrabec @ 2020-10-25  7:35 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Dne sobota, 24. oktober 2020 ob 18:25:06 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <wens@csie.org>
> 
> This reverts commit 75ee680cbd2e4d0156b94f9fec50076361ab12f2.
> 
> Turns out the activity and link LEDs on the RJ45 port are active low,
> just like on the Orange Pi PC.
> 
> Revert the commit that says otherwise.
> 
> Fixes: 75ee680cbd2e ("arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs 
to active high")
> Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
> If you have this board, please help test it.
> 
> For me, the correct lighting of the LEDs is both LEDs should be lit
> when connected at 100 Mbps.

Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>

Best regards,
Jernej



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

* Re: [PATCH 05/10] ARM: dts: sun8i: h3: orangepi-plus2e: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 ` [PATCH 05/10] ARM: dts: sun8i: h3: orangepi-plus2e: " Chen-Yu Tsai
@ 2020-10-25  7:53   ` Jernej Škrabec
  0 siblings, 0 replies; 27+ messages in thread
From: Jernej Škrabec @ 2020-10-25  7:53 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Dne sobota, 24. oktober 2020 ob 18:25:10 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The Ethernet PHY on the Orange Pi Plus 2E has the RX and TX delays
> enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> 
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
> 
> Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
> Fixes: 7a78ef92cdc5 ("ARM: sun8i: h3: Enable EMAC with external PHY on 
Orange Pi Plus 2E")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>

Best regards,
Jernej



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

* Re: [PATCH 08/10] ARM: dts: sunxi: bananapi-m2-plus: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 ` [PATCH 08/10] ARM: dts: sunxi: bananapi-m2-plus: Enable " Chen-Yu Tsai
@ 2020-10-25  8:01   ` Jernej Škrabec
  0 siblings, 0 replies; 27+ messages in thread
From: Jernej Škrabec @ 2020-10-25  8:01 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Dne sobota, 24. oktober 2020 ob 18:25:13 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The Ethernet PHY on the Bananapi M2+ has the RX and TX delays
> enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> 
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
> 
> Fixes: 8c7ba536e709 ("ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i")
> Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
> Fixes: aa8fee415f46 ("ARM: dts: sun8i: h3: Split out non-SoC-specific parts 
of Bananapi M2 Plus")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>

Best regards,
Jernej



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

* Re: Re: [linux-sunxi] [PATCH 10/10] arm64: dts: allwinner: a64: bananapi-m64: Enable RGMII RX/TX delay on PHY
  2020-10-24 19:58   ` [linux-sunxi] " Corentin Labbe
@ 2020-10-25  8:34     ` Jernej Škrabec
  0 siblings, 0 replies; 27+ messages in thread
From: Jernej Škrabec @ 2020-10-25  8:34 UTC (permalink / raw)
  To: Chen-Yu Tsai, Corentin Labbe
  Cc: Maxime Ripard, linux-sunxi, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel

Dne sobota, 24. oktober 2020 ob 21:58:03 CET je Corentin Labbe napisal(a):
> On Sun, Oct 25, 2020 at 12:25:15AM +0800, Chen-Yu Tsai wrote:
> > From: Chen-Yu Tsai <wens@csie.org>
> > 
> > The Ethernet PHY on the Bananapi M64 has the RX and TX delays
> > enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> > 
> > Fix the phy-mode description to correct reflect this so that the
> > implementation doesn't reconfigure the delays incorrectly. This
> > happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> > rx/tx delay config").
> > 
> > Fixes: e7295499903d ("arm64: allwinner: bananapi-m64: Enable dwmac-sun8i")
> > Fixes: 94f442886711 ("arm64: dts: allwinner: A64: Restore EMAC changes")
> > Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> > ---
> >  arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
> > index 3ea5182ca489..e5e840b9fbb4 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
> > @@ -105,7 +105,7 @@ &ehci1 {
> >  &emac {
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&rgmii_pins>;
> > -	phy-mode = "rgmii";
> > +	phy-mode = "rgmii-id";
> >  	phy-handle = <&ext_rgmii_phy>;
> >  	phy-supply = <&reg_dc1sw>;
> >  	status = "okay";
> > -- 
> > 2.28.0
> 
> Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>

Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>

Best regards,
Jernej



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

* Re: [PATCH 07/10] ARM: dts: sun9i: Enable both RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 ` [PATCH 07/10] ARM: dts: sun9i: " Chen-Yu Tsai
@ 2020-10-25  8:40   ` Jernej Škrabec
  0 siblings, 0 replies; 27+ messages in thread
From: Jernej Škrabec @ 2020-10-25  8:40 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Dne sobota, 24. oktober 2020 ob 18:25:12 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The Ethernet PHY on the Cubieboard 4 and A80 Optimus have the RX
> and TX delays enabled on the PHY, using pull-ups on the RXDLY and
> TXDLY pins.
> 
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
> 
> Fixes: 98048143b7f8 ("ARM: dts: sun9i: cubieboard4: Enable GMAC")
> Fixes: bc9bd03a44f9 ("ARM: dts: sun9i: a80-optimus: Enable GMAC")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>

Best regards,
Jernej



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

* Re: [PATCH 06/10] ARM: dts: sun8i: a83t: Enable both RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 ` [PATCH 06/10] ARM: dts: sun8i: a83t: Enable both " Chen-Yu Tsai
@ 2020-10-25  8:48   ` Jernej Škrabec
  0 siblings, 0 replies; 27+ messages in thread
From: Jernej Škrabec @ 2020-10-25  8:48 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Dne sobota, 24. oktober 2020 ob 18:25:11 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The Ethernet PHY on the Bananapi M3 and Cubietruck Plus have the RX
> and TX delays enabled on the PHY, using pull-ups on the RXDLY and
> TXDLY pins.
> 
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
> 
> Fixes: 039359948a4b ("ARM: dts: sun8i: a83t: Enable Ethernet on two boards")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>

Best regards,
Jernej



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

* Re: [PATCH 04/10] ARM: dts: sun7i: bananapi-m1-plus: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 ` [PATCH 04/10] ARM: dts: sun7i: bananapi-m1-plus: " Chen-Yu Tsai
@ 2020-10-25  8:51   ` Jernej Škrabec
  0 siblings, 0 replies; 27+ messages in thread
From: Jernej Škrabec @ 2020-10-25  8:51 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Dne sobota, 24. oktober 2020 ob 18:25:09 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The Ethernet PHY on the Bananapi M1+ has the RX and TX delays
> enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> 
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
> 
> Fixes: 04c85ecad32a ("ARM: dts: sun7i: Add dts file for Bananapi M1 Plus 
board")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>

Best regards,
Jernej



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

* Re: [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 16:25 ` [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY Chen-Yu Tsai
  2020-10-24 17:51   ` [linux-sunxi] " Icenowy Zheng
@ 2020-10-25  8:58   ` Jernej Škrabec
  1 sibling, 0 replies; 27+ messages in thread
From: Jernej Škrabec @ 2020-10-25  8:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Dne sobota, 24. oktober 2020 ob 18:25:07 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The Ethernet PHY on the A31 Hummingbird has the RX and TX delays
> enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> 
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
> 
> Fixes: c220aec2bb79 ("ARM: dts: sun6i: Add Merrii A31 Hummingbird support")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>

Best regards,
Jernej



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

* Re: [PATCH 09/10] arm64: dts: allwinner: h5: libretech-all-h5-cc: Enable RGMII RX/TX delay on PHY
  2020-10-24 16:25 ` [PATCH 09/10] arm64: dts: allwinner: h5: libretech-all-h5-cc: Enable RGMII RX/TX delay on PHY Chen-Yu Tsai
@ 2020-10-25  9:02   ` Jernej Škrabec
  0 siblings, 0 replies; 27+ messages in thread
From: Jernej Škrabec @ 2020-10-25  9:02 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai
  Cc: linux-sunxi, Chen-Yu Tsai, devicetree, linux-arm-kernel, linux-kernel

Dne sobota, 24. oktober 2020 ob 18:25:14 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The Ethernet PHY on the Libre Computer ALL-H5-CC has the RX and TX
> delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> 
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
> 
> Fixes: 60d0426d7603 ("arm64: dts: allwinner: h5: Add Libre Computer ALL-H5-
CC H5 board")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Was this board ever in production? I can't find anything relevant about it on 
the internet.

Anyway:
Acked-by: Jernej Skrabec <jernej.skrabec@siol.net>

Best regards,
Jernej



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

* Re: [linux-sunxi] [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY
  2020-10-24 18:39       ` Icenowy Zheng
  2020-10-24 19:09         ` Clément Péron
@ 2020-10-26  7:38         ` Ard Biesheuvel
  1 sibling, 0 replies; 27+ messages in thread
From: Ard Biesheuvel @ 2020-10-26  7:38 UTC (permalink / raw)
  To: Icenowy Zheng, Jakub Kicinski, Andrew Lunn
  Cc: Jernej Škrabec, wens, Maxime Ripard,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-sunxi, Chen-Yu Tsai, Linux ARM, Linux Kernel Mailing List

On Sat, 24 Oct 2020 at 20:40, Icenowy Zheng <icenowy@aosc.io> wrote:
>
>
>
> 于 2020年10月25日 GMT+08:00 上午2:30:35, "Jernej Škrabec" <jernej.skrabec@siol.net> 写到:
> >Dne sobota, 24. oktober 2020 ob 19:51:06 CEST je Icenowy Zheng
> >napisal(a):
> >> 在 2020-10-25星期日的 00:25 +0800,Chen-Yu Tsai写道:
> >>
> >> > From: Chen-Yu Tsai <wens@csie.org>
> >> >
> >> > The Ethernet PHY on the A31 Hummingbird has the RX and TX delays
> >> > enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> >> >
> >> > Fix the phy-mode description to correct reflect this so that the
> >> > implementation doesn't reconfigure the delays incorrectly. This
> >> > happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> >> > rx/tx delay config").
> >>
> >> Personally I think they should revert this commit, and consider other
> >> solution.
> >>
> >> This commit breaks everything.
> >>
> >
> >Previously broken driver allowed inproper DT to work, so you have to
> >fix
> >everything eventually.
>
> There is no "improper DT" if it's already shipped, DT should suffer driver
> change, not changed to match driver.
>
> I think at least Fedora tends to ship a DT with a system image that will
> not get updated when kernel gets updated.
>

This same issue is under discussion in other places as well:

The following commit from v5.2

f81dadbcf7fd ("net: phy: realtek: Add rtl8211e rx/tx delays config")

added handling of the TX/RX delay controls on the PHY, but did so
incorrectly, and therefore had no effect on any of these systems.

Commit

bbc4d71d6354 ("net: phy: realtek: fix rtl8211e rx/tx delay config")

fixed TX/RX delay handling in v5.9, and now, incorrect phy-mode
settings in DT means losing Ethernet connectivity. This patch has been
backported to -stable, even though it is not clear at all that the
patch fixes any regressions, it only fixes some broken code that did
not turn out to be active in the first place.


The result of this is that affected systems in the field using v5.4 or
v5.8 stable kernels will lose their Ethernet connectivity once they
upgrade to a newer release of the same v5.x tree that they shipped
with. We may have ways to work around this more cleanly, but in the
meantime, the stable backports of bbc4d71d6354 should simply be
reverted (IMHO)

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

* Re: [PATCH 10/10] arm64: dts: allwinner: a64: bananapi-m64: Enable RGMII RX/TX delay on PHY
  2020-10-24 16:25 ` [PATCH 10/10] arm64: dts: allwinner: a64: bananapi-m64: " Chen-Yu Tsai
  2020-10-24 19:58   ` [linux-sunxi] " Corentin Labbe
@ 2020-10-26 10:24   ` Maxime Ripard
  1 sibling, 0 replies; 27+ messages in thread
From: Maxime Ripard @ 2020-10-26 10:24 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Jernej Skrabec, linux-sunxi, Chen-Yu Tsai, devicetree,
	linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 721 bytes --]

On Sun, Oct 25, 2020 at 12:25:15AM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The Ethernet PHY on the Bananapi M64 has the RX and TX delays
> enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
> 
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
> 
> Fixes: e7295499903d ("arm64: allwinner: bananapi-m64: Enable dwmac-sun8i")
> Fixes: 94f442886711 ("arm64: dts: allwinner: A64: Restore EMAC changes")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied all the patches, thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

end of thread, other threads:[~2020-10-26 10:24 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-24 16:25 [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Chen-Yu Tsai
2020-10-24 16:25 ` [PATCH 02/10] ARM: dts: sun6i: a31-hummingbird: Enable RGMII RX/TX delay on Ethernet PHY Chen-Yu Tsai
2020-10-24 17:51   ` [linux-sunxi] " Icenowy Zheng
2020-10-24 18:30     ` Jernej Škrabec
2020-10-24 18:39       ` Icenowy Zheng
2020-10-24 19:09         ` Clément Péron
2020-10-26  7:38         ` Ard Biesheuvel
2020-10-25  8:58   ` Jernej Škrabec
2020-10-24 16:25 ` [PATCH 03/10] ARM: dts: sun7i: cubietruck: " Chen-Yu Tsai
2020-10-24 17:04   ` [linux-sunxi] " Emilio López
2020-10-24 16:25 ` [PATCH 04/10] ARM: dts: sun7i: bananapi-m1-plus: " Chen-Yu Tsai
2020-10-25  8:51   ` Jernej Škrabec
2020-10-24 16:25 ` [PATCH 05/10] ARM: dts: sun8i: h3: orangepi-plus2e: " Chen-Yu Tsai
2020-10-25  7:53   ` Jernej Škrabec
2020-10-24 16:25 ` [PATCH 06/10] ARM: dts: sun8i: a83t: Enable both " Chen-Yu Tsai
2020-10-25  8:48   ` Jernej Škrabec
2020-10-24 16:25 ` [PATCH 07/10] ARM: dts: sun9i: " Chen-Yu Tsai
2020-10-25  8:40   ` Jernej Škrabec
2020-10-24 16:25 ` [PATCH 08/10] ARM: dts: sunxi: bananapi-m2-plus: Enable " Chen-Yu Tsai
2020-10-25  8:01   ` Jernej Škrabec
2020-10-24 16:25 ` [PATCH 09/10] arm64: dts: allwinner: h5: libretech-all-h5-cc: Enable RGMII RX/TX delay on PHY Chen-Yu Tsai
2020-10-25  9:02   ` Jernej Škrabec
2020-10-24 16:25 ` [PATCH 10/10] arm64: dts: allwinner: a64: bananapi-m64: " Chen-Yu Tsai
2020-10-24 19:58   ` [linux-sunxi] " Corentin Labbe
2020-10-25  8:34     ` Jernej Škrabec
2020-10-26 10:24   ` Maxime Ripard
2020-10-25  7:35 ` [PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high" Jernej Škrabec

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