ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys
Subsystems (3)
PATCH v2 1/1 ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys
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.
---
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(+)
arch/arm/boot/dts/sun4i-a10-a1000.dts +1 -0
@@ -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>; };
arch/arm/boot/dts/sun4i-a10-hackberry.dts +1 -0
@@ -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>; };
arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts +1 -0
@@ -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 */ };
arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts +1 -0
@@ -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>; };
Signature · 1 line
2.7.4
PATCH v2 1/1 ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys
Hi,
Quoted 7 lines · Hans de Goede
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.
Quoted 67 lines
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 at vger.kernel.orgSigned-off-by Hans de Goede <[email protected]>---
Changes in v2:(quoted diff) +0
-2-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(+)arch/arm/boot/dts/sun4i-a10-a1000.dts +1
-0@@ -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>; };arch/arm/boot/dts/sun4i-a10-hackberry.dts +1
-0@@ -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>; };arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts +1
-0@@ -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 */ };arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts +1
-1@@ -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
PATCH v2 1/1 ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys
Hi,
Quoted 11 lines · Chen-Yu Tsai
Hi,
Quoted 7 lines · Hans de Goede
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.
Quoted 8 lines
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.
Some of them are using the icplus IP101A phy. As said 10 ms works in my testing and I've bumped it to 20 to add some safety margin.
Regards,
Hans
Quoted 68 lines
Quoted 68 lines
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 at vger.kernel.orgSigned-off-by Hans de Goede <[email protected]>---
Changes in v2:(quoted diff) +0
-2-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(+)arch/arm/boot/dts/sun4i-a10-a1000.dts +1
-0@@ -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>; };arch/arm/boot/dts/sun4i-a10-hackberry.dts +1
-0@@ -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>; };arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts +1
-0@@ -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 */ };arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts +1
-1@@ -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
Maxime Ripard
AppliedPATCH v2 1/1 ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys
In reply to Hans de GoedeQuoted 8 lines · Hans de Goede
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.
Quoted 6 lines
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 at vger.kernel.orgSigned-off-by Hans de Goede <[email protected]>
Applied, thanks!
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160607/4054156d/attachment.sig>