Skip to content

net: phy: correctly model the PHY voltage supply in DT

Bartosz Golaszewski linux-arm-kernel linux-devicetree linux-mediatek lkml netdev oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 33 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15net: phy: arrange headers in mdio_bus.c alphabeticallydrivers/net/phy/mdio_bus.c+16 -162 replies
2/15net: phy: arrange headers in mdio_device.c alphabeticallydrivers/net/phy/mdio_device.c+1 -12 replies
3/15net: phy: arrange headers in phy_device.c alphabeticallydrivers/net/phy/phy_device.c+14 -142 replies
4/15net: mdio: add a forward declaration for reset_control to mdio.hinclude/linux/mdio.h+1 -02 replies
5/15net: phy: reset the PHY even if probe() is not implementeddrivers/net/phy/phy_device.c+12 -113 replies
6/15net: phy: mdio: reset MDIO devices even if probe() is not implementeddrivers/net/phy/mdio_device.c+6 -72 replies
7/15net: phy: split out the PHY driver request out of phy_device_create()drivers/net/phy/phy_device.c+39 -320 replies
8/15net: phy: check the PHY presence in get_phy_id()drivers/net/phy/phy_device.c+4 -40 replies
9/15net: phy: delay PHY driver probe until PHY registrationdrivers/net/phy/phy_device.c include/linux/phy.h+26 -229 replies
10/15net: phy: simplify phy_device_create()drivers/net/phy/nxp-tja11xx.c drivers/net/phy/phy_device.c drivers/of/of_mdio.c +1 more+6 -90 replies
11/15net: phy: drop get_phy_device()drivers/net/dsa/ocelot/felix_vsc9959.c drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c +8 more+19 -340 replies
12/15dt-bindings: mdio: add phy-supply property to ethernet phy nodeDocumentation/devicetree/bindings/net/mdio.yaml+4 -01 reply
13/15net: phy: mdio: add support for PHY supply regulatordrivers/net/phy/mdio_bus.c drivers/net/phy/mdio_device.c include/linux/mdio.h+60 -02 replies
14/15net: phy: add PHY regulator supportdrivers/net/phy/phy_device.c include/linux/phy.h+48 -118 replies
15/15ARM64: dts: mediatek: add a phy regulator to pumpkin-common.dtsiarch/arm64/boot/dts/mediatek/pumpkin-common.dtsi+1 -00 replies

Reviews trailers per patch

6 of 15 patches have a Reviewed-by or Acked-by.

PatchAndrew LunnFlorian Fainelli
1/15R-b R-b
2/15R-b R-b
3/15R-b R-b
4/15R-b
5/15R-b
6/15R-b
7/15
8/15
9/15
10/15
11/15
12/15
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/15] net: phy: correctly model the PHY voltage supply in DT

From: Bartosz Golaszewski <[email protected]>

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(-)
Signature · 1 line
2.26.1