linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] ARM: dts: imx6qdl-sr-som: Increase the PHY reset duration to 10ms
@ 2021-06-25 12:13 Maxime Chevallier
  2021-06-25 12:29 ` Russell King (Oracle)
  2021-07-14  8:26 ` Shawn Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Maxime Chevallier @ 2021-06-25 12:13 UTC (permalink / raw)
  To: Russell King, Shawn Guo, Rob Herring, Andrew Lunn,
	thomas.petazzoni, herve.codina, devicetree
  Cc: Maxime Chevallier, linux-arm-kernel, linux-kernel

The AR803x PHY used on this modules seems to require the reset line to
be asserted for around 10ms in order to avoid rare cases where the PHY
gets stuck in an incoherent state that prevents it to function
correctly.

The previous value of 2ms was found to be problematic on some setups,
causing intermittent issues where the PHY would be unresponsive
every once in a while on some sytems, with a low occurrence (it typically
took around 30 consecutive reboots to encounter the issue).

Bumping the delay to the 10ms makes the issue dissapear, with more than
2500 consecutive reboots performed without the issue showing-up.

Fixes: 208d7baf8085 ("ARM: imx: initial SolidRun HummingBoard support")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Tested-by: Hervé Codina <herve.codina@bootlin.com>
---
This V2 was quickly resent, since the commit-log was incorrect.

v2 : Reworded the commit-log to remove an incorrect mention of the
datasheet. Add a comment to the DT to explicitly explain the issue.

 arch/arm/boot/dts/imx6qdl-sr-som.dtsi | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
index 0ad8ccde0cf8..f86efd0ccc40 100644
--- a/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sr-som.dtsi
@@ -54,7 +54,13 @@ &fec {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
 	phy-mode = "rgmii-id";
-	phy-reset-duration = <2>;
+
+	/*
+	 * The PHY seems to require a long-enough reset duration to avoid
+	 * some rare issues where the PHY gets stuck in an inconsistent and
+	 * non-functional state at boot-up. 10ms proved to be fine .
+	 */
+	phy-reset-duration = <10>;
 	phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
 	status = "okay";
 
-- 
2.25.4


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

* Re: [PATCH v2] ARM: dts: imx6qdl-sr-som: Increase the PHY reset duration to 10ms
  2021-06-25 12:13 [PATCH v2] ARM: dts: imx6qdl-sr-som: Increase the PHY reset duration to 10ms Maxime Chevallier
@ 2021-06-25 12:29 ` Russell King (Oracle)
  2021-07-14  8:26 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Russell King (Oracle) @ 2021-06-25 12:29 UTC (permalink / raw)
  To: Maxime Chevallier
  Cc: Shawn Guo, Rob Herring, Andrew Lunn, thomas.petazzoni,
	herve.codina, devicetree, linux-arm-kernel, linux-kernel

On Fri, Jun 25, 2021 at 02:13:53PM +0200, Maxime Chevallier wrote:
> The AR803x PHY used on this modules seems to require the reset line to
> be asserted for around 10ms in order to avoid rare cases where the PHY
> gets stuck in an incoherent state that prevents it to function
> correctly.
> 
> The previous value of 2ms was found to be problematic on some setups,
> causing intermittent issues where the PHY would be unresponsive
> every once in a while on some sytems, with a low occurrence (it typically
> took around 30 consecutive reboots to encounter the issue).
> 
> Bumping the delay to the 10ms makes the issue dissapear, with more than
> 2500 consecutive reboots performed without the issue showing-up.
> 
> Fixes: 208d7baf8085 ("ARM: imx: initial SolidRun HummingBoard support")
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> Tested-by: Hervé Codina <herve.codina@bootlin.com>

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks!

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

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

* Re: [PATCH v2] ARM: dts: imx6qdl-sr-som: Increase the PHY reset duration to 10ms
  2021-06-25 12:13 [PATCH v2] ARM: dts: imx6qdl-sr-som: Increase the PHY reset duration to 10ms Maxime Chevallier
  2021-06-25 12:29 ` Russell King (Oracle)
@ 2021-07-14  8:26 ` Shawn Guo
  1 sibling, 0 replies; 3+ messages in thread
From: Shawn Guo @ 2021-07-14  8:26 UTC (permalink / raw)
  To: Maxime Chevallier
  Cc: Russell King, Rob Herring, Andrew Lunn, thomas.petazzoni,
	herve.codina, devicetree, linux-arm-kernel, linux-kernel

On Fri, Jun 25, 2021 at 02:13:53PM +0200, Maxime Chevallier wrote:
> The AR803x PHY used on this modules seems to require the reset line to
> be asserted for around 10ms in order to avoid rare cases where the PHY
> gets stuck in an incoherent state that prevents it to function
> correctly.
> 
> The previous value of 2ms was found to be problematic on some setups,
> causing intermittent issues where the PHY would be unresponsive
> every once in a while on some sytems, with a low occurrence (it typically
> took around 30 consecutive reboots to encounter the issue).
> 
> Bumping the delay to the 10ms makes the issue dissapear, with more than
> 2500 consecutive reboots performed without the issue showing-up.
> 
> Fixes: 208d7baf8085 ("ARM: imx: initial SolidRun HummingBoard support")
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> Tested-by: Hervé Codina <herve.codina@bootlin.com>

Applied, thanks.

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

end of thread, other threads:[~2021-07-14  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25 12:13 [PATCH v2] ARM: dts: imx6qdl-sr-som: Increase the PHY reset duration to 10ms Maxime Chevallier
2021-06-25 12:29 ` Russell King (Oracle)
2021-07-14  8:26 ` Shawn Guo

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