-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Add support for 'fixed link' configuration on Kinetics MCUX ENET driver #24460
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
Add support for 'fixed link' configuration on Kinetics MCUX ENET driver #24460
Conversation
This comment has been minimized.
This comment has been minimized.
jukkar
left a comment
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.
Please fix also checkpatch warnings.
|
I need to look at the DT stuff, but think it can be handled possibly as a child. you can see something like dts/bindings/mtd/partition.yaml |
36d28ab to
8e7681f
Compare
8e7681f to
1548ce7
Compare
1548ce7 to
2705ee6
Compare
|
@lmajewski: I usually all for having well-split, dine-detail commits, but sometimes, you can split too much. Your commit "eth: mcux: Support devices not using SMI for PHY setup" says in description "This change introduces a new Kconfig define - CONFIG_ETH_MCUX_NO_PHY_SMI", but it actually doesn't, and thus references an unknown CONFIG_* option. Bottom line: please squash "eth: Kconfig: Add new ETH_MCUX_NO_PHY_SMI Kconfig option" into that commit. (The rest seems to be ok.) |
|
@lmajewski: Also, while doing the above, please consider whether it's worth to name the option CONFIG_ETH_MCUX_NO_PHY_SMI, maybe it makes sense to cut the negation, name it CONFIG_ETH_MCUX_PHY_SMI, have it "y" be default, and just disable for platforms where needed. Well, might worth asking @MaureenHelm whether she thinks that's anyhow important. |
|
@jukkar: It seems that your previous comments were addressed, can you have a look and maybe dismiss your -1 to motivate other reviewers to look further into this? |
I will squash those commits - thanks for pointing this out
As the eth_mcux.c driver uses PHY_SMI for all NXP SoCs excluding only DSA case - I think that it is more readable to use straight logic and put all the necessary code under Otherwise, we would have negation in the To sum up: |
I would disagree with that, it's easier to deal with standard language syntax of That said, as long as that option is considered, and you have arguments to prefer the current situation, it sounds good to me. |
Please correct me if I've misunderstood something - you are OK to keep things as they are proposed in this patch set (as I've pointed out arguments for such situation). However, you disagree with the generic approach to have CONFIG_* names with negation in them and you prefer to use |
Some ICs - like DSA switches (e.g. ksz8794) - do not use SMI to setup and configure PHY. This change introduces a new Kconfig define - CONFIG_ETH_MCUX_NO_PHY_SMI - to allow replacing SMI communication with SPI or I2C. Signed-off-by: Lukasz Majewski <[email protected]>
The ip_k66f board has KSZ8794 connected to K66F's enet, which requires fixed link operation. Signed-off-by: Lukasz Majewski <[email protected]>
This patch adds description for 'fixed-link' node in ethernet DTS node. It supports setting speed and duplex. Signed-off-by: Lukasz Majewski <[email protected]>
This commit enables support for parsing 'fixed-link' node when it is added to node described in 'ethernet,fixed-link.yaml'. Signed-off-by: Lukasz Majewski <[email protected]>
This commit adds support for setting fixed configuration, read from device tree, for ENET ETH interface and PHY. Signed-off-by: Lukasz Majewski <[email protected]>
This change adds the 'fixed-link' sub-node of the ip_k66f board's ethernet node. The fixed link is set to work with 100 Mbps and full duplex. Signed-off-by: Lukasz Majewski <[email protected]>
Yes.
Yes, I just share my personal opinion on that matter. Maybe you'll find some merit in it and consider it next time (maybe not). Likewise, I'm listening to arguments of others. All that should help make the project better/more consistent/easier to use for everyone. Bottom line: please make the commit squash discussed above. Then, from my side, I'd just like to test it on frdm_k64f (keeping fingers crossed that I'll have time for that this week). |
2705ee6 to
31585f7
Compare
agansari
left a comment
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.
Code looks okay, waiting for @pfalcon to test it to approve.
My comment related to Kconfig: I find the double negation sometimes harder to follow
#ifndef CONFIG_ETH_MCUX_NO_PHY_SMI
In logic a double negation is a truth statement, but it's not as clear and straight forward as a direct truth claim when following code.
pfalcon
left a comment
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.
Sorry for the delay here, tested on frdm_k64f with my usual tests - dumb_http_server, total ~5000 requests, and big_http_download, 3 iterations, total 20MB downloaded.
Ideally, I wish this was reviewed/approved by @agansari and/ot @MaureenHelm, but as this waited in queue for so long, let me cast +1 from me now.
MaureenHelm
left a comment
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 agree the double negative is confusing and I generally prefer to see positive logic in Kconfigs. But given that 3 networking folks have +1-ed this, I'm ok to keep it as it is.
Following changes to Kinetics MCUX ENET driver:
Disable usage of SMI to read status of PHY device.
Rationale:
Some devices - like DSA switches (ksz8794) use SPI for configuration and reading its status
(instead of MDIO). The current implementation of ENET driver (in eth_enet.c ) is very tightly coupled with SMI interrupts as they allow moving to the next stage of this driver's state machine. This change decouples driver logic from them when required.
Add support for 'fixed-link' DTS property
With this patch set the enet driver now supports setting fixed transmission parameters between
PHY (DSA) and ENET.
Please consider those changes as a preparatory work for DSA support for Zephyr.