From f6aa84508051a6b2a6d5339619618c37d7c3f3ea Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Fri, 18 Sep 2020 05:04:56 -0700 Subject: [PATCH] stm32f7:Allow the use of the Network Monitor via polling Not all boards have an interrupt line from the phy to the Soc. This commit allows the phy to be polled for link status. This may not work on all MAC/PHY combination that have mutually exclusive link management and operating modes. The STM32F7 and LAN8742AI do not have such a limitation. --- arch/arm/src/stm32f7/Kconfig | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm/src/stm32f7/Kconfig b/arch/arm/src/stm32f7/Kconfig index 09c8f9e2bd..3af3678d6f 100644 --- a/arch/arm/src/stm32f7/Kconfig +++ b/arch/arm/src/stm32f7/Kconfig @@ -1144,6 +1144,10 @@ config STM32F7_HAVE_ETHRNET bool default n +config STM32F7_HAVE_PHY_POLLED + bool + default n + config STM32F7_HAVE_RNG bool default n @@ -1402,6 +1406,7 @@ config STM32F7_ETHMAC depends on STM32F7_HAVE_ETHRNET select NETDEVICES select ARCH_HAVE_PHY + select STM32F7_HAVE_PHY_POLLED config STM32F7_FMC bool "FMC" @@ -5268,6 +5273,16 @@ config STM32F7_PHYINIT provide stm32_phyinitialize(); The STM32 Ethernet driver will call this function one time before it first uses the PHY. +config STM32F7_PHY_POLLING + bool "Support network monitoring by poling the PHY" + default n + depends on STM32F7_HAVE_PHY_POLLED + select ARCH_PHY_POLLED + ---help--- + Some boards may not have an interrupt connected to the PHY. + This option allows the network monitor to be used by polling the + the PHY for status. + config STM32F7_MII bool "Use MII interface" default n