Skip to content

Commit daf1ba6

Browse files
metapsychologenashif
authored andcommitted
ethernet: stm32: add MII mode
Add MII mode for STM32 Ethernet in Kconfig. Default is still RMII. Signed-off-by: Alexander Polleti <[email protected]>
1 parent 4d94257 commit daf1ba6

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

drivers/ethernet/Kconfig.stm32_hal

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,11 @@ config ETH_STM32_HAL_MAC5
7979
This is the byte 5 of the MAC address.
8080
endif
8181

82+
config ETH_STM32_HAL_MII
83+
bool "Use MII interface"
84+
depends on ETH_STM32_HAL
85+
help
86+
Use the MII physical interface instead of RMII.
87+
8288
endif # ETH_STM32_HAL
8389

drivers/ethernet/eth_stm32_hal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,11 @@ static struct eth_stm32_hal_dev_data eth0_data = {
421421
.PhyAddress = CONFIG_ETH_STM32_HAL_PHY_ADDRESS,
422422
.RxMode = ETH_RXINTERRUPT_MODE,
423423
.ChecksumMode = ETH_CHECKSUM_BY_SOFTWARE,
424+
#if defined(CONFIG_ETH_STM32_HAL_MII)
425+
.MediaInterface = ETH_MEDIA_INTERFACE_MII,
426+
#else
424427
.MediaInterface = ETH_MEDIA_INTERFACE_RMII,
428+
#endif
425429
},
426430
},
427431
.mac_addr = {

0 commit comments

Comments
 (0)