-
Notifications
You must be signed in to change notification settings - Fork 7.8k
drivers: ethernet: phy: use default speeds props on the other phys #91572
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
Merged
fabiobaltieri
merged 11 commits into
zephyrproject-rtos:main
from
maass-hamburg:ethernet_phy_default_speeds_all_phys
Jul 24, 2025
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9b1c892
dts: bindings: ethernet: move adi,adin*11*.yaml
maass-hamburg 3563f8b
drivers: ethernet: phy: ar8031: remove fixed link mode
maass-hamburg ecd58ed
drivers: ethernet: phy: dts: split ethernet-phy.yaml
maass-hamburg 8490586
drivers: ethernet: remove phy_configure_link() usage
maass-hamburg cbfbfb7
drivers: ethernet: phy: put shared macro in shared header
maass-hamburg e09a927
drivers: ethernet: phy: ksz8081: use default speeds
maass-hamburg 20f8706
drivers: ethernet: phy: ar8031: use default speeds
maass-hamburg 37662b9
drivers: ethernet: phy: rtl8211f: use default speeds
maass-hamburg 0ec7e35
drivers: ethernet: phy: dp83825: use default speeds
maass-hamburg 55acf57
drivers: ethernet: phy: dp83867: use default speeds
maass-hamburg edc6013
drivers: ethernet: phy: microchip_vsc8541: use default speeds
maass-hamburg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright The Zephyr Project Contributors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Common fields for MIIPHY devices | ||
|
||
include: phy.yaml | ||
|
||
properties: | ||
reg: | ||
required: true | ||
description: PHY address | ||
default-speeds: | ||
type: string-array | ||
description: The selected speeds are used to configure the PHY during initialization | ||
enum: | ||
- "10BASE Half-Duplex" | ||
- "10BASE Full-Duplex" | ||
- "100BASE Half-Duplex" | ||
- "100BASE Full-Duplex" | ||
- "1000BASE Half-Duplex" | ||
- "1000BASE Full-Duplex" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
how about using conventional name supported_speeds or link_speeds?
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 is only used for configuring the phy on init, so these are the speeds that the phy will use by default, you can still configure the speeds later with
phy_configure_link()
and also set speeds that were not in default_speeds. By the way this is also how it is in phy_mii and this pr is extending it's functionality to the other physThere 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, I missed the reference to the phy_mii PR earlier. My rationale is as follows:
Currently, default_speeds is generated based on what the specific PHY driver defines in the device tree or YAML, and it is used as a parameter for phy_configure_link().
For example:
default-speeds:
default: ["10BASE Half-Duplex", "10BASE Full-Duplex", "100BASE Half-Duplex",
"100BASE Full-Duplex"]
In practice, users or customers interpret these values as the supported speeds of the specific PHY. Referring to them as "default" is not ideal, as "default" suggests a fallback or initial value, rather than the complete set of speeds the PHY is capable of.
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.
if the user doesn't provide
default-speeds
, we will do auto negotiation with all supported speeds of the phy. That btw is also the default behavior of the phy (based on the registers) if we don't configure it.also the phy_mii phy was doing phy_configure_link() with all supported speeds before #89210 and to preserve that behavior, these got set as the default, if the user didn't changed the prop in the dts.