Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Shawn Guo <shawnguo@kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
	<linux-arm-kernel@lists.infradead.org>,
	Joakim Zhang <qiangqing.zhang@nxp.com>,
	Rob Herring <robh+dt@kernel.org>, netdev <netdev@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH net-next] ARM: dts: imx6qdl: Remove unnecessary mdio #address-cells/#size-cells
Date: Fri, 23 Jul 2021 16:35:56 +0300	[thread overview]
Message-ID: <20210723133556.xnhhxdkvassykavn@skbuf> (raw)
In-Reply-To: <CAOMZO5BRt6M=4WrZMWQjYeDcOXMSFhcfjZ95tdUkst5Jm=yB6A@mail.gmail.com>

On Fri, Jul 23, 2021 at 10:15:52AM -0300, Fabio Estevam wrote:
> Hi Vladimr,
> 
> On Fri, Jul 23, 2021 at 10:08 AM Vladimir Oltean <olteanv@gmail.com> wrote:
> 
> > Are you actually sure this is the correct fix? If I look at mdio.yaml, I
> > think it is pretty clear that the "ethernet-phy" subnode of the MDIO
> > controller must have an "@[0-9a-f]+$" pattern, and a "reg" property. If
> > it did, then it wouldn't warn about #address-cells.
> 
> Thanks for reviewing it.
> 
> After double-checking I realize that the correct fix would be to pass
> the phy address, like:
> 
> phy: ethernet-phy@1 {
> reg = <1>;
> 
> Since the Ethernet PHY address is design dependant, I can not make the
> fix myself.
> 
> I will try to ping the board maintainers for passing the correct phy address.
> 
> Thanks

Normally you should have been able to make all PHY addresses be 0. That
is the MDIO "broadcast address" and if there's a single PHY on the bus,
it should respond to that.

Citation:

IEEE 802.3-2015:

22.2.4.5.5 PHYAD (PHY Address)

The PHY Address is five bits, allowing 32 unique PHY addresses. The first PHY address bit transmitted and
received is the MSB of the address. A PHY that is connected to the station management entity via the
mechanical interface defined in 22.6 shall always respond to transactions addressed to PHY Address zero
<00000>. A station management entity that is attached to multiple PHYs must have prior knowledge of the
appropriate PHY Address for each PHY.

However, if you google "MDIO broadcast address", you'll find all sorts
of funny reports of buggy PHYs not adhering to that clause, under all
sorts of pretexts...

  reply	other threads:[~2021-07-23 13:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23 11:28 Fabio Estevam
2021-07-23 13:08 ` Vladimir Oltean
2021-07-23 13:15   ` Fabio Estevam
2021-07-23 13:35     ` Vladimir Oltean [this message]
2021-07-24  5:21     ` Joakim Zhang
2021-07-24 12:48       ` Fabio Estevam
2021-07-24 16:37   ` Florian Fainelli
2021-07-24 17:03     ` Vladimir Oltean
2021-07-24 19:14       ` Florian Fainelli

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=20210723133556.xnhhxdkvassykavn@skbuf \
    --to=olteanv@gmail.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=qiangqing.zhang@nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=shawnguo@kernel.org \
    --subject='Re: [PATCH net-next] ARM: dts: imx6qdl: Remove unnecessary mdio #address-cells/#size-cells' \
    /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

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).