[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fe8fb314-de99-45c2-b71e-5cedffe590b0@lunn.ch>
Date: Tue, 27 May 2025 22:01:48 +0200
From: Andrew Lunn <andrew@...n.ch>
To: James Hilliard <james.hilliard1@...il.com>
Cc: netdev@...r.kernel.org, linux-sunxi@...ts.linux.dev,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Russell King <linux@...linux.org.uk>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Furong Xu <0x1207@...il.com>,
Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] net: stmmac: allow drivers to explicitly select
PHY device
On Tue, May 27, 2025 at 01:21:21PM -0600, James Hilliard wrote:
> On Tue, May 27, 2025 at 1:14 PM Andrew Lunn <andrew@...n.ch> wrote:
> >
> > On Tue, May 27, 2025 at 11:55:54AM -0600, James Hilliard wrote:
> > > Some devices like the Allwinner H616 need the ability to select a phy
> > > in cases where multiple PHY's may be present in a device tree due to
> > > needing the ability to support multiple SoC variants with runtime
> > > PHY selection.
> >
> > I'm not convinced about this yet. As far as i see, it is different
> > variants of the H616. They should have different compatibles, since
> > they are not actually compatible, and you should have different DT
> > descriptions. So you don't need runtime PHY selection.
>
> Different compatibles for what specifically? I mean the PHY compatibles
> are just the generic "ethernet-phy-ieee802.3-c22" compatibles.
You at least have a different MTD devices, exporting different
clocks/PWM/Reset controllers. That should have different compatibles,
since they are not compatible. You then need phandles to these
different clocks/PWM/Reset controllers, and for one of the PHYs you
need a phandle to the I2C bus, so the PHY driver can do the
initialisation. So i think in the end you know what PHY you have on
the board, so there is no need to do runtime detection.
What you might want however is to validate the MTD device compatible
against the fuse and return -ENODEV if the compatible is wrong for the
fuse.
Andrew
Powered by blists - more mailing lists