From 7281d91fbc39928f123901a166565c1a39b3fa60 Mon Sep 17 00:00:00 2001 From: Mathieu David Date: Tue, 15 Apr 2025 14:38:56 +0200 Subject: [PATCH] Support ethernet without MDIO & MDC lines --- arch/arm/src/stm32h5/stm32_ethernet.c | 3 ++- arch/arm/src/stm32h7/stm32_ethernet.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/stm32h5/stm32_ethernet.c b/arch/arm/src/stm32h5/stm32_ethernet.c index ff193f57b17..41a88fb221a 100644 --- a/arch/arm/src/stm32h5/stm32_ethernet.c +++ b/arch/arm/src/stm32h5/stm32_ethernet.c @@ -3604,9 +3604,10 @@ static inline void stm32_ethgpioconfig(struct stm32_ethmac_s *priv) #if defined(CONFIG_STM32H5_MII) || defined(CONFIG_STM32H5_RMII) /* MDC and MDIO are common to both modes */ - +# ifndef CONFIG_STM32H5_NO_PHY stm32_configgpio(GPIO_ETH_MDC); stm32_configgpio(GPIO_ETH_MDIO); +# endif /* Set up the MII interface */ diff --git a/arch/arm/src/stm32h7/stm32_ethernet.c b/arch/arm/src/stm32h7/stm32_ethernet.c index 5b74a103285..476a5fb3eaa 100644 --- a/arch/arm/src/stm32h7/stm32_ethernet.c +++ b/arch/arm/src/stm32h7/stm32_ethernet.c @@ -3699,9 +3699,10 @@ static inline void stm32_ethgpioconfig(struct stm32_ethmac_s *priv) #if defined(CONFIG_STM32H7_MII) || defined(CONFIG_STM32H7_RMII) /* MDC and MDIO are common to both modes */ - +# ifndef CONFIG_STM32H7_NO_PHY stm32_configgpio(GPIO_ETH_MDC); stm32_configgpio(GPIO_ETH_MDIO); +# endif /* Set up the MII interface */