Skip to contentSkip to conversation

apalis_imx6: increase phy autoneg timeout

PATCH Superseded Igor Opaniuk 3 participants 3 messages Jun 21, 2019 – Jun 25, 2019 Arm i.MX and Layerscape

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 apalis_imx6: increase phy autoneg timeout

From: Igor Opaniuk <[email protected]>

Default value (4000ms) of PHY_ANEG_TIMEOUT for Micrel KSZ9031 contoller isn't sufficient to finish auto-negotiation, which sometimes leads to timeout errors:

Apalis iMX6 # dhcp
FEC Waiting for PHY auto negotiation to complete......... TIMEOUT !

Increase the auto-negotiation time-out to 8000ms.

---
 include/configs/apalis_imx6.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/apalis_imx6.h +1 -0
index 4b0a3fb26b..246d618442 100644
@@ -58,6 +58,7 @@
 #define IMX_FEC_BASE			ENET_BASE_ADDR
 #define CONFIG_FEC_XCV_TYPE		RGMII
 #define CONFIG_ETHPRIME			"FEC"
+#define PHY_ANEG_TIMEOUT		8000 /* PHY needs longer aneg time */
 #define CONFIG_FEC_MXC_PHYADDR		6
 #define CONFIG_TFTP_TSIZE
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 apalis_imx6: increase phy autoneg timeout

Quoted 10 lines · Igor Opaniuk

From: Igor Opaniuk <[email protected]>

Default value (4000ms) of PHY_ANEG_TIMEOUT for Micrel KSZ9031 contoller isn't sufficient to finish auto-negotiation, which sometimes leads to timeout errors:

Apalis iMX6 # dhcp
FEC Waiting for PHY auto negotiation to complete......... TIMEOUT !

Increase the auto-negotiation time-out to 8000ms.

Hi Igor, I did a lot of auto-negotiation tests with this PHY. It can happen, that it has up to 12s for a connection with some partners. So I'd suggest to put that timeout up to 15s to cover most situations.

Philippe

Quoted 18 lines
---
 include/configs/apalis_imx6.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/apalis_imx6.h +1 -0
index 4b0a3fb26b..246d618442 100644
@@ -58,6 +58,7 @@
 #define IMX_FEC_BASE			ENET_BASE_ADDR
 #define CONFIG_FEC_XCV_TYPE		RGMII
 #define CONFIG_ETHPRIME			"FEC"
+#define PHY_ANEG_TIMEOUT		8000 /* PHY needs longer aneg time */
 #define CONFIG_FEC_MXC_PHYADDR		6
 #define CONFIG_TFTP_TSIZE
 
#2 lore raw

PATCH 1/1 apalis_imx6: increase phy autoneg timeout

In reply to Igor Opaniuk
Quoted 12 lines

From: U-Boot <[email protected]> on behalf of Igor Opaniuk <[email protected]>
Sent: Friday, June 21, 2019 14:00
To: u-boot at lists.denx.de
Cc: Marcel Ziswiler; Max Krummenacher
Subject: [U-Boot] [PATCH 1/1] apalis_imx6: increase phy autoneg timeout

From: Igor Opaniuk <[email protected]>

Default value (4000ms) of PHY_ANEG_TIMEOUT for Micrel KSZ9031 contoller isn't sufficient to finish auto-negotiation, which sometimes leads to timeout errors:

Quoted 6 lines

Apalis iMX6 # dhcp
FEC Waiting for PHY auto negotiation to complete......... TIMEOUT !

Increase the auto-negotiation time-out to 8000ms.

Quoted 15 lines
---
 include/configs/apalis_imx6.h | 1 +
 1 file changed, 1 insertion(+)
include/configs/apalis_imx6.h +1 -0
index 4b0a3fb26b..246d618442 100644
 @@ -58,6 +58,7 @@
 #define IMX_FEC_BASE                   ENET_BASE_ADDR
 #define CONFIG_FEC_XCV_TYPE            RGMII
 #define CONFIG_ETHPRIME                        "FEC"
+#define PHY_ANEG_TIMEOUT               8000 /* PHY needs longer aneg time */

#define CONFIG_FEC_MXC_PHYADDR 6
#define CONFIG_TFTP_TSIZE