Hi Andrew, On Tue, Feb 20, 2018 at 03:28:17AM +0100, Andrew Lunn wrote: > Hi Paul > > Here is my stab at converting the OKI PCH GBE to use the common MDIO > bus and phylib drivers. This is compile tested only, and pretty much > guaranteed to be broken. But hopefully it will help you. Feel free to > pick it up and make it work. Without hardware, there is not much more > i can do, other than answer questions.
Thanks - this will be useful :) I'll try to find some time to get it running this week. > The handling of the GPIO for reset is possibly wrong. > > 1) It is probably active high, when active low is wanted. Your patch > would sort this out. > > 2) It is possible the reset happens too late. Since there is no device > tree binding for the minnow board, it is not possible to register > the gpio with the core code until after it has been probed and > attached to the MAC. If the PHY is being held in reset, it might > not respond to the bus scan, and hence we fail to find it. If that > is true, we need a different solution. Note that unfortunately I don't have access to the Minnow platform which the driver as-is currently supports, so I won't be able to observe any Minnow-specific issues either. Thanks, Paul > Andrew Lunn (2): > net: phy: at803x: Export at803x_debug_reg_mask() > net: ethernet: pch_gbe: Convert to mdiobus and phylib > > drivers/net/ethernet/oki-semi/pch_gbe/Kconfig | 1 + > drivers/net/ethernet/oki-semi/pch_gbe/Makefile | 2 +- > drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe.h | 35 +- > .../net/ethernet/oki-semi/pch_gbe/pch_gbe_api.c | 118 ------- > .../net/ethernet/oki-semi/pch_gbe/pch_gbe_api.h | 8 +- > .../ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c | 89 +---- > .../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 373 ++++++++++---------- > .../net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c | 265 --------------- > .../net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c | 377 > --------------------- > .../net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.h | 37 -- > drivers/net/phy/at803x.c | 5 +- > include/linux/at803x_phy.h | 16 + > 12 files changed, 227 insertions(+), 1099 deletions(-) > delete mode 100644 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.c > delete mode 100644 drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_phy.h > create mode 100644 include/linux/at803x_phy.h > > -- > 2.16.1 >