RE: [PATCH net-next 0/3] net: enetc: add port MDIO support for both i.MX94 and i.MX95
From: Wei Fang
Date: Mon Nov 03 2025 - 21:30:09 EST
> > > So you have up to 32 virtual MDIO busses stacked on top of one
> >
> > Theoretically, there are up to 33 virtual MDIO buses, 32 port MDIO +
> > 1 'EMDIO function'. The EMDIO function can access all the PHYs on
> > the physical MDIO bus.
>
> The EMDIO function sound dangerous. All the locking and PHY drivers
> assume they have exclusive access to a devices on the bus. Bad things
> will happen if they don't. And given how infrequently MDIO is
> typically used, such bugs are going to be hard to find.
>
> You might want to make the 32 port MDIOs and the EMDIO mutually
> exclusive, so you can eliminate those potential bugs.
>
When the PHY node is a child node of the ENETC node, ENETC will use
its port MDIO. When the PHY node is a child node of EMDIO, ENETC
will use EMDIO to access its PHY. Therefore, the DTS configuration
ensures mutual exclusion.