[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180321235007.GA28402@lunn.ch>
Date: Thu, 22 Mar 2018 00:50:07 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Richard Cochran <richardcochran@...il.com>
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org,
David Miller <davem@...emloft.net>,
Florian Fainelli <f.fainelli@...il.com>,
Mark Rutland <mark.rutland@....com>,
Miroslav Lichvar <mlichvar@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH net-next RFC V1 5/5] net: mdio: Add a driver for InES
time stamping IP core.
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@...00 {
> > 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.
Well, the solution is generic, in that the phandle can point to a
device anywhere. It could be MMIO, it could be on an MDIO bus,
etc. You just need to make sure you API makes no assumption about how
the device driver talks to the hardware.
How clever is this device? Can it tell the difference between
1000Base-X and SGMII? Can it figure out that the MAC is repeating
every bit 100 times and so has dropped to 10Mbits? Does it understand
EEE? Does it need to know if RGMII or RGMII-ID is being used?
Can such a device really operation without the MAC being involved? My
feeling is it needs to understand how the MII bus is being used. It
might also be that the device is less capable than the MAC, so you
need to turn off some of the MAC features. I think you are going to
need the MAC actively involved in this.
Andrew
Powered by blists - more mailing lists