ethernet: stm32: add MII mode

Add MII mode for STM32 Ethernet in Kconfig. Default is still RMII.

Signed-off-by: Alexander Polleti <metapsycholo@gmail.com>
This commit is contained in:
Alexander Polleti 2018-11-13 16:12:18 +01:00 committed by Anas Nashif
commit daf1ba6e52
2 changed files with 10 additions and 0 deletions

View file

@ -79,5 +79,11 @@ config ETH_STM32_HAL_MAC5
This is the byte 5 of the MAC address.
endif
config ETH_STM32_HAL_MII
bool "Use MII interface"
depends on ETH_STM32_HAL
help
Use the MII physical interface instead of RMII.
endif # ETH_STM32_HAL

View file

@ -421,7 +421,11 @@ static struct eth_stm32_hal_dev_data eth0_data = {
.PhyAddress = CONFIG_ETH_STM32_HAL_PHY_ADDRESS,
.RxMode = ETH_RXINTERRUPT_MODE,
.ChecksumMode = ETH_CHECKSUM_BY_SOFTWARE,
#if defined(CONFIG_ETH_STM32_HAL_MII)
.MediaInterface = ETH_MEDIA_INTERFACE_MII,
#else
.MediaInterface = ETH_MEDIA_INTERFACE_RMII,
#endif
},
},
.mac_addr = {