-
Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers: ethernet: stm32: remove phy specific code #87593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: ethernet: stm32: remove phy specific code #87593
Conversation
44412ae to
24d4c5b
Compare
24d4c5b to
60cc0af
Compare
60cc0af to
ac5451d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, I had something similar in stock (but not upstreamed); I have published the branch here if you want to take a look: https://github.com/mathieuchopstm/zephyr/tree/stm32_ethernet_rework
This branch is more conservative in terms of changes to the ETH driver, but uses some macrobatics in the MDIO driver to share the ETH_HandleTypeDef with its parent controller (saves RAM as the structure is quite large, but inhibits usage as a general-purpose MDIO; maybe an in-between solution could be found).
Another change I did was rename all "MDIO"-related stuff to clearly emphasize that this driver is for the MDIO controller built into the Ethernet IP (as opposed to the dedicated "general-purpose" MDIO controllers found on STM32H7) - this could be appreciated, but is mostly cosmetic, so not that important.
f73739c to
11d3101
Compare
|
I checked |
add mdio for legacy stm32 api Signed-off-by: Fin Maaß <[email protected]>
The api takes care, if the mdio bus_enable and bus_disable are not needed, so there is no need to have tis in the driver. Signed-off-by: Fin Maaß <[email protected]>
add mdio and phy node to every stm32board that supports ethernet. Also set the phy-handle for every ethernet mac. Signed-off-by: Fin Maaß <[email protected]>
mac and mdio are now on the same level, this way phy-handle can be used. Signed-off-by: Fin Maaß <[email protected]>
move stmmaceth clock to parent, so it can also be used by mdio and rename it to ``stm-eth``. Signed-off-by: Fin Maaß <[email protected]>
11d3101 to
f098ec2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in current state. Very minor nits in the log messages:
rewirte code and remove code that use internal phy functions. A few Kconfig options got removed, that are now set by the phy via the DT. Signed-off-by: Fin Maaß <[email protected]>
make stm32 mdio driver more independent Signed-off-by: Fin Maaß <[email protected]>
unfortunatly HAL_ETH_SetMDIOClockRange() isn't available in the V1 API, so I had to copy the parts from the hal. Signed-off-by: Fin Maaß <[email protected]>
update migration guide for changes of the stm32 ethernet driver. Signed-off-by: Fin Maaß <[email protected]>
1175ae3
f098ec2 to
1175ae3
Compare
|
applied suggested changes by @mathieuchopstm |
Uh oh!
There was an error while loading. Please reload this page.