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

NXP_ENET driver initialization fails with fixed link phy_mii #87237

Closed
ofirshe opened this issue Mar 17, 2025 · 0 comments · Fixed by #87242
Closed

NXP_ENET driver initialization fails with fixed link phy_mii #87237

ofirshe opened this issue Mar 17, 2025 · 0 comments · Fixed by #87242
Assignees
Labels
area: Ethernet bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug

Comments

@ofirshe
Copy link
Contributor

ofirshe commented Mar 17, 2025

Describe the bug
On our custom board with the NXP RT1061 microcontroller, we use ENET2 as the Ethernet controller. The board includes a switch that requires no additional configuration, so I set the fixed-link property in the device tree as follow:

&enet2_mac {
	status = "okay";
	pinctrl-0 = <&pinmux_enet2>;
	pinctrl-names = "default";
	phy-handle = <&phy>;
	phy-connection-type = "rmii";
	zephyr,random-mac-address;
};

&enet2_mdio {
	status = "okay";
	pinctrl-0 = <&pinmux_enet2_mdio>;
	pinctrl-names = "default";
	phy: phy@0 {
		compatible = "ethernet-phy";
		reg = <0>;
		status = "okay";
		fixed-link = "100BASE-T Full-Duplex";
	};
};

However, during initialization, eth_nxp_enet_init calls nxp_enet_phy_init, which executes phy_mii_cfg_link, attempting MDIO read/write operations despite the fixed-link configuration. This results in an EIO error, causing the NXP_ENET driver to fail.

Expected behavior
The Ethernet driver should successfully initialize without attempting MDIO operations when the link is configured as a fixed link.

Impact
The Ethernet initialization fails, preventing the board from using the Ethernet connection, which impacts network functionality.

Environment (please complete the following information):

  • OS: Windows
  • Toolchain: Zephyr SDK
  • Branch v4.1
@ofirshe ofirshe added the bug The issue is a bug, or the PR is fixing a bug label Mar 17, 2025
@ofirshe ofirshe changed the title phy_mii_cfg_link Should return 0 in case we have fixed link phy_mii_cfg_link should return 0 in case of fixed link Mar 17, 2025
@ofirshe ofirshe changed the title phy_mii_cfg_link should return 0 in case of fixed link NXP_ENET driver initialization fails with fixed link phy_mii Mar 17, 2025
@kartben kartben assigned dleach02 and unassigned maass-hamburg Mar 18, 2025
@kartben kartben added the priority: low Low impact/importance bug label Mar 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Ethernet bug The issue is a bug, or the PR is fixing a bug platform: NXP NXP priority: low Low impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants