netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] Add Possiblity to Reset PHY After Power-up
@ 2021-12-14 12:16 Philippe Schenker
  2021-12-14 12:16 ` [PATCH net-next 1/3] net: phy: add phy_reset_after_power_on() function Philippe Schenker
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Philippe Schenker @ 2021-12-14 12:16 UTC (permalink / raw)
  To: netdev, Joakim Zhang, David S . Miller, Russell King, Andrew Lunn
  Cc: Heiner Kallweit, Francesco Dolcini, Jakub Kicinski, Fabio Estevam,
	Fugang Duan, Philippe Schenker, linux-kernel

We do have a hardware design in which the ethernet phy regulator and
reset are controlled by software. The ethernet PHY is a Microchip
KSZ9131 [1] and the power sequencing requires a reset after the power
goes up.

In our case the ethernet PHY is connected to a Freescale FEC and the
driver is shutting down the regulator on suspend, however on the resume
path the reset signal is never asserted and because of that the
ethernet is not working anymore.

To solve this adds a new phy_reset_after_power_on() function, similar
to the existing phy_reset_after_clk_enable(), and call it in the fec
resume path after the regulator is switched on as suggested by
Joakim Zhang <qiangqing.zhang@nxp.com>.

[1] https://ww1.microchip.com/downloads/en/DeviceDoc/00002841C.pdf


Philippe Schenker (3):
  net: phy: add phy_reset_after_power_on() function
  net: phy: micrel: add reset-after-power-on flag to ksz9x31 phys
  net: fec: reset phy on resume after power-up

 drivers/net/ethernet/freescale/fec_main.c |  1 +
 drivers/net/phy/micrel.c                  |  2 ++
 drivers/net/phy/phy_device.c              | 24 +++++++++++++++++++++++
 include/linux/phy.h                       |  2 ++
 4 files changed, 29 insertions(+)

-- 
2.34.1


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

end of thread, other threads:[~2021-12-16 11:32 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-14 12:16 [PATCH net-next 0/3] Add Possiblity to Reset PHY After Power-up Philippe Schenker
2021-12-14 12:16 ` [PATCH net-next 1/3] net: phy: add phy_reset_after_power_on() function Philippe Schenker
2021-12-14 12:16 ` [PATCH net-next 2/3] net: phy: micrel: add reset-after-power-on flag to ksz9x31 phys Philippe Schenker
2021-12-14 12:16 ` [PATCH net-next 3/3] net: fec: reset phy on resume after power-up Philippe Schenker
2021-12-14 18:54   ` Andrew Lunn
2021-12-14 19:09     ` Russell King (Oracle)
2021-12-14 22:35     ` Francesco Dolcini
2021-12-15  9:36       ` Andrew Lunn
2021-12-15 10:29         ` Russell King (Oracle)
2021-12-15 11:01         ` Francesco Dolcini
2021-12-15 11:10           ` Francesco Dolcini
2021-12-15 19:34           ` Andrew Lunn
2021-12-15 19:48             ` Francesco Dolcini
2021-12-16  4:52           ` Joakim Zhang
2021-12-16  7:52             ` Francesco Dolcini
2021-12-16 10:24               ` Andrew Lunn
2021-12-16 11:24                 ` Francesco Dolcini
2021-12-16 11:28                   ` Andrew Lunn
2021-12-16 11:31                     ` Francesco Dolcini
2021-12-16 11:32                       ` Andrew Lunn
2021-12-15 10:25       ` Joakim Zhang
2021-12-14 12:23 ` [PATCH net-next 0/3] Add Possiblity to Reset PHY After Power-up Francesco Dolcini

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