-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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: eth_mcux: support multiple ethernet interfaces at once #60073
drivers: ethernet: eth_mcux: support multiple ethernet interfaces at once #60073
Conversation
@DerekSnell Could you take a look at this PR. This is required to make the driver build. However I'm also seeing issues where I can only ping a single interface at the same time. I'd like to debug this issue, and fix in this PR. |
a37082a
to
c4b9f46
Compare
c4b9f46
to
7ac54cf
Compare
@jameswalmsley Thank you for your contribution. While we review the PR can you help address the CI failures. |
Will do, thanks. |
soc/arm/nxp_imx/rt/soc_rt10xx.c
Outdated
#endif | ||
|
||
#if DT_NODE_HAS_STATUS(DT_NODELABEL(enet2), okay) && CONFIG_NET_L2_ETHERNET | ||
#ifdef CONFIG_ETH_MCUX_RMII_EXT_CLK | ||
/* Set ENET2 ref clock to be generated by External OSC,*/ | ||
/* direction as output and frequency to 50MHz */ |
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.
I guess this comment is wrong..
#ifdef CONFIG_ETH_MCUX_RMII_EXT_CLK | ||
IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET1RefClkMode, true); | ||
IOMUXC_EnableMode(IOMUXC_GPR, kIOMUXC_GPR_ENET1TxClkOutputDir, false); | ||
#else |
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.
My understanding, is that when using an external refclk. The RefClkMode needs to be true, and OutputDir needs to be false.
When the RT1064 is generating the refclk then, RefClkMode should be false, and the OutputDir should be true.
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.
I'm working on a custom board with RT1052.
To use an external clock for Ethernet, I only have to configure kIOMUXC_GPR_ENET1TxClkOutputDir
as input (see #59841)
Without that, Ethernet is extremely slow (about few kbits/s).
config ETH_MCUX_REFCLK_50MHZ | ||
bool "Configure PHY Refclk Crystal is 50MHz (else 25MHz)" | ||
default n if ETH_MCUX_RMII_EXT_CLK | ||
default y | ||
help | ||
Setting this option will configure the PHY for a 50MHz refclk. |
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.
This belongs in device tree instead of kconfig IMO, and ETH_MCUX_RMII_EXT_CLK
probably as well.
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.
It does, but as a property for a phy, not the ethernet block, which this driver does not support right now
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Hi @jameswalmsley- I wanted to make you aware that @decsny has been doing some great work to rewrite to MCUX ENET driver to better support multiple phys. This driver is introduced in #62833. I wanted to make you aware since NXP is planning to transition to this driver, so improvements to the Ethernet support on RT10xx boards will likely come there. |
@jameswalmsley can you fix the failed CI checks? |
@jameswalmsley, will you be returning to this PR? We would like you to take a look at a recently merged #62833 PR which is rearchitecting the NXP Ethernet. It will allow specification of arbitrary phys. Our preference is for new NXP based Ethernet code be applied against this driver so we can deprecate the older driver. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
No description provided.