[RFC PATCH v2 1/4] Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation

Punnaiah Choudary Kalluri punnaiah.choudary.kalluri at xilinx.com
Wed Jul 6 07:51:28 PDT 2016



> -----Original Message-----
> From: Andrew Lunn [mailto:andrew at lunn.ch]
> Sent: Wednesday, July 06, 2016 7:51 PM
> To: Punnaiah Choudary Kalluri <punnaia at xilinx.com>
> Cc: Appana Durga Kedareswara Rao <appanad at xilinx.com>;
> robh+dt at kernel.org; mark.rutland at arm.com; Michal Simek
> <michals at xilinx.com>; Soren Brinkmann <sorenb at xilinx.com>;
> nicolas.ferre at atmel.com; f.fainelli at gmail.com; Anirudha Sarangi
> <anirudh at xilinx.com>; Harini Katakam <harinik at xilinx.com>;
> netdev at vger.kernel.org; devicetree at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org; linux-kernel at vger.kernel.org
> Subject: Re: [RFC PATCH v2 1/4] Documentation: DT: net: Add Xilinx
> gmiitorgmii converter device tree binding documentation
> 
> > > Hi Kedareswara
> > >
> > > So looking at the device tree, you have the gmiitorgmii as an mdio
> > > device. It will get probed as an mdio device, and from that you know
> > > the address on the bus. However, your driver does not actually do
> > > this. xilinx_gmii2rgmii.c is just a library of two functions, and does
> > > not use any of this device tree information. You device tree binding
> > > is completely bogus.
> > >
> > > What i think is a much more logical structure, and fits the hardware,
> > > which is what DT is all about, is to make your driver an mdio driver.
> > > Also, have a phy-handle pointing to the PHY in the gmii_to_rgmii node.
> > > You then no longer need the exported gmii2rgmii_phyprobe() function.
> > >
> > > Next, you want gmiitorgmii driver to register a phy. The MAC driver
> > > can then look this up using phy-handle:
> > >
> > >        mdio {
> > >                 #address-cells = <1>;
> > >                 #size-cells = <0>;
> > >
> > >                 phy: ethernet-phy at 0 {
> > >                         reg = <0>;
> > >                 };
> > >
> > >                 gmii_to_rgmii: gmii-to-rgmii at 8 {
> > >                         compatible = "xlnx,gmiitorgmii";
> > >                         reg = <8>;
> > > 			phy-handle = <&phy>;
> > >                 };
> > >        };
> >
> >
> > Thanks for your inputs initially we too thought the similar implementation
> > But the GMII2RGMII converter contains only one register and it is
> >  not compatible to the standard ethernet MII interface. Also it doesn't have
> > a standard VID and PID registers So, during the mdio bus scan, this device
> will
> > not appear.
> 
> Hi Punnaiah
> 
> Use missed some subtlety in my description. I did not call the
> GMII2RGMII a PHY device, i called it an MDIO device. These are
> different things. Go look at the MDIO subsystem to figure out the
> difference.
> 
Hi Andrew

Got it. Thanks.

Punnaiah

> 	Andrew



More information about the linux-arm-kernel mailing list