Support ethernet without MDIO & MDC lines #16215
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Closes #16213
We have a board with an STM32H7 connected to an IC switch through RMII. This IC switch is also connected to an embedded Linux soc and the MDIO and MDC lines are connected to that SOC for configuration.
However the code in NuttX expects the MDIO / MDC lines and configures them unconditionally. When we comment out the lines while having the
CONFIG_STM32H7_NO_PHY
set it works for us.Impact
As far as I can tell, the MDIO and MDC lines should not be used when the option
CONFIG_STM32H7_NO_PHY
is set ? Not configuring the pins should therefore be the expected behavior.The changes are limited to STM32H7 and H5 because they are the only targets that I found that define a
NO_PHY
option.Testing
Tested by commenting out the two lines on a custom board with an STM32H7 running PX4 which is running on top of Nuttx. The STM32 is connected to an IC switch over RMII and the IC switch is configured from a second SOC running Linux. The Linux driver configures the IC switch.
Before the changes this setup didn't work, with the changes it works.