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"
<devicetree-discuss@lists.ozlabs.org>,
"grant.likely" <grant.likely@secretlab.ca>,
afleming@freescale.com
Subject: Re: Fixed PHY Device Tree usage?
Date: Fri, 12 Jul 2013 15:04:49 +0200 [thread overview]
Message-ID: <20130712150449.4077feb4@skate> (raw)
In-Reply-To: <CAGVrzcax7gWCbdDKLdDjQDV_fOsShh+VZ9ODKO2KUBPm-zQgpQ@mail.gmail.com>
Dear Florian Fainelli,
On Fri, 12 Jul 2013 13:05:59 +0100, Florian Fainelli wrote:
> I am talking about scanning the MDIO bus DT nodes, not the entire DT.
> That job is already done by of_mdiobus_probe() to register PHY
> devices, so having a central point where the knowledge of how to treat
> PHY deivces could be here I guess.
So, I guess your idea is to call of_mdiobus_register() from
drivers/net/phy/fixed.c:fixed_mdio_bus_init(). But then, what DT node
will you be passing to of_mdiobus_register() ? As a reminder, this
function takes as a second argument the DT node that contains the
various PHYs as sub-nodes.
In all the other PHY drivers, the MDIO bus node as a compatible string,
so the usual platform_driver/platform_device mechanism kicks in, and
calls the ->probe() function, passing the DT node of the MDIO bus,
which is then used by the PHY driver ->probe() function as the second
argument of of_mdiobus_register().
But the fixed.c PHY driver is not a platform_driver, and in our
discussion, we mentioned that it wouldn't make sense to have a
compatible string for the fixed MDIO bus DT node.
So I'm still unsure *which* DT node you'll pass as the second argument
of of_mdiobus_register() :-)
> Well either we go with some specific compatible property like
> "ethernet-phy-fixed" for instance, or we simply add a boolean property
> to the node, so a fixed PHY would either look like this:
>
> phy {
> compatible = "linux,ethernet-phy-fixed";
> speed = <1000>;
> duplex = <1>;
> pause;
> asym-pause;
> };
>
> or respectively, something like this:
>
> phy {
> fixed;
> speed = <1000>;
> duplex = <1>;
> pause;
> asym-pause;
> };
Yeah, that's fine, I have no problem with the internal properties of
the PHY nodes themselves. My question is really the one described above.
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-12 13:04 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
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 [this message]
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=20130712150449.4077feb4@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).