From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Florian Fainelli <florian@openwrt.org>
Cc: netdev <netdev@vger.kernel.org>,
"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
"Gregory Clément" <gregory.clement@free-electrons.com>,
"Ezequiel Garcia" <ezequiel.garcia@free-electrons.com>,
"Lior Amsalem" <alior@marvell.com>,
devicetree-discuss@lists.ozlabs.org, grant.likely@secretlab.ca,
afleming@freescale.com
Subject: Re: Fixed PHY Device Tree usage?
Date: Wed, 10 Jul 2013 18:22:16 +0200 [thread overview]
Message-ID: <20130710182216.0dcfaaaf@skate> (raw)
In-Reply-To: <1733937.SiPWt3mDlH@lenovo>
Dear Florian Fainelli,
On Tue, 09 Jul 2013 19:02:05 +0100, Florian Fainelli wrote:
> > > 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.
Great.
> > 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.
Ok.
> > 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".
Yeah, I saw this helper function as well, and the comment you spotted.
> > 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.
And so the fixed-phy driver would look for what exactly in the Device
Tree to find which fixed PHYs to create?
Should we have something like:
mdio-fixed {
compatible = "generic,mdio-fixed";
phy0: ethernet-phy@0 {
... all the properties you listed ...
... maybe the "id" property is not needed
because of the phandle ...
};
phy1: ethernet-phy@1 {
... all the properties you listed ...
... maybe the "id" property is not needed
because of the phandle ...
};
};
soc {
ethernet@0 {
phy = <&phy0>;
...
};
ethernet@1 {
phy = <&phy1>;
...
};
};
or do you have in mind another representation?
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2013-07-10 16:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130709183312.6c4d052d@skate>
[not found] ` <CAGVrzcZ7ZLSDy5sTUR_XuSAUH=5q8ddiXx5n1y680WwGrdFfTw@mail.gmail.com>
2013-07-09 18:02 ` Fixed PHY Device Tree usage? Florian Fainelli
2013-07-10 16:22 ` Thomas Petazzoni [this message]
2013-07-10 16:29 ` Florian Fainelli
2013-07-10 16:39 ` Thomas Petazzoni
2013-07-10 17:23 ` Florian Fainelli
2013-07-12 11:56 ` Thomas Petazzoni
2013-07-12 12:05 ` Florian Fainelli
2013-07-12 13:04 ` Thomas Petazzoni
2013-07-12 22:44 ` Grant Likely
2013-07-12 23:29 ` Florian Fainelli
2013-07-13 17:02 ` Thomas Petazzoni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130710182216.0dcfaaaf@skate \
--to=thomas.petazzoni@free-electrons.com \
--cc=afleming@freescale.com \
--cc=alior@marvell.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=ezequiel.garcia@free-electrons.com \
--cc=florian@openwrt.org \
--cc=grant.likely@secretlab.ca \
--cc=gregory.clement@free-electrons.com \
--cc=netdev@vger.kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).