* [PATCH v2] ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys
@ 2016-06-04 10:58 Hans de Goede
2016-06-06 9:32 ` Chen-Yu Tsai
2016-06-07 21:26 ` Maxime Ripard
0 siblings, 2 replies; 4+ messages in thread
From: Hans de Goede @ 2016-06-04 10:58 UTC (permalink / raw)
To: Chen-Yu Tsai, Maxime Ripard
Cc: linux-arm-kernel, devicetree, Hans de Goede, stable
It seems that recent kernels have a shorter timeout when scanning for
ethernet phys causing us to hit a timeout on boards where the phy's
regulator gets enabled just before scanning, which leads to non working
ethernet.
A 10ms startup delay seems to be enough to fix it, this commit adds a
20ms startup delay just to be safe.
This has been tested on a sun4i-a10-a1000 and sun5i-a10s-wobo-i5 board,
both of which have non-working ethernet on recent kernels without this
fix.
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Changes in v2:
-Add Cc stable
---
arch/arm/boot/dts/sun4i-a10-a1000.dts | 1 +
arch/arm/boot/dts/sun4i-a10-hackberry.dts | 1 +
arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts | 1 +
arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts | 1 +
4 files changed, 4 insertions(+)
diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts
index c92a1ae..fa70b8f 100644
--- a/arch/arm/boot/dts/sun4i-a10-a1000.dts
+++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts
@@ -84,6 +84,7 @@
regulator-name = "emac-3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
+ startup-delay-us = <20000>;
enable-active-high;
gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>;
};
diff --git a/arch/arm/boot/dts/sun4i-a10-hackberry.dts b/arch/arm/boot/dts/sun4i-a10-hackberry.dts
index 2b17c51..6de83a6 100644
--- a/arch/arm/boot/dts/sun4i-a10-hackberry.dts
+++ b/arch/arm/boot/dts/sun4i-a10-hackberry.dts
@@ -66,6 +66,7 @@
regulator-name = "emac-3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
+ startup-delay-us = <20000>;
enable-active-high;
gpio = <&pio 7 19 GPIO_ACTIVE_HIGH>;
};
diff --git a/arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts b/arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts
index 7afc7a6..e28f080 100644
--- a/arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts
+++ b/arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts
@@ -80,6 +80,7 @@
regulator-name = "emac-3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
+ startup-delay-us = <20000>;
enable-active-high;
gpio = <&pio 7 19 GPIO_ACTIVE_HIGH>; /* PH19 */
};
diff --git a/arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts b/arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts
index 52d18ca..b5de75f 100644
--- a/arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts
+++ b/arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts
@@ -79,6 +79,7 @@
regulator-name = "emac-3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
+ startup-delay-us = <20000>;
enable-active-high;
gpio = <&pio 0 2 GPIO_ACTIVE_HIGH>;
};
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys
2016-06-04 10:58 [PATCH v2] ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys Hans de Goede
@ 2016-06-06 9:32 ` Chen-Yu Tsai
[not found] ` <CAGb2v67a4GaaN6-c=m-d5JSsDaP8og_R57SqrLrGKbKiW2Czew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-07 21:26 ` Maxime Ripard
1 sibling, 1 reply; 4+ messages in thread
From: Chen-Yu Tsai @ 2016-06-06 9:32 UTC (permalink / raw)
To: Hans de Goede
Cc: Chen-Yu Tsai, Maxime Ripard, linux-arm-kernel, devicetree, stable
Hi,
On Sat, Jun 4, 2016 at 6:58 PM, Hans de Goede <hdegoede@redhat.com> wrote:
> It seems that recent kernels have a shorter timeout when scanning for
> ethernet phys causing us to hit a timeout on boards where the phy's
> regulator gets enabled just before scanning, which leads to non working
> ethernet.
>
> A 10ms startup delay seems to be enough to fix it, this commit adds a
> 20ms startup delay just to be safe.
I couldn't find any power sequencing information on the RTL8201CP,
which is what I assume these boards are using.
The RTL8211E does mention after power ramp up, there's a 20ms
delay before the core is ready.
If 20ms works for you, I've nothing against it though. Just putting the
information out there.
> This has been tested on a sun4i-a10-a1000 and sun5i-a10s-wobo-i5 board,
> both of which have non-working ethernet on recent kernels without this
> fix.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> Changes in v2:
> -Add Cc stable
> ---
> arch/arm/boot/dts/sun4i-a10-a1000.dts | 1 +
> arch/arm/boot/dts/sun4i-a10-hackberry.dts | 1 +
> arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts | 1 +
> arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts | 1 +
> 4 files changed, 4 insertions(+)
>
> diff --git a/arch/arm/boot/dts/sun4i-a10-a1000.dts b/arch/arm/boot/dts/sun4i-a10-a1000.dts
> index c92a1ae..fa70b8f 100644
> --- a/arch/arm/boot/dts/sun4i-a10-a1000.dts
> +++ b/arch/arm/boot/dts/sun4i-a10-a1000.dts
> @@ -84,6 +84,7 @@
> regulator-name = "emac-3v3";
> regulator-min-microvolt = <3300000>;
> regulator-max-microvolt = <3300000>;
> + startup-delay-us = <20000>;
> enable-active-high;
> gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>;
> };
> diff --git a/arch/arm/boot/dts/sun4i-a10-hackberry.dts b/arch/arm/boot/dts/sun4i-a10-hackberry.dts
> index 2b17c51..6de83a6 100644
> --- a/arch/arm/boot/dts/sun4i-a10-hackberry.dts
> +++ b/arch/arm/boot/dts/sun4i-a10-hackberry.dts
> @@ -66,6 +66,7 @@
> regulator-name = "emac-3v3";
> regulator-min-microvolt = <3300000>;
> regulator-max-microvolt = <3300000>;
> + startup-delay-us = <20000>;
> enable-active-high;
> gpio = <&pio 7 19 GPIO_ACTIVE_HIGH>;
> };
> diff --git a/arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts b/arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts
> index 7afc7a6..e28f080 100644
> --- a/arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts
> +++ b/arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts
> @@ -80,6 +80,7 @@
> regulator-name = "emac-3v3";
> regulator-min-microvolt = <3300000>;
> regulator-max-microvolt = <3300000>;
> + startup-delay-us = <20000>;
> enable-active-high;
> gpio = <&pio 7 19 GPIO_ACTIVE_HIGH>; /* PH19 */
> };
> diff --git a/arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts b/arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts
> index 52d18ca..b5de75f 100644
> --- a/arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts
> +++ b/arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts
> @@ -79,6 +79,7 @@
> regulator-name = "emac-3v3";
> regulator-min-microvolt = <3300000>;
> regulator-max-microvolt = <3300000>;
> + startup-delay-us = <20000>;
> enable-active-high;
> gpio = <&pio 0 2 GPIO_ACTIVE_HIGH>;
> };
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys
2016-06-04 10:58 [PATCH v2] ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys Hans de Goede
2016-06-06 9:32 ` Chen-Yu Tsai
@ 2016-06-07 21:26 ` Maxime Ripard
1 sibling, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2016-06-07 21:26 UTC (permalink / raw)
To: Hans de Goede; +Cc: Chen-Yu Tsai, linux-arm-kernel, devicetree, stable
[-- Attachment #1: Type: text/plain, Size: 804 bytes --]
On Sat, Jun 04, 2016 at 12:58:39PM +0200, Hans de Goede wrote:
> It seems that recent kernels have a shorter timeout when scanning for
> ethernet phys causing us to hit a timeout on boards where the phy's
> regulator gets enabled just before scanning, which leads to non working
> ethernet.
>
> A 10ms startup delay seems to be enough to fix it, this commit adds a
> 20ms startup delay just to be safe.
>
> This has been tested on a sun4i-a10-a1000 and sun5i-a10s-wobo-i5 board,
> both of which have non-working ethernet on recent kernels without this
> fix.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Applied, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-07 21:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-04 10:58 [PATCH v2] ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys Hans de Goede
2016-06-06 9:32 ` Chen-Yu Tsai
[not found] ` <CAGb2v67a4GaaN6-c=m-d5JSsDaP8og_R57SqrLrGKbKiW2Czew-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-06-06 9:45 ` Hans de Goede
2016-06-07 21:26 ` 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).