All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] net: phy: correctly model the PHY voltage supply in DT
@ 2020-06-22  9:37 Bartosz Golaszewski
  2020-06-22  9:37 ` [PATCH 01/15] net: phy: arrange headers in mdio_bus.c alphabetically Bartosz Golaszewski
                   ` (14 more replies)
  0 siblings, 15 replies; 86+ messages in thread
From: Bartosz Golaszewski @ 2020-06-22  9:37 UTC (permalink / raw)
  To: Andrew Lunn, Florian Fainelli, Heiner Kallweit, Russell King,
	David S . Miller, Jakub Kicinski, Rob Herring, Matthias Brugger,
	Microchip Linux Driver Support, Vladimir Oltean, Claudiu Manoil,
	Alexandre Belloni, Vivien Didelot, Tom Lendacky, Yisen Zhuang,
	Salil Mehta, Jassi Brar, Ilias Apalodimas, Iyappan Subramanian,
	Keyur Chudgar, Quan Nguyen, Frank Rowand, Philipp Zabel,
	Liam Girdwood, Mark Brown
  Cc: netdev, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, Fabien Parent, Stephane Le Provost, Pedro Tsai,
	Andrew Perepech, Bartosz Golaszewski

From: Bartosz Golaszewski <bgolaszewski@baylibre.com>

PHY devices on an MDIO bus can have their own regulators. This is currently
mostly modeled using the semi-standard phy-supply property on the MAC node.
This seems to be conceptually wrong though, as the MAC shouldn't need to
care about enabling the PHY regulator explicitly. Instead this should be
done by the core PHY/MDIO code.

This series introduces a new DT property at the PHY node level in mdio.yaml
and adds support for PHY regulator, then uses the new property on pumpkin
boards. It also addresses several issues I noticed when working on this
feature.

First four patches are just cosmetic improvements in source files we'll
modify later in this series.

Patches 5 and 6 modify the way PHY reset handling works. Currently the
probe() callback needs to be implemented to take the PHY out of reset but
PHY drivers without probe() can have resets defined as well.

Patches 7-11 address an issue where we probe the PHY for ID without
deasserting its reset signal. We delay the ID read until after the logical
device is created and resets have been configured.

Last four patches add the new DT property, implement support for PHY
regulator in phy and mdio code and set the new property in the DT file
for MediaTek's pumpkin boards.

Bartosz Golaszewski (15):
  net: phy: arrange headers in mdio_bus.c alphabetically
  net: phy: arrange headers in mdio_device.c alphabetically
  net: phy: arrange headers in phy_device.c alphabetically
  net: mdio: add a forward declaration for reset_control to mdio.h
  net: phy: reset the PHY even if probe() is not implemented
  net: phy: mdio: reset MDIO devices even if probe() is not implemented
  net: phy: split out the PHY driver request out of phy_device_create()
  net: phy: check the PHY presence in get_phy_id()
  net: phy: delay PHY driver probe until PHY registration
  net: phy: simplify phy_device_create()
  net: phy: drop get_phy_device()
  dt-bindings: mdio: add phy-supply property to ethernet phy node
  net: phy: mdio: add support for PHY supply regulator
  net: phy: add PHY regulator support
  ARM64: dts: mediatek: add a phy regulator to pumpkin-common.dtsi

 .../devicetree/bindings/net/mdio.yaml         |   4 +
 .../boot/dts/mediatek/pumpkin-common.dtsi     |   1 +
 drivers/net/dsa/ocelot/felix_vsc9959.c        |   3 +-
 drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c   |   5 +-
 .../net/ethernet/hisilicon/hns/hns_dsaf_mac.c |   2 +-
 drivers/net/ethernet/socionext/netsec.c       |   3 +-
 drivers/net/phy/fixed_phy.c                   |   2 +-
 drivers/net/phy/mdio-xgene.c                  |   2 +-
 drivers/net/phy/mdio_bus.c                    |  55 +++--
 drivers/net/phy/mdio_device.c                 |  51 ++++-
 drivers/net/phy/nxp-tja11xx.c                 |   2 +-
 drivers/net/phy/phy_device.c                  | 216 ++++++++++--------
 drivers/net/phy/sfp.c                         |   2 +-
 drivers/of/of_mdio.c                          |  11 +-
 include/linux/mdio.h                          |   4 +
 include/linux/phy.h                           |  21 +-
 16 files changed, 240 insertions(+), 144 deletions(-)

-- 
2.26.1


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

end of thread, other threads:[~2020-06-24 19:01 UTC | newest]

Thread overview: 86+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22  9:37 [PATCH 00/15] net: phy: correctly model the PHY voltage supply in DT Bartosz Golaszewski
2020-06-22  9:37 ` [PATCH 01/15] net: phy: arrange headers in mdio_bus.c alphabetically Bartosz Golaszewski
2020-06-22 13:12   ` Andrew Lunn
2020-06-23 18:54   ` Florian Fainelli
2020-06-23 18:54     ` Florian Fainelli
2020-06-23 18:54     ` Florian Fainelli
2020-06-22  9:37 ` [PATCH 02/15] net: phy: arrange headers in mdio_device.c alphabetically Bartosz Golaszewski
2020-06-22 13:12   ` Andrew Lunn
2020-06-23 18:56   ` Florian Fainelli
2020-06-23 18:56     ` Florian Fainelli
2020-06-23 18:56     ` Florian Fainelli
2020-06-22  9:37 ` [PATCH 03/15] net: phy: arrange headers in phy_device.c alphabetically Bartosz Golaszewski
2020-06-22 13:12   ` Andrew Lunn
2020-06-23 18:57   ` Florian Fainelli
2020-06-23 18:57     ` Florian Fainelli
2020-06-23 18:57     ` Florian Fainelli
2020-06-22  9:37 ` [PATCH 04/15] net: mdio: add a forward declaration for reset_control to mdio.h Bartosz Golaszewski
2020-06-22 13:13   ` Andrew Lunn
2020-06-23 18:59   ` Florian Fainelli
2020-06-23 18:59     ` Florian Fainelli
2020-06-23 18:59     ` Florian Fainelli
2020-06-22  9:37 ` [PATCH 05/15] net: phy: reset the PHY even if probe() is not implemented Bartosz Golaszewski
2020-06-22 13:16   ` Andrew Lunn
2020-06-23 19:14   ` Florian Fainelli
2020-06-23 19:14     ` Florian Fainelli
2020-06-23 19:14     ` Florian Fainelli
2020-06-24 16:22     ` Bartosz Golaszewski
2020-06-24 16:22       ` Bartosz Golaszewski
2020-06-24 16:22       ` Bartosz Golaszewski
2020-06-22  9:37 ` [PATCH 06/15] net: phy: mdio: reset MDIO devices " Bartosz Golaszewski
2020-06-22 13:18   ` Andrew Lunn
2020-06-23 19:16   ` Florian Fainelli
2020-06-23 19:16     ` Florian Fainelli
2020-06-23 19:16     ` Florian Fainelli
2020-06-22  9:37 ` [PATCH 07/15] net: phy: split out the PHY driver request out of phy_device_create() Bartosz Golaszewski
2020-06-22  9:37 ` [PATCH 08/15] net: phy: check the PHY presence in get_phy_id() Bartosz Golaszewski
2020-06-22  9:37 ` [PATCH 09/15] net: phy: delay PHY driver probe until PHY registration Bartosz Golaszewski
2020-06-22 13:39   ` Andrew Lunn
2020-06-22 13:51     ` Mark Brown
2020-06-23 19:49       ` Florian Fainelli
2020-06-23 19:49         ` Florian Fainelli
2020-06-23 19:49         ` Florian Fainelli
2020-06-24  9:43         ` Mark Brown
2020-06-24  9:43           ` Mark Brown
2020-06-24  9:43           ` Mark Brown
2020-06-24 13:48           ` Bartosz Golaszewski
2020-06-24 13:48             ` Bartosz Golaszewski
2020-06-24 13:48             ` Bartosz Golaszewski
2020-06-24 16:06             ` Florian Fainelli
2020-06-24 16:06               ` Florian Fainelli
2020-06-24 16:06               ` Florian Fainelli
2020-06-24 16:35               ` Bartosz Golaszewski
2020-06-24 16:35                 ` Bartosz Golaszewski
2020-06-24 16:35                 ` Bartosz Golaszewski
2020-06-24 16:50               ` Russell King - ARM Linux admin
2020-06-24 16:50                 ` Russell King - ARM Linux admin
2020-06-24 16:50                 ` Russell King - ARM Linux admin
2020-06-24 18:59                 ` Robin Murphy
2020-06-24 18:59                   ` Robin Murphy
2020-06-24 18:59                   ` Robin Murphy
2020-06-22  9:37 ` [PATCH 10/15] net: phy: simplify phy_device_create() Bartosz Golaszewski
2020-06-22  9:37 ` [PATCH 11/15] net: phy: drop get_phy_device() Bartosz Golaszewski
2020-06-22 19:29   ` kernel test robot
2020-06-22  9:37 ` [PATCH 12/15] dt-bindings: mdio: add phy-supply property to ethernet phy node Bartosz Golaszewski
2020-06-23 19:39   ` Florian Fainelli
2020-06-23 19:39     ` Florian Fainelli
2020-06-23 19:39     ` Florian Fainelli
2020-06-22  9:37 ` [PATCH 13/15] net: phy: mdio: add support for PHY supply regulator Bartosz Golaszewski
2020-06-22 13:25   ` Russell King - ARM Linux admin
2020-06-23  9:30     ` Bartosz Golaszewski
2020-06-22  9:37 ` [PATCH 14/15] net: phy: add PHY regulator support Bartosz Golaszewski
2020-06-22 13:29   ` Russell King - ARM Linux admin
2020-06-23  9:41     ` Bartosz Golaszewski
2020-06-23  9:42       ` Russell King - ARM Linux admin
2020-06-23  9:46         ` Bartosz Golaszewski
2020-06-23  9:56           ` Russell King - ARM Linux admin
2020-06-23 16:27             ` Bartosz Golaszewski
2020-06-23 16:27               ` Bartosz Golaszewski
2020-06-23 16:27               ` Bartosz Golaszewski
2020-06-24 16:57               ` Russell King - ARM Linux admin
2020-06-24 16:57                 ` Russell King - ARM Linux admin
2020-06-24 16:57                 ` Russell King - ARM Linux admin
2020-06-24 18:12                 ` Russell King - ARM Linux admin
2020-06-24 18:12                   ` Russell King - ARM Linux admin
2020-06-24 18:12                   ` Russell King - ARM Linux admin
2020-06-22  9:37 ` [PATCH 15/15] ARM64: dts: mediatek: add a phy regulator to pumpkin-common.dtsi Bartosz Golaszewski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.