RE: [PATCH net-next 0/3] net: enetc: add port MDIO support for both i.MX94 and i.MX95

From: Wei Fang

Date: Thu Oct 30 2025 - 21:49:10 EST


> > Similar to the external MDIO registers, each ENETC has a set of internal
> > MDIO registers to access its on-die PHY (PCS), so internal MDIO support
> > is also added.
>
> Any reason to not just hard code it to 0?
> What is the reset default?
>

For internal MDIO interface, the PHY address is fixed and we do not
get the internal PHY address from the DT. The only part of this patch
set related to internal MDIO is changing the base of the IMDIO register.
See patch 3:

- mdio_priv->mdio_base = ENETC_PM_IMDIO_BASE;
+
+ if (is_enetc_rev1(pf->si))
+ mdio_priv->mdio_base = ENETC_PM_IMDIO_BASE;
+ else
+ mdio_priv->mdio_base = ENETC4_PM_IMDIO_BASE;

> DT describes hardware, not configuration. So getting this from DT
> seems wrong.
>

What we get from the DT is the external PHY address, just like the mdio
driver, this external PHY address based on the board, ENETC needs to
know its external PHY address so that its port MIDO can work properly.
So I do not think this is a configuration.