mbox series

[v3,0/3] net: add reset-controller driven PHY reset

Message ID 20190417215922.30472-1-mail@david-bauer.net
Headers show
Series net: add reset-controller driven PHY reset | expand

Message

David Bauer April 17, 2019, 9:59 p.m. UTC
This patchset adds support for a PHY reset driven by a reset-controller.
Currently, only GPIO driven resets are supported by the PHY subsystem.
It also renames the reset-gpio from 'reset' to 'reset_gpio' to
better differentiate between resets wired to a GPIO and resets wired to
a reset-controller driven pin.

Some systems have the PHY reset-line wired to a pin controlled by a
reset-controller (eg. some Atheros AR9132 based boards). In case the
bootloader asserts reset before loading the kernel, we currently do not
have a clean way of deasserting reset to probe the PHY.

v3:
 - add missing newline in mdio_bus.c

v2:
 - fixed missed rename of "reset" in at803x.c
 - move initial reset to mdio_device_reset


David Bauer (3):
  dt-bindings: net: add PHY reset controller binding
  net: phy: add support for reset-controller
  net: mdio: rename mdio_device reset to reset_gpio

 Documentation/devicetree/bindings/net/phy.txt |  6 ++++
 drivers/net/phy/at803x.c                      |  2 +-
 drivers/net/phy/mdio_bus.c                    | 33 ++++++++++++++++---
 drivers/net/phy/mdio_device.c                 | 13 ++++++--
 include/linux/mdio.h                          |  3 +-
 5 files changed, 48 insertions(+), 9 deletions(-)

Comments

Andrew Lunn April 17, 2019, 10:16 p.m. UTC | #1
On Wed, Apr 17, 2019 at 11:59:21PM +0200, David Bauer wrote:
> This commit adds support for PHY reset pins handled by a reset controller.
> 
> Signed-off-by: David Bauer <mail@david-bauer.net>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Andrew Lunn April 17, 2019, 10:17 p.m. UTC | #2
On Wed, Apr 17, 2019 at 11:59:22PM +0200, David Bauer wrote:
> This renames the GPIO reset of mdio devices from 'reset' to
> 'reset_gpio' to better differentiate between GPIO and
> reset-controller driven reset line.
> 
> Signed-off-by: David Bauer <mail@david-bauer.net>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
David Miller April 19, 2019, 12:43 a.m. UTC | #3
From: David Bauer <mail@david-bauer.net>
Date: Wed, 17 Apr 2019 23:59:19 +0200

> This patchset adds support for a PHY reset driven by a reset-controller.
> Currently, only GPIO driven resets are supported by the PHY subsystem.
> It also renames the reset-gpio from 'reset' to 'reset_gpio' to
> better differentiate between resets wired to a GPIO and resets wired to
> a reset-controller driven pin.
> 
> Some systems have the PHY reset-line wired to a pin controlled by a
> reset-controller (eg. some Atheros AR9132 based boards). In case the
> bootloader asserts reset before loading the kernel, we currently do not
> have a clean way of deasserting reset to probe the PHY.
> 
> v3:
>  - add missing newline in mdio_bus.c
> 
> v2:
>  - fixed missed rename of "reset" in at803x.c
>  - move initial reset to mdio_device_reset

Series applied to net-next, thanks.