[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1733937.SiPWt3mDlH@lenovo>
Date: Tue, 09 Jul 2013 19:02:05 +0100
From: Florian Fainelli <florian@...nwrt.org>
To: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Cc: netdev <netdev@...r.kernel.org>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Gregory Clément
<gregory.clement@...e-electrons.com>,
Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
Lior Amsalem <alior@...vell.com>,
devicetree-discuss@...ts.ozlabs.org, grant.likely@...retlab.ca,
afleming@...escale.com
Subject: Re: Fixed PHY Device Tree usage?
Widening audience
FlorianLe mardi 9 juillet 2013 17:44:55 Fainelli a écrit :
> Hello Thomas,
>
> 2013/7/9 Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>:
> > Hello,
> >
> > We have a case of an hardware platform that uses the mvneta network
> > driver, but instead of the SoC being connected to a PHY, it's connected
> > directly to a switch, so my understanding is that there's no MDIO bus,
> > and we should have a kind of a "fake PHY" to make the mvneta driver
> > believe that the link is up, at a given speed.
>
> Good timing, I was about to post questions/suggestions about how we
> should represent fixed PHYs in device tree.
>
> > Looking at this problem, I stumbled across the "fixed PHY" driver in
> > drivers/net/phy/fixed.c, which registers a fake "Fixed MDIO bus", and
> > then provides a fixed_phy_add() API to add one "fake" PHY. This seems
> > to fit my need, except that my ARM platform is obviously Device Tree
> > based, so I'm wondering what I should do. One option is to implement a
> > Device Tree binding for the fixed PHY driver (the exact DT binding
> > would have to be discussed), but I'm wondering whether describing a
> > fixed PHY in the DT is actually correct, because describing a fixed PHy
> > is not really describing the hardware, the hardware is actually a
> > switch.
>
> Well, it does not seem to be too far from the "hardware" reality to
> describe a link between a switch CPU port and an Ethernet MAC as a
> fixed PHY because that is what it really is in fact. Once you have a
> drivers for your switch you can start using this PHY along with its
> corresponding driver.
>
> There is a helper: of_phy_connect_fixed_link() in drivers/of/of_mdio.c
> is flagged as being a
> temporary solution for Freescale Ethernet drivers to move to something else,
> so I would like to discuss what the "something else should be".
>
> Here what I would like to see the new "fixed-link" phy node look like:
>
> ethernet-phy@0 {
> reg = <0>;
> id = "deadbeef";
> speed = <1000>;
> full-duplex;
> pause;
> asym-pause;
> };
>
> It has the same properties as the binding described in:
> Documentation/devicetree/bindings/net/fsl-tsec-phy.txt but expressed in a
> more explicit way instead of using an array of integers.
>
> > Do you have some thoughts about this situation? Maybe there's already
> > some solutions that I'm not aware of?
> >
> > Thanks,
>
> --
> Florian
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists