]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: enetc: set the external PHY address in IERB for port MDIO usage
authorWei Fang <wei.fang@nxp.com>
Wed, 19 Nov 2025 10:25:55 +0000 (18:25 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 26 Nov 2025 01:44:47 +0000 (17:44 -0800)
commit6633df05f3ade81474d55acd712431b63182d858
tree4629084369494317d8363ce5a42f33b2e3335e23
parentf0054f7bb9cd334c4d56ad6a56b9c3845cd65b9b
net: enetc: set the external PHY address in IERB for port MDIO usage

The ENETC supports managing its own external PHY through its port MDIO
functionality. To use this function, the PHY address needs be set in the
corresponding LaBCR register in the Integrated Endpoint Register Block
(IERB), which is used for pre-boot initialization of NETC PCIe functions.
The port MDIO can only work properly when the PHY address accessed by the
port MDIO matches the corresponding LaBCR[MDIO_PHYAD_PRTAD] value.

Because the ENETC driver only registers the MDIO bus (port MDIO bus) when
it detects an MDIO child node in its node, similarly, the netc-blk-ctrl
driver only resolves the PHY address and sets it in the corresponding
LaBCR when it detects an MDIO child node in the ENETC node.

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