linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: am335x-bone-common: Increase MDIO reset deassert delay to 50ms
@ 2024-10-31  9:29 Geert Uytterhoeven
  2024-10-31 10:44 ` Roger Quadros
  2024-11-01 14:36 ` Kevin Hilman
  0 siblings, 2 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2024-10-31  9:29 UTC (permalink / raw)
  To: Tony Lindgren, Kevin Hilman, Roger Quadros, Robert Nelson,
	Colin Foster
  Cc: linux-omap, linux-arm-kernel, Geert Uytterhoeven

Commit b9bf5612610aa7e3 ("ARM: dts: am335x-bone-common: Increase MDIO
reset deassert time") already increased the MDIO reset deassert delay
from 6.5 to 13 ms, but this may still cause Ethernet PHY probe failures:

    SMSC LAN8710/LAN8720 4a101000.mdio:00: probe with driver SMSC LAN8710/LAN8720 failed with error -5

On BeagleBone Black Rev. C3, ETH_RESETn is controlled by an open-drain
AND gate.  It is pulled high by a 10K resistor, and has a 4.7µF
capacitor to ground, giving an RC time constant of 47ms.  As it takes
0.7RC to charge the capacitor above the threshold voltage of a CMOS
input (VDD/2), the delay should be at least 33ms.  Considering the
typical tolerance of 20% on capacitors, 40ms would be safer.  Add an
additional safety margin and settle for 50ms.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi b/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi
index a0fb431aec8411d8..212d7f867f8786af 100644
--- a/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi
@@ -409,7 +409,7 @@ ethphy0: ethernet-phy@0 {
 		/* Support GPIO reset on revision C3 boards */
 		reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
 		reset-assert-us = <300>;
-		reset-deassert-us = <13000>;
+		reset-deassert-us = <50000>;
 	};
 };
 
-- 
2.34.1



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

* Re: [PATCH] ARM: dts: am335x-bone-common: Increase MDIO reset deassert delay to 50ms
  2024-10-31  9:29 [PATCH] ARM: dts: am335x-bone-common: Increase MDIO reset deassert delay to 50ms Geert Uytterhoeven
@ 2024-10-31 10:44 ` Roger Quadros
  2024-11-01 14:35   ` Kevin Hilman
  2024-11-01 14:36 ` Kevin Hilman
  1 sibling, 1 reply; 4+ messages in thread
From: Roger Quadros @ 2024-10-31 10:44 UTC (permalink / raw)
  To: Geert Uytterhoeven, Tony Lindgren, Kevin Hilman, Robert Nelson,
	Colin Foster
  Cc: linux-omap, linux-arm-kernel



On 31/10/2024 11:29, Geert Uytterhoeven wrote:
> Commit b9bf5612610aa7e3 ("ARM: dts: am335x-bone-common: Increase MDIO
> reset deassert time") already increased the MDIO reset deassert delay
> from 6.5 to 13 ms, but this may still cause Ethernet PHY probe failures:
> 
>     SMSC LAN8710/LAN8720 4a101000.mdio:00: probe with driver SMSC LAN8710/LAN8720 failed with error -5
> 
> On BeagleBone Black Rev. C3, ETH_RESETn is controlled by an open-drain
> AND gate.  It is pulled high by a 10K resistor, and has a 4.7µF
> capacitor to ground, giving an RC time constant of 47ms.  As it takes
> 0.7RC to charge the capacitor above the threshold voltage of a CMOS
> input (VDD/2), the delay should be at least 33ms.  Considering the
> typical tolerance of 20% on capacitors, 40ms would be safer.  Add an
> additional safety margin and settle for 50ms.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Roger Quadros <rogerq@kernel.org>


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

* Re: [PATCH] ARM: dts: am335x-bone-common: Increase MDIO reset deassert delay to 50ms
  2024-10-31 10:44 ` Roger Quadros
@ 2024-11-01 14:35   ` Kevin Hilman
  0 siblings, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2024-11-01 14:35 UTC (permalink / raw)
  To: Roger Quadros, Geert Uytterhoeven, Tony Lindgren, Robert Nelson,
	Colin Foster
  Cc: linux-omap, linux-arm-kernel

Roger Quadros <rogerq@kernel.org> writes:

> On 31/10/2024 11:29, Geert Uytterhoeven wrote:
>> Commit b9bf5612610aa7e3 ("ARM: dts: am335x-bone-common: Increase MDIO
>> reset deassert time") already increased the MDIO reset deassert delay
>> from 6.5 to 13 ms, but this may still cause Ethernet PHY probe failures:
>> 
>>     SMSC LAN8710/LAN8720 4a101000.mdio:00: probe with driver SMSC LAN8710/LAN8720 failed with error -5
>> 
>> On BeagleBone Black Rev. C3, ETH_RESETn is controlled by an open-drain
>> AND gate.  It is pulled high by a 10K resistor, and has a 4.7µF
>> capacitor to ground, giving an RC time constant of 47ms.  As it takes
>> 0.7RC to charge the capacitor above the threshold voltage of a CMOS
>> input (VDD/2), the delay should be at least 33ms.  Considering the
>> typical tolerance of 20% on capacitors, 40ms would be safer.  Add an
>> additional safety margin and settle for 50ms.
>> 
>> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Reviewed-by: Roger Quadros <rogerq@kernel.org>

Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>


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

* Re: [PATCH] ARM: dts: am335x-bone-common: Increase MDIO reset deassert delay to 50ms
  2024-10-31  9:29 [PATCH] ARM: dts: am335x-bone-common: Increase MDIO reset deassert delay to 50ms Geert Uytterhoeven
  2024-10-31 10:44 ` Roger Quadros
@ 2024-11-01 14:36 ` Kevin Hilman
  1 sibling, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2024-11-01 14:36 UTC (permalink / raw)
  To: Tony Lindgren, Roger Quadros, Robert Nelson, Colin Foster,
	Geert Uytterhoeven
  Cc: linux-omap, linux-arm-kernel


On Thu, 31 Oct 2024 10:29:51 +0100, Geert Uytterhoeven wrote:
> Commit b9bf5612610aa7e3 ("ARM: dts: am335x-bone-common: Increase MDIO
> reset deassert time") already increased the MDIO reset deassert delay
> from 6.5 to 13 ms, but this may still cause Ethernet PHY probe failures:
> 
>     SMSC LAN8710/LAN8720 4a101000.mdio:00: probe with driver SMSC LAN8710/LAN8720 failed with error -5
> 
> On BeagleBone Black Rev. C3, ETH_RESETn is controlled by an open-drain
> AND gate.  It is pulled high by a 10K resistor, and has a 4.7µF
> capacitor to ground, giving an RC time constant of 47ms.  As it takes
> 0.7RC to charge the capacitor above the threshold voltage of a CMOS
> input (VDD/2), the delay should be at least 33ms.  Considering the
> typical tolerance of 20% on capacitors, 40ms would be safer.  Add an
> additional safety margin and settle for 50ms.
> 
> [...]

Applied, thanks!

[1/1] ARM: dts: am335x-bone-common: Increase MDIO reset deassert delay to 50ms
      commit: a74a1ada3651c0ff8a05d0ecb74d84de3930e63a

Best regards,
-- 
Kevin Hilman <khilman@baylibre.com>



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

end of thread, other threads:[~2024-11-01 14:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31  9:29 [PATCH] ARM: dts: am335x-bone-common: Increase MDIO reset deassert delay to 50ms Geert Uytterhoeven
2024-10-31 10:44 ` Roger Quadros
2024-11-01 14:35   ` Kevin Hilman
2024-11-01 14:36 ` Kevin Hilman

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