This is an automated email from the ASF dual-hosted git repository.
michallenc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new b9421800aa5 arch/arm/imxrt: fix PHY address scan and YT8512 macro typo
b9421800aa5 is described below
commit b9421800aa5ff5264f7a85d6cc5d739d403a63f6
Author: Sarthak Pandey <[email protected]>
AuthorDate: Fri Oct 16 01:58:25 2026 +0530
arch/arm/imxrt: fix PHY address scan and YT8512 macro typo
- In imxrt_determine_phy(), save the detected phyaddr into
priv->current_phy_address so address ranges in BOARD_ETH0_PHY_LIST
work properly.
- In imxrt_phyintenable(), fix CONFIG_ETH0_YT8512 to
CONFIG_ETH0_PHY_YT8512 to match the Kconfig symbol name.
Fixes #20692
Signed-off-by: Sarthak Pandey <[email protected]>
---
arch/arm/src/imxrt/imxrt_enet.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/src/imxrt/imxrt_enet.c b/arch/arm/src/imxrt/imxrt_enet.c
index a62ca540e88..143f415cf3e 100644
--- a/arch/arm/src/imxrt/imxrt_enet.c
+++ b/arch/arm/src/imxrt/imxrt_enet.c
@@ -2031,7 +2031,7 @@ static int imxrt_phyintenable(struct imxrt_driver_s *priv)
{
#if defined(CONFIG_ETH0_PHY_KSZ8051) || defined(CONFIG_ETH0_PHY_KSZ8061) || \
defined(CONFIG_ETH0_PHY_KSZ8081) || defined(CONFIG_ETH0_PHY_DP83825I) || \
- defined(CONFIG_ETH0_YT8512) || defined(CONFIG_ETH0_PHY_LAN8720) || \
+ defined(CONFIG_ETH0_PHY_YT8512) || defined(CONFIG_ETH0_PHY_LAN8720) || \
defined(CONFIG_ETH0_PHY_LAN8742A) || defined(CONFIG_ETH0_PHY_MULTI)
uint16_t phyval;
@@ -2044,7 +2044,7 @@ static int imxrt_phyintenable(struct imxrt_driver_s *priv)
uint8_t wreg = rreg;
/* Compile time YT8512 defaults */
-# if defined(CONFIG_ETH0_YT8512)
+# if defined(CONFIG_ETH0_PHY_YT8512)
mask = MII_YT8512_IMR_LD_EN | MII_YT8512_IMR_LU_EN;
rreg = MII_YT8512_ISR;
wreg = MII_YT8512_IMR;
@@ -2312,6 +2312,7 @@ static int imxrt_determine_phy(struct imxrt_driver_s
*priv)
(phydata & 0xfff0) ==
(g_board_phys[priv->current_phy].id2 & 0xfff0))
{
+ priv->current_phy_address = phyaddr;
return OK;
}
}