Skip to content

drivers: mdio_nxp_enet_qos: Add Clause 45 support. #93442

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PetervdPerk-NXP
Copy link
Contributor

Adds support for CL45 enabled PHY's for the nxp_enet_qos mac.
By adding handlers for C45 read/write.

bperseghetti
bperseghetti previously approved these changes Jul 21, 2025
@@ -111,8 +131,7 @@ static int do_transaction(struct mdio_transaction *mdio)
return ret;
}

static int nxp_enet_qos_mdio_read(const struct device *dev,
uint8_t portaddr, uint8_t regaddr,
static int nxp_enet_qos_mdio_read(const struct device *dev, uint8_t portaddr, uint8_t regaddr,
uint16_t *read_data)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should probably avoid doing these kinds of whitespace changes in the commit with the functional changes. Challenges the reviewer to stare at this more to confirm there is not functional change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I’m an avid clang-format user, which automatically formats code. Apparently, the original code was checked in unformatted.

dleach02
dleach02 previously approved these changes Jul 21, 2025
Adds handler for C45 read/write phy transactions.

Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Copy link

@bperseghetti
Copy link
Member

bperseghetti commented Jul 22, 2025

Alright, upstream break on main is fixed/reverted, CI is green again @dleach02

Copy link
Member

@manuargue manuargue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Just a nit about naming in the struct mdio_transaction, you could have uint16_t regaddr that store both the u8 regaddr for c22 and the u16 regaddr for c45, and a uint8_t devaddr that stores the device addr for c45 and is not used in c22. No functional difference, just to not have two regaddr/regaddr_c45.

@bperseghetti bperseghetti requested a review from dleach02 July 23, 2025 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: MDIO platform: NXP Drivers NXP Semiconductors, drivers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants