Hi all,
This patch series adds optional PHY reset support during EthernetAVB driver
probe and system resume on the Renesas Salvator-X/XS development boards.
The rationale behind this is twofold:
1. On Salvator-XS, the enable pin of the regulator providing PHY power
is connected to PRESETn, and PSCI powers down the SoC during system
suspend. Hence a PHY reset is needed to restore network functionality
after resume.
2. Linux should not rely on the boot loader having reset the PHY, but
should reset the PHY during driver probe.
The first two patches are destined for David's net-next tree. They update
the EthernetAVB DT bindings, and add support for resetting the PHY during
system resume.
The last two patches are destined for Simon's renesas tree. They add
properties to describe the EthernetAVB PHY reset topology to the common
Salvator-X/XS and ULCB DTS files.
Thanks!
Geert Uytterhoeven (4):
dt-bindings: net: ravb: Document optional reset-gpios property
ravb: Add optional PHY reset during system resume
arm64: dts: renesas: salvator-common: Add EthernetAVB PHY reset
arm64: dts: renesas: ulcb: Add EthernetAVB PHY reset
Documentation/devicetree/bindings/net/renesas,ravb.txt | 2 ++
arch/arm64/boot/dts/renesas/salvator-common.dtsi | 1 +
arch/arm64/boot/dts/renesas/ulcb.dtsi | 1 +
drivers/net/ethernet/renesas/ravb_main.c | 9 +++++++++
4 files changed, 13 insertions(+)
--
2.7.4
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
The optional "reset-gpios" property (part of the generic MDIO bus
properties) lets us describe the GPIO used for resetting the Ethernet
PHY.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Documentation/devicetree/bindings/net/renesas,ravb.txt | 2 ++
1 file changed, 2 insertions(+)
@@ -52,6 +52,7 @@ Optional properties: AVB_LINK signal. - renesas,ether-link-active-low: boolean, specify when the AVB_LINK signal is active-low instead of normal active-high.+- reset-gpios: see mdio.txt in the same directory. Example:
Describe the GPIO used to reset the Ethernet PHY for EthernetAVB.
This allows the driver to reset the PHY during probe and after system
resume.
This fixes Ethernet operation after resume from s2ram on Salvator-XS,
where the enable pin of the regulator providing PHY power is connected
to PRESETn, and PSCI powers down the SoC during system suspend.
On Salvator-X, the enable pin is always pulled high, but the driver may
still need to reset the PHY if this wasn't done by the bootloader
before.
Inspired by patches in the BSP for the individual Salvator-X/XS boards
by Kazuya Mizuguchi.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
For proper PHY reset operation during system resume, this depends on
"ravb: Add missing PHY reset during system resume".
However, this patch can be applied independently.
---
arch/arm64/boot/dts/renesas/salvator-common.dtsi | 1 +
1 file changed, 1 insertion(+)
Describe the GPIO used to reset the Ethernet PHY for EthernetAVB.
This allows the driver to reset the PHY during probe and after system
resume.
On ULCB, the enable pin of the regulator providing PHY power is always
pulled high, but the driver may still need to reset the PHY if this
wasn't done by the bootloader before.
Inspired by patches in the BSP for the individual Salvator-X/XS boards
by Kazuya Mizuguchi.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Compile-tested only.
---
arch/arm64/boot/dts/renesas/ulcb.dtsi | 1 +
1 file changed, 1 insertion(+)
From: Sergei Shtylyov <hidden> Date: 2017-09-28 20:07:38
Hello!
On 09/28/2017 06:53 PM, Geert Uytterhoeven wrote:
quoted hunk
The optional "reset-gpios" property (part of the generic MDIO bus
properties) lets us describe the GPIO used for resetting the Ethernet
PHY.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Documentation/devicetree/bindings/net/renesas,ravb.txt | 2 ++
1 file changed, 2 insertions(+)
@@ -52,6 +52,7 @@ Optional properties: AVB_LINK signal. - renesas,ether-link-active-low: boolean, specify when the AVB_LINK signal is active-low instead of normal active-high.+- reset-gpios: see mdio.txt in the same directory.
Sigh, I can only repeat that was a terrible prop name choice -- when
applied to a MAC node... what reset does it mean? MAC?
MBR, Sergei
From: Rob Herring <robh@kernel.org> Date: 2017-10-05 23:24:51
On Thu, Sep 28, 2017 at 11:07:38PM +0300, Sergei Shtylyov wrote:
Hello!
On 09/28/2017 06:53 PM, Geert Uytterhoeven wrote:
quoted
The optional "reset-gpios" property (part of the generic MDIO bus
properties) lets us describe the GPIO used for resetting the Ethernet
PHY.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Documentation/devicetree/bindings/net/renesas,ravb.txt | 2 ++
1 file changed, 2 insertions(+)
@@ -52,6 +52,7 @@ Optional properties: AVB_LINK signal. - renesas,ether-link-active-low: boolean, specify when the AVB_LINK signal is active-low instead of normal active-high.+- reset-gpios: see mdio.txt in the same directory.
Sigh, I can only repeat that was a terrible prop name choice -- when
applied to a MAC node... what reset does it mean? MAC?
Agreed. This should be in the phy node. Or MDIO at least.