[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c6bce70b-c97a-1696-2113-61bd3ba6ae99@gmail.com>
Date: Wed, 7 Oct 2020 08:44:53 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Marco Felsch <m.felsch@...gutronix.de>,
Marek Vasut <marex@...x.de>, Rob Herring <robh+dt@...nel.org>
Cc: Oleksij Rempel <o.rempel@...gutronix.de>,
Andrew Lunn <andrew@...n.ch>, netdev@...r.kernel.org,
Russell King <linux@...linux.org.uk>,
linux-kernel@...r.kernel.org, mkl@...gutronix.de,
kernel@...gutronix.de, David Jander <david@...tonic.nl>
Subject: Re: PHY reset question
On 10/7/2020 3:47 AM, Marco Felsch wrote:
> Florian did you send a new version of those patches?
I did not because we had a good conversation with Rob over IRC and the
conclusion was that the only solution that scaled across drivers,
subsystems and type of resources (regulators, clocks, resets, etc.) was
to have a compatible string for the given device that contains the ID.
For Ethernet PHY or MDIO device nodes that is "ethernet-phyAAAA.BBBB".
When the bus determines the presence of such a compatible string it
needs to bypass the dynamic identification of the device and needs to
bind the PHY driver and the device instance directly. MDIO does that,
and so does I2C and SPI AFAICT with the modalias/compatible (there is
not a standardized way to runtime detect an I2C or SPI client anyway),
while PCI and USB do not, but arguably could in the future.
For the specific use case that I had which required turning on a clock
to the Ethernet PHY, I ended up modifying the firmware to provide that
compatible string "ethernetAAAA.BBBB" and have the driver request the
clock from its probe function:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/drivers/net/phy/bcm7xxx.c?id=ba4ee3c053659119472135231dbef8f6880ce1fb
--
Florian
Powered by blists - more mailing lists