Re: [PATCH RFC net-next 3/6] net: hibmcge: create a software node for phy_led
From: Jijie Shao
Date: Wed Dec 17 2025 - 08:46:11 EST
on 2025/12/16 15:17, Andrew Lunn wrote:
On Mon, Dec 15, 2025 at 08:57:02PM +0800, Jijie Shao wrote:
+int hbg_mdio_init(struct hbg_priv *priv)
+{
+ struct device *dev = &priv->pdev->dev;
+ struct hbg_mac *mac = &priv->mac;
struct mii_bus *mdio_bus;
int ret;
@@ -281,7 +389,7 @@ int hbg_mdio_init(struct hbg_priv *priv)
mdio_bus->parent = dev;
mdio_bus->priv = priv;
- mdio_bus->phy_mask = ~(1 << mac->phy_addr);
+ mdio_bus->phy_mask = 0xFFFFFFFF; /* not scan phy device */
mdio_bus->name = "hibmcge mii bus";
mac->mdio_bus = mdio_bus;
I think you are taking the wrong approach.
Please consider trying to use of_mdiobus_register(). Either load a DT
overlay, or see if you can construct a tree of properties as you have
been doing, and pass it to of_mdiobus_register(). You then don't need
to destroy and create PHY devices.
Andrew
Ok, I will try like this
Thanks
Jijie Shao