Re: [PATCH] RFC: net: phy: of phys probe/reset issue

From: Grygorii Strashko
Date: Wed Oct 28 2020 - 20:23:24 EST


hi Andrew,

On 23/10/2020 23:10, Andrew Lunn wrote:
Yes there is: have your Ethernet PHY compatible string be of the form
"ethernetAAAA.BBBB" and then there is no need for such hacking.
of_get_phy_id() will parse that compatible and that will trigger
of_mdiobus_register_phy() to take the phy_device_create() path.

Yep. That does seem like the cleanest way to do this. Let the PHY
driver deal with the resources it needs.

Thanks you for your comments.

huh. I gave it try and some thinking. it works as W/A, but what does it mean in the long term?

Neither Linux documentation, neither DT bindings suggest such solution in any way
(and there is *Zero* users of ""ethernet-phy-id%4x.%4x" in the current LKML).
And the main reason for this RFC is really bad customer experience while migrating to the new kernels, as
mdio reset does not support multi-phys and phy resets are not working.

Following your comments, my understanding for the long term (to avoid user's confusions) is:
"for OF case the usage of 'ethernet-phy-id%4x.%4x' compatibly is became mandatory for PHYs
to avoid PHY resets dependencies from board design and bootloader".

Which in turn means - update all reference boards by adding ""ethernet-phy-id%4x.%4x" and add
new DT board files for boards which are differ by only PHY version.

:(

--
Best regards,
grygorii