On Wed, Mar 21, 2018 at 03:47:02PM -0700, Richard Cochran wrote: > On Wed, Mar 21, 2018 at 11:16:52PM +0100, Andrew Lunn wrote: > > The MAC drivers are clients of this device. They then use a phandle > > and specifier: > > > > eth0: ethernet-controller@72000 { > > compatible = "marvell,kirkwood-eth"; > > #address-cells = <1>; > > #size-cells = <0>; > > reg = <0x72000 0x4000>; > > > > timerstamper = <×tamper 2> > > } > > > > The 2 indicates this MAC is using port 2. > > > > The MAC driver can then do the standard device tree things to follow > > the phandle to get access to the device and use the API it exports. > > But that would require hacking every last MAC driver. > > I happy to improve the modeling, but the solution should be generic > and work for every MAC driver. Something else to think about. There are a number of MAC drivers which don't use phylib. All the intel drivers for example. They have their own MDIO and PHY code. And recently there have been a number of MAC drivers for hardware capable of > 1GBps which do all the PHY control in firmware. A phydev is optional, the MAC is mandatory. Andrew -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html