Skip to content

NXP_ENET driver initialization fails with fixed link phy_mii #87237

Open
@ofirshe

Description

@ofirshe

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions