linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: imx8mq-phanbell: Fix Ethernet PHY post-reset duration
@ 2020-03-06 10:42 Alifer Moraes
  2020-03-13 16:32 ` Fabio Estevam
  0 siblings, 1 reply; 3+ messages in thread
From: Alifer Moraes @ 2020-03-06 10:42 UTC (permalink / raw)
  To: robh+dt
  Cc: shawnguo, s.hauer, festevam, marco.franchi, devicetree,
	linux-kernel, Alifer Moraes

i.MX8MQ Phanbell board uses Realtek RTL8211FD as Ethernet PHY.
Its datasheet states that the proper post reset duration should be at least 50 ms.

Fixes: f34d4bfab354 ("arm64: dts: imx8mq-phanbell: Add support for ethernet")
Signed-off-by: Alifer Moraes <alifer.wsdm@gmail.com>
---
 arch/arm64/boot/dts/freescale/imx8mq-phanbell.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/imx8mq-phanbell.dts b/arch/arm64/boot/dts/freescale/imx8mq-phanbell.dts
index 16ed13c44a47..06e248b95ada 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-phanbell.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mq-phanbell.dts
@@ -207,7 +207,7 @@
 	phy-mode = "rgmii-id";
 	phy-reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
 	phy-reset-duration = <10>;
-	phy-reset-post-delay = <30>;
+	phy-reset-post-delay = <50>;
 	phy-handle = <&ethphy0>;
 	fsl,magic-packet;
 	status = "okay";
-- 
2.17.1


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

* Re: [PATCH] arm64: dts: imx8mq-phanbell: Fix Ethernet PHY post-reset duration
  2020-03-06 10:42 [PATCH] arm64: dts: imx8mq-phanbell: Fix Ethernet PHY post-reset duration Alifer Moraes
@ 2020-03-13 16:32 ` Fabio Estevam
  2020-03-13 16:49   ` Fabio Estevam
  0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2020-03-13 16:32 UTC (permalink / raw)
  To: Alifer Moraes
  Cc: Rob Herring, Shawn Guo, Sascha Hauer, Marco Franchi,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel

Hi Alifer,

On Fri, Mar 6, 2020 at 7:41 AM Alifer Moraes <alifer.wsdm@gmail.com> wrote:
>
> i.MX8MQ Phanbell board uses Realtek RTL8211FD as Ethernet PHY.
> Its datasheet states that the proper post reset duration should be at least 50 ms.

The datasheet I found in the web states:

"The RTL8211F(I)/RTL8211FD(I) has a PHYRSTB pin to reset the chip. For
a complete PHY reset, this pin must be asserted low for at least 10ms
(Tgap in Figure 9) for the internal regulator. Wait for a further 30ms
(for internal circuits settling time) before accessing the PHY
register"

Where does the 50ms requirement come from? Do you have an updated
datasheet that says 50ms instead?

Please clarify.

Thanks

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

* Re: [PATCH] arm64: dts: imx8mq-phanbell: Fix Ethernet PHY post-reset duration
  2020-03-13 16:32 ` Fabio Estevam
@ 2020-03-13 16:49   ` Fabio Estevam
  0 siblings, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2020-03-13 16:49 UTC (permalink / raw)
  To: Alifer Moraes
  Cc: Rob Herring, Shawn Guo, Sascha Hauer, Marco Franchi,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-kernel

On Fri, Mar 13, 2020 at 1:32 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi Alifer,
>
> On Fri, Mar 6, 2020 at 7:41 AM Alifer Moraes <alifer.wsdm@gmail.com> wrote:
> >
> > i.MX8MQ Phanbell board uses Realtek RTL8211FD as Ethernet PHY.
> > Its datasheet states that the proper post reset duration should be at least 50 ms.
>
> The datasheet I found in the web states:
>
> "The RTL8211F(I)/RTL8211FD(I) has a PHYRSTB pin to reset the chip. For
> a complete PHY reset, this pin must be asserted low for at least 10ms
> (Tgap in Figure 9) for the internal regulator. Wait for a further 30ms
> (for internal circuits settling time) before accessing the PHY
> register"
>
> Where does the 50ms requirement come from? Do you have an updated
> datasheet that says 50ms instead?

Just found this one:
https://datasheet.lcsc.com/szlcsc/1909021205_Realtek-Semicon-RTL8211F-CG_C187932.pdf

Which says "Wait for at least 50ms* (for internal circuits settling
time) before accessing the PHY register.", so your patch is correct,
thanks.

This also fixes Ethernet in U-Boot, so:

Reviewed-by: Fabio Estevam <festevam@gmail.com>

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

end of thread, other threads:[~2020-03-13 16:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-06 10:42 [PATCH] arm64: dts: imx8mq-phanbell: Fix Ethernet PHY post-reset duration Alifer Moraes
2020-03-13 16:32 ` Fabio Estevam
2020-03-13 16:49   ` Fabio Estevam

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