Skip to contentSkip to conversation

ARM: dts: am437x: fix networking on boards with ksz9031 phy

PATCH In review Grygorii Strashko 2 participants 3 messages May 6, 2020 – May 7, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: am437x: fix networking on boards with ksz9031 phy

Since commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") the networking is broken on boards:
am437x-gp-evm
am437x-sk-evm
am437x-idk-evm

All above boards have phy-mode = "rgmii" and this is worked before, because KSZ9031 PHY started with default RGMII internal delays configuration (TX off, RX on 1.2 ns) and MAC provided TX delay. After above commit, the KSZ9031 PHY starts handling phy mode properly and disables RX delay, as result networking is become broken.

Fix it by switching to phy-mode = "rgmii-rxid" to reflect previous behavior.

Cc Oleksij Rempel <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc Philippe Schenker <[email protected]>
Fixes commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY")
---
 arch/arm/boot/dts/am437x-gp-evm.dts  | 2 +-
 arch/arm/boot/dts/am437x-idk-evm.dts | 2 +-
 arch/arm/boot/dts/am437x-sk-evm.dts  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/am437x-gp-evm.dts +1 -1
index 811c8cae315b..d692e3b2812a 100644
@@ -943,7 +943,7 @@
 
 &cpsw_emac0 {
 	phy-handle = <&ethphy0>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-rxid";
 };
 
 &elm {
arch/arm/boot/dts/am437x-idk-evm.dts +1 -1
index 9f66f96d09c9..a7495fb364bf 100644
@@ -504,7 +504,7 @@
 
 &cpsw_emac0 {
 	phy-handle = <&ethphy0>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 };
 
 &rtc {
arch/arm/boot/dts/am437x-sk-evm.dts +2 -2
index 25222497f828..4d5a7ca2e25d 100644
@@ -833,13 +833,13 @@
 
 &cpsw_emac0 {
 	phy-handle = <&ethphy0>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-rxid";
 	dual_emac_res_vlan = <1>;
 };
 
 &cpsw_emac1 {
 	phy-handle = <&ethphy1>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-rxid";
 	dual_emac_res_vlan = <2>;
 };
 
Signature · 1 line
2.17.1
#1 lore raw

Hi Grygorii,

thank you for you patches!

Quoted 44 lines · Grygorii Strashko

Since commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") the networking is broken on boards:
am437x-gp-evm
am437x-sk-evm
am437x-idk-evm

All above boards have phy-mode = "rgmii" and this is worked before, because KSZ9031 PHY started with default RGMII internal delays configuration (TX off, RX on 1.2 ns) and MAC provided TX delay. After above commit, the KSZ9031 PHY starts handling phy mode properly and disables RX delay, as result networking is become broken.

Fix it by switching to phy-mode = "rgmii-rxid" to reflect previous behavior.

Cc Oleksij Rempel <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc Philippe Schenker <[email protected]>
Fixes commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY")
---
 arch/arm/boot/dts/am437x-gp-evm.dts  | 2 +-
 arch/arm/boot/dts/am437x-idk-evm.dts | 2 +-
 arch/arm/boot/dts/am437x-sk-evm.dts  | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/am437x-gp-evm.dts +1 -1
index 811c8cae315b..d692e3b2812a 100644
@@ -943,7 +943,7 @@
 
 &cpsw_emac0 {
 	phy-handle = <&ethphy0>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-rxid";
 };
 
 &elm {
arch/arm/boot/dts/am437x-idk-evm.dts +0 -0
index 9f66f96d09c9..a7495fb364bf 100644

arch/arm/boot/dts/am437x-idk-evm.dts line 508

Quoted 6 lines
arch/arm/boot/dts/am437x-idk-evm.dts +1 -1
@@ -504,7 +504,7 @@
 
 &cpsw_emac0 {
 	phy-handle = <&ethphy0>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 };

Do you have here really rgmii-id?

Quoted 23 lines
arch/arm/boot/dts/am437x-idk-evm.dts +0 -0
 &rtc {
arch/arm/boot/dts/am437x-sk-evm.dts +2 -2
index 25222497f828..4d5a7ca2e25d 100644
@@ -833,13 +833,13 @@
 
 &cpsw_emac0 {
 	phy-handle = <&ethphy0>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-rxid";
 	dual_emac_res_vlan = <1>;
 };
 
 &cpsw_emac1 {
 	phy-handle = <&ethphy1>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-rxid";
 	dual_emac_res_vlan = <2>;
 };
 
Signature · 1 line
2.17.1

Regards,
Oleksij

Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
#2 lore raw
Quoted 50 lines · Oleksij Rempel

Hi Grygorii,

thank you for you patches!

Quoted 45 lines · Grygorii Strashko

Since commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY") the networking is broken on boards:
am437x-gp-evm
am437x-sk-evm
am437x-idk-evm

All above boards have phy-mode = "rgmii" and this is worked before, because KSZ9031 PHY started with default RGMII internal delays configuration (TX off, RX on 1.2 ns) and MAC provided TX delay. After above commit, the KSZ9031 PHY starts handling phy mode properly and disables RX delay, as result networking is become broken.

Fix it by switching to phy-mode = "rgmii-rxid" to reflect previous behavior.

Cc Oleksij Rempel <[email protected]>
Cc Andrew Lunn <[email protected]>
Cc Philippe Schenker <[email protected]>
Fixes commit bcf3440c6dd7 ("net: phy: micrel: add phy-mode support for the KSZ9031 PHY")
---
  arch/arm/boot/dts/am437x-gp-evm.dts  | 2 +-
  arch/arm/boot/dts/am437x-idk-evm.dts | 2 +-
  arch/arm/boot/dts/am437x-sk-evm.dts  | 4 ++--
  3 files changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/am437x-gp-evm.dts +1 -1
index 811c8cae315b..d692e3b2812a 100644
@@ -943,7 +943,7 @@
 
  &cpsw_emac0 {
  	phy-handle = <&ethphy0>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-rxid";
  };
 
  &elm {
arch/arm/boot/dts/am437x-idk-evm.dts +0 -0
index 9f66f96d09c9..a7495fb364bf 100644
@@ -504,7 +504,7 @@
 
Quoted 8 lines

arch/arm/boot/dts/am437x-idk-evm.dts line 508

Quoted 5 lines
arch/arm/boot/dts/am437x-idk-evm.dts +1 -1
  &cpsw_emac0 {
  	phy-handle = <&ethphy0>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
  };

Do you have here really rgmii-id?

Right, thanks you.

Signature · 2 lines
Best regards,
grygorii