mbox series

[U-Boot,v3,0/5] Add helper function for linking a DM Eth device to a PHY

Message ID 20191101134145.19500-1-alexandru.marginean@nxp.com
Headers show
Series Add helper function for linking a DM Eth device to a PHY | expand


Alexandru Marginean Nov. 1, 2019, 1:41 p.m. UTC
The patch set introduces dm_eth_phy_connect which takes in an ethernet device
and uses DT information to find the associated PHY and connect the Ethernet
interface to it.  This should simplify similar code in ethernet drivers.
A new binding is introduced for scanning an MDIO bus, useful if the bus is
private to the Ethernet interface.
Finally the patch set updates fsl_enetc driver to use the new helper function.

This patch set supersedes v2 series:

Patch 6 of this series removes code modified in the following patch, a similar
change is now part of MDIO helper functions:

Changes in v3:
 - added cover letter
 - check for null PHY pointer before using it in dm_eth_connect_phy_handle
 - moved the code dealing with MDIO scanning into a separate patch
 - renames several arguments and variables for a bit more clarity and

Changes in v2:
- Moved MDIO scan code into dm_mdio_phy_scan which is also exported
- Use interface instead of if_type for consistency
- don't use phy pointer if NULL in fsl_enetc code

Alex Marginean (5):
  net: mdio-uclass: rename arguments of dm_mdio_phy_connect for
  net: mdio-uclass: add dm_eth_phy_connect helper function
  net: mdio-uclass: Add helper functions for scanning the MDIO bus
  doc: bindings: add mdio-handle property to ethernet nodes
  drivers: net: fsl_enetc: use the new MDIO DM helper functions

 doc/device-tree-bindings/net/ethernet.txt |   2 +
 drivers/net/fsl_enetc.c                   |  52 ++------
 drivers/net/fsl_enetc.h                   |   1 +
 include/miiphy.h                          |  32 ++++-
 net/mdio-uclass.c                         | 139 +++++++++++++++++++++-
 5 files changed, 175 insertions(+), 51 deletions(-)