All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Timur Tabi <timur@codeaurora.org>
Cc: netdev <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	Sagar Dharia <sdharia@codeaurora.org>,
	Shanker Donthineni <shankerd@codeaurora.org>,
	Vikram Sethi <vikrams@codeaurora.org>,
	Christopher Covington <cov@codeaurora.org>,
	Gilad Avidov <gavidov@codeaurora.org>,
	Andrew Lunn <andrew@lunn.ch>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Mark Langsdorf <mlangsdo@redhat.com>,
	"jcm@redhat.com" <jcm@redhat.com>,
	Andy Gross <agross@codeaurora.org>,
	David Miller <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Lino Sanfilippo <LinoSanfilippo@gmx.de>
Subject: Re: [PATCH] [v9] net: emac: emac gigabit ethernet controller driver
Date: Thu, 1 Sep 2016 17:49:13 -0500	[thread overview]
Message-ID: <CAL_Jsq+75RJOCFUrUV43457kQ4o5oRjRhLLT2yGzTFfYhSESfg@mail.gmail.com> (raw)
In-Reply-To: <57C74562.3050203@codeaurora.org>

On Wed, Aug 31, 2016 at 4:00 PM, Timur Tabi <timur@codeaurora.org> wrote:
> Rob Herring wrote:
>>>
>>> It's not a generic phy.  It's a funky "internal phy" that differs among
>>> >SOCs.  I call it the internal phy, but I could use another name.
>>> > Internally,
>>> >some people call it the "sgmii phy", but I don't think that's accurate.
>
>
>> Funky internal PHYs are precisely the types of PHYs this binding is
>> for. It is generic in that the type is not defined. It can be USB,
>> HDMI, DSI, LVDS, etc.
>
>
> I don't understand what you're getting at.  There are two IP blocks that
> have a private interconnect.  One is the MAC, and the other is an internal
> PHY, but the driver programs them as one device.
>
> If you want me to make some kind of change, you're going to have to be more
> specific.

The change would simply be use "phys" for the property here and add
#phy-cells to the phy node. See bindings/phy/phy-binding.txt.

And just because you just the phy binding, that doesn't mean you have
to use the generic phy framework in the kernel. I'm not suggesting you
need to. That could change in time as this becomes more common (i.e.
with 10G).

>>> >That's what I thought to, but without it, of_phy_find_device() won't
>>> > work.
>>> >I need a pointer to the phy node, and I use of_parse_phandle() to get
>>> > it:
>>> >
>>> >         struct device_node *phy_np;
>>> >
>>> >         ret = of_mdiobus_register(mii_bus, np);
>>> >         if (ret) {
>>> >                 dev_err(&pdev->dev, "could not register mdio bus\n");
>>> >                 return ret;
>>> >         }
>>> >
>>> >         phy_np = of_parse_phandle(np, "phy-handle", 0);
>
>
>> You can just as easily find the child node called ethernet-phy.
>
>
> As Andrew pointed out, using phy-handle allows me to place the phy node
> anywhere.

But you can't because the binding says (or should say) it is a child node.

> I've already made changes to this design, and every change has raised
> objections.  I don't see anything wrong with phy-handle.  A lot of drivers
> use it.

You said it wouldn't work. I'm only pointing out that that is not
true. As I said to begin with, if everything else is using it, then
it's fine.

Rob

  parent reply	other threads:[~2016-09-01 22:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-25 21:39 [PATCH] [v9] net: emac: emac gigabit ethernet controller driver Timur Tabi
2016-08-27  4:29 ` David Miller
2016-08-27 12:26   ` Timur Tabi
2016-08-27 17:58     ` Florian Fainelli
2016-08-28  4:50     ` David Miller
2016-08-27 20:26 ` Rami Rosen
     [not found]   ` <CAKoUAr=Z56VxzW=zHu7r9ossdXHQ6xpeYdR5jwhv38zkV_eKFQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-27 20:42     ` Timur Tabi
2016-08-31 18:57       ` Timur Tabi
2016-08-31 19:15         ` Florian Fainelli
     [not found]           ` <60d13549-f9ea-694b-1030-0c610e0d9722-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-31 19:19             ` Timur Tabi
     [not found] ` <1472161143-26417-1-git-send-email-timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-08-31 15:00   ` Rob Herring
2016-08-31 15:11     ` Timur Tabi
2016-08-31 20:46       ` Rob Herring
     [not found]         ` <CAL_Jsq+BtwBtB7Vd8HB+vhucfUmn_0bxRRXmyO13GoCM82LgFg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-08-31 21:00           ` Timur Tabi
     [not found]             ` <57C74562.3050203-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2016-08-31 21:16               ` Andrew Lunn
2016-09-01 22:49             ` Rob Herring [this message]
2016-08-31 15:24     ` Andrew Lunn

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=CAL_Jsq+75RJOCFUrUV43457kQ4o5oRjRhLLT2yGzTFfYhSESfg@mail.gmail.com \
    --to=robh@kernel.org \
    --cc=LinoSanfilippo@gmx.de \
    --cc=agross@codeaurora.org \
    --cc=andrew@lunn.ch \
    --cc=bjorn.andersson@linaro.org \
    --cc=cov@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=gavidov@codeaurora.org \
    --cc=jcm@redhat.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=mlangsdo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=sdharia@codeaurora.org \
    --cc=shankerd@codeaurora.org \
    --cc=timur@codeaurora.org \
    --cc=vikrams@codeaurora.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.