linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: allwinner: a64: sopine-baseboard: Add PHY regulator delay
@ 2019-09-29  8:52 Jernej Skrabec
  2019-09-30 14:21 ` Maxime Ripard
  0 siblings, 1 reply; 2+ messages in thread
From: Jernej Skrabec @ 2019-09-29  8:52 UTC (permalink / raw)
  To: mripard, wens
  Cc: mark.rutland, devicetree, linux-kernel, linux-sunxi, robh+dt,
	linux-arm-kernel

It turns out that sopine-baseboard needs same fix as pine64-plus
for ethernet PHY. Here too Realtek ethernet PHY chip needs additional
power on delay to properly initialize. Datasheet mentions that chip
needs 30 ms to be properly powered on and that it needs some more time
to be initialized.

Fix that by adding 100ms ramp delay to regulator responsible for
powering PHY.

Note that issue was found out and fix tested on pine64-lts, but it's
basically the same as sopine-baseboard, only layout and connectors
differ.

Fixes: bdfe4cebea11 ("arm64: allwinner: a64: add Ethernet PHY regulator for several boards")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
---
 .../boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts      | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
index e6fb9683f213..25099202c52c 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
@@ -159,6 +159,12 @@
 };
 
 &reg_dc1sw {
+	/*
+	 * Ethernet PHY needs 30ms to properly power up and some more
+	 * to initialize. 100ms should be plenty of time to finish
+	 * whole process.
+	 */
+	regulator-enable-ramp-delay = <100000>;
 	regulator-name = "vcc-phy";
 };
 
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] arm64: dts: allwinner: a64: sopine-baseboard: Add PHY regulator delay
  2019-09-29  8:52 [PATCH] arm64: dts: allwinner: a64: sopine-baseboard: Add PHY regulator delay Jernej Skrabec
@ 2019-09-30 14:21 ` Maxime Ripard
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Ripard @ 2019-09-30 14:21 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: mark.rutland, devicetree, linux-sunxi, linux-kernel, wens,
	robh+dt, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 801 bytes --]

On Sun, Sep 29, 2019 at 10:52:59AM +0200, Jernej Skrabec wrote:
> It turns out that sopine-baseboard needs same fix as pine64-plus
> for ethernet PHY. Here too Realtek ethernet PHY chip needs additional
> power on delay to properly initialize. Datasheet mentions that chip
> needs 30 ms to be properly powered on and that it needs some more time
> to be initialized.
>
> Fix that by adding 100ms ramp delay to regulator responsible for
> powering PHY.
>
> Note that issue was found out and fix tested on pine64-lts, but it's
> basically the same as sopine-baseboard, only layout and connectors
> differ.
>
> Fixes: bdfe4cebea11 ("arm64: allwinner: a64: add Ethernet PHY regulator for several boards")
> Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>

Applied as a fix for 5.4, thanks!
Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-09-30 14:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-29  8:52 [PATCH] arm64: dts: allwinner: a64: sopine-baseboard: Add PHY regulator delay Jernej Skrabec
2019-09-30 14:21 ` Maxime Ripard

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