public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: "Arınç ÜNAL" <arinc.unal@arinc9.com>
Cc: David Bauer <mail@david-bauer.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Landen Chao <Landen.Chao@mediatek.com>,
	DENG Qingfang <dqfext@gmail.com>,
	Sean Wang <sean.wang@mediatek.com>,
	Daniel Golle <daniel@makrotopia.org>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 2/2] dt-bindings: net: dsa: mediatek,mt7530: document MDIO-bus
Date: Sun, 30 Apr 2023 20:48:37 +0200	[thread overview]
Message-ID: <207753d6-cffd-4a23-be16-658d7c9ceb4a@lunn.ch> (raw)
In-Reply-To: <a6c6fe83-fbb5-f289-2210-6f1db6585636@arinc9.com>

> > Try setting ds->slave_mii_bus to the MDIO bus you register via
> > of_mdiobus_register().
> 
> That seems to be the case already, under mt7530_setup_mdio():
> 
> 	bus = devm_mdiobus_alloc(dev);
> 	if (!bus)
> 		return -ENOMEM;
> 
> 	ds->slave_mii_bus = bus;
> 
> The bus is registered with devm_of_mdiobus_register(), if that matters. (My
> current knowledge about OF or OF helpers for MDIO is next to nothing.)
> 
> The same behaviour is there.

Maybe take a look at what is going on in dsa_slave_phy_setup() and
dsa_slave_phy_connect().

The way i understand it, is it first looks in DT to see if there is a
phy-handle, and if there is, it uses it. If not, it assumes there is a
1:1 mapping between port number and PHY address, and looks to see if a
PHY has been found on ds->slave_mii_bus at that address, and uses it.

So i don't think you need to list the PHY, the fallback should be
used.

	Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-04-30 18:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-30 11:28 [PATCH 1/2] mt7530: register OF node for internal MDIO bus David Bauer
2023-04-30 11:28 ` [PATCH 2/2] dt-bindings: net: dsa: mediatek,mt7530: document MDIO-bus David Bauer
2023-04-30 12:34   ` Arınç ÜNAL
2023-04-30 12:44     ` Daniel Golle
2023-04-30 12:52       ` Arınç ÜNAL
2023-04-30 16:17     ` Arınç ÜNAL
2023-04-30 17:18       ` Andrew Lunn
2023-04-30 18:28         ` Arınç ÜNAL
2023-04-30 18:48           ` Andrew Lunn [this message]
2023-04-30 19:54             ` Arınç ÜNAL
2023-04-30 20:41               ` Andrew Lunn
2023-05-01  9:22               ` David Bauer
2023-05-01  9:28                 ` Arınç ÜNAL
2023-04-30 12:53   ` Arınç ÜNAL
2023-04-30 11:42 ` [PATCH 1/2] mt7530: register OF node for internal MDIO bus Daniel Golle
2023-04-30 14:14 ` 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=207753d6-cffd-4a23-be16-658d7c9ceb4a@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Landen.Chao@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arinc.unal@arinc9.com \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dqfext@gmail.com \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mail@david-bauer.net \
    --cc=matthias.bgg@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=sean.wang@mediatek.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