Common MDIO DT

Linux Drivers

Release Date
2023-07-22

To use multiple GEM→PHY connections using a common MDIO bus, please use the following devicetree convention:

gem0 {
......
	phy-handle = <&phya>;

	mdio {
		phya {
			reg = <0xa>;
		};

		phyb {
			reg = <0xb>;
		};
	};
};

gem1 {
.....
	phy-handle = <&phyb>;
};

Where:

→ gem0 is the instance whose phy management is being used (and whose MDC and MDI lines are connected to both PHYs)

→ gem0 is communicating via phya and gem1 is communicating via phyb

Note: For versions upto 2022.1, gem0 needs to come up before gem1 and stay up (because the MDIO interface is expected to be up first; otherwise, the dependent MAC-PHY link (gem1-phyb) will come up on next ifconfig up/down).

As a result of this gem0's runtime PM will not be effective if gem1 is still active in this configuration.

For versions starting 2022.2, probe order and PM suspend/resume order is automatically handled in the driver based on MDIO producer and consumer.