Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1437789
| From | Punnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [RFC PATCH v2 1/4] Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation |
| Date | 2016-07-06 17:10 +0200 |
| Message-ID | <rRWCB-2lt-13@gated-at.bofh.it> (permalink) |
| References | <rR837-3Kh-7@gated-at.bofh.it> <rR837-3Kh-5@gated-at.bofh.it> <rRcJs-6B7-25@gated-at.bofh.it> <rRVQd-1PF-5@gated-at.bofh.it> <rRVZT-1T1-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> -----Original Message-----
> From: Andrew Lunn [mailto:andrew@lunn.ch]
> Sent: Wednesday, July 06, 2016 7:51 PM
> To: Punnaiah Choudary Kalluri <punnaia@xilinx.com>
> Cc: Appana Durga Kedareswara Rao <appanad@xilinx.com>;
> robh+dt@kernel.org; mark.rutland@arm.com; Michal Simek
> <michals@xilinx.com>; Soren Brinkmann <sorenb@xilinx.com>;
> nicolas.ferre@atmel.com; f.fainelli@gmail.com; Anirudha Sarangi
> <anirudh@xilinx.com>; Harini Katakam <harinik@xilinx.com>;
> netdev@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@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@0 {
> > > reg = <0>;
> > > };
> > >
> > > gmii_to_rgmii: gmii-to-rgmii@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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC PATCH v2 1/4] Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation Kedareswara rao Appana <appana.durga.rao@xilinx.com> - 2016-07-04 11:10 +0200
Re: [RFC PATCH v2 1/4] Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation Andrew Lunn <andrew@lunn.ch> - 2016-07-04 16:10 +0200
RE: [RFC PATCH v2 1/4] Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation Punnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com> - 2016-07-06 16:20 +0200
Re: [RFC PATCH v2 1/4] Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation Andrew Lunn <andrew@lunn.ch> - 2016-07-06 16:30 +0200
RE: [RFC PATCH v2 1/4] Documentation: DT: net: Add Xilinx gmiitorgmii converter device tree binding documentation Punnaiah Choudary Kalluri <punnaiah.choudary.kalluri@xilinx.com> - 2016-07-06 17:10 +0200
csiph-web