]> Gentwo Git Trees - linux/.git/commit
net: enetc: set external PHY address in IERB for i.MX94 ENETC
authorWei Fang <wei.fang@nxp.com>
Wed, 19 Nov 2025 10:25:56 +0000 (18:25 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 26 Nov 2025 01:44:47 +0000 (17:44 -0800)
commit50bfd9c06f0ff80e3ab6cfe6169d5ae2fe1afaa2
treef0ad6c5d750962eea2ab9cf3bb94d34cd027a080
parent6633df05f3ade81474d55acd712431b63182d858
net: enetc: set external PHY address in IERB for i.MX94 ENETC

NETC IP has only one external master MDIO interface (eMDIO) for managing
the external PHYs. ENETC can use the interfaces provided by the EMDIO
function or its port MDIO to access and manage its external PHY. Both
the EMDIO function and the port MDIO are all virtual ports of the eMDIO.

The difference is that the EMDIO function is a 'global port', it can
access all the PHYs on the eMDIO, but port MDIO can only access its own
PHY. To ensure that ENETC can only access its own PHY through port MDIO,
LaBCR[MDIO_PHYAD_PRTAD] needs to be set, which represents the address of
the external PHY connected to ENETC. If the accessed PHY address is not
consistent with LaBCR[MDIO_PHYAD_PRTAD], then the MDIO access initiated
by port MDIO will be invalid.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Link: https://patch.msgid.link/20251119102557.1041881-3-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/netc_blk_ctrl.c