Re: [PATCH 7/9] net: mdio: ipq4019: program phy address when "fixup" defined

From: Andrew Lunn
Date: Wed Nov 15 2023 - 11:17:32 EST


On Wed, Nov 15, 2023 at 11:25:13AM +0800, Luo Jie wrote:
> The PHY/PCS MDIO address can be programed when the property
> "fixup" of phy node is defined.
>
> The qca8084 PHY/PCS address configuration register is accessed
> by MDIO bus with the special MDIO sequence.
>
> The PHY address configuration register of IPQ5018 is accessed
> by local bus.
>
> Add the function ipq_mdio_preinit, which should be called before
> the PHY device scanned and registered.

I'm not convinced this belongs in the MDIO bus driver. Its really a
PHY property, so i think all this should be in the PHY driver. If you
specify the PHY ID in the compatible string, you can get the driver
loaded and the probe function called. You can then set the PHY
address.

Andrew