devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	Lior Amsalem <alior@marvell.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Christian Gmeiner <christian.gmeiner@gmail.com>,
	Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Florian Fainelli <florian@openwrt.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCHv3 3/4] of: provide a binding for fixed link PHYs
Date: Thu, 15 May 2014 15:39:57 +0200	[thread overview]
Message-ID: <20140515153957.75a8aa2a@free-electrons.com> (raw)
In-Reply-To: <20140308055033.BE0F2C405B0@trevor.secretlab.ca>

Dear Grant Likely,

Sorry for bringing back this old topic, but I'm working on this again,
hopefully reaching an acceptable solution this time. One question for
you below.

On Sat, 08 Mar 2014 05:50:33 +0000, Grant Likely wrote:

> > +Example:
> > +
> > +ethernet@0 {
> > +	...
> > +	phy = <&phy0>;
> > +	phy0: phy@0 {
> > +	      fixed-link;
> > +	      speed = <1000>;
> > +	      full-duplex;
> > +	};
> 
> The phy phandle to a child node is superfluous. A phandle to a fixed
> child node doesn't make a whole lot of sense.

[...]

> There should be no address portion in the node name. It isn't a child
> device, the node is merely more configuration data for the parent.
> 
> Example:
> 
> ethernet@0 {
> 	...
> 	fixed-link {
> 	      speed = <1000>;
> 	      full-duplex;
> 	};

For my current use case, I'm personally fine with that. But that
doesn't work well with Florian Fainelli's which to potentially have the
"fixed-link" node as part of another node in the DT, in the case the
PHY is configurable through some separate SPI/I2C bus. See his comment
in http://article.gmane.org/gmane.linux.network/306789:

"""
Another problem with that "old" 'fixed-link' property is that we are
not properly capturing and representing Ethernet switches/PHYs whose
data-path are isolated from the control path. For instance such
devices will traditionally expose their control path as a
MMIO/GPIO/I2C/SPI interface. Using the 5-digit 'fixed-link' property
we are not representing this, on one side the Ethernet MAC is just
told to hardcode the link parameters with some parameters, and on
other side, any MMIO/GPIO/I2C/SPI device is not equipped with the
correct properties to express the fact that is also has a data-path
connected to an Ethernet MAC.

What I like about this new binding is that we could place the
'fixed-link' related properties in e.g: a SPI slave node, and have the
Ethernet MAC be pointed at it by a phandle to tell it: look this is
your PHY, it might not be one you could address on a MDIO bus, so I
have been providing additional properties to help you with the link
configuration.
"""

What is your opinion about this?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2014-05-15 13:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 10:58 [PATCHv3 0/4] Add DT support for fixed PHYs Thomas Petazzoni
2014-03-04 10:58 ` [PATCHv3 1/4] net: phy: decouple PHY id and PHY address in fixed PHY driver Thomas Petazzoni
2014-03-04 18:43   ` Florian Fainelli
     [not found]     ` <CAGVrzcYF0g-vDpkP_fnqb13faPtOOSy_Pqfo-Pgti0S26-1nSg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-04 19:04       ` Thomas Petazzoni
2014-03-08  4:09         ` Grant Likely
2014-03-04 10:58 ` [PATCHv3 2/4] net: phy: extend fixed driver with fixed_phy_register() Thomas Petazzoni
2014-03-04 18:44   ` Florian Fainelli
2014-03-08  4:21   ` Grant Likely
2014-03-04 10:58 ` [PATCHv3 3/4] of: provide a binding for fixed link PHYs Thomas Petazzoni
2014-03-04 20:58   ` Florian Fainelli
2014-03-05  9:24     ` Thomas Petazzoni
2014-03-05 17:33       ` Florian Fainelli
2014-03-08  5:50   ` Grant Likely
2014-05-15 13:39     ` Thomas Petazzoni [this message]
2014-05-15 16:54       ` Florian Fainelli
2014-03-04 10:58 ` [PATCHv3 4/4] net: mvneta: add support for fixed links Thomas Petazzoni
2014-03-04 11:30   ` Thomas Petazzoni
2014-03-08  5:56     ` Grant Likely
2014-03-04 18:09 ` [PATCHv3 0/4] Add DT support for fixed PHYs Sergei Shtylyov
     [not found] <1393930704-24374-1-git-send-email-thomas.petazzoni@ free-electrons.com>
     [not found] ` <1393930704-24374-2-git-send-email-thomas.petazzoni@ free-electrons.com>

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=20140515153957.75a8aa2a@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=alior@marvell.com \
    --cc=christian.gmeiner@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=ezequiel.garcia@free-electrons.com \
    --cc=florian@openwrt.org \
    --cc=grant.likely@secretlab.ca \
    --cc=gregory.clement@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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).