Skip to content
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

Conversation

jameswalmsley
Copy link

No description provided.

@jameswalmsley
Copy link
Author

@DerekSnell Could you take a look at this PR.
I am trying to get both network interfaces supported at the same time.

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.

@jameswalmsley jameswalmsley force-pushed the jw/rt1064/eth-multiple-interfaces branch from a37082a to c4b9f46 Compare July 6, 2023 12:33
@mmahadevan108
Copy link
Collaborator

@jameswalmsley Thank you for your contribution. While we review the PR can you help address the CI failures.

@jameswalmsley
Copy link
Author

@jameswalmsley Thank you for your contribution. While we review the PR can you help address the CI failures.

Will do, thanks.

#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 */
Copy link
Author

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
Copy link
Author

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.

Copy link
Contributor

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).

Comment on lines +41 to +46
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.
Copy link
Collaborator

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.

Copy link
Member

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

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Sep 10, 2023
@dleach02 dleach02 removed the Stale label Sep 12, 2023
@danieldegrasse
Copy link
Collaborator

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.

@MaureenHelm
Copy link
Member

@jameswalmsley can you fix the failed CI checks?

@dleach02
Copy link
Member

@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.

Copy link

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.

@github-actions github-actions bot added the Stale label Jan 30, 2024
@dleach02 dleach02 removed the Stale label Feb 7, 2024
Copy link

github-actions bot commented Apr 8, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

drivers: nxp_enet: Add configurability of ENET REFCLK NXP Ethernet eth_mcux poor performance
10 participants