ethernet: esp32: make phy a phandle of the ethernet device

Change the eth-phy definition so that the phy is pointed by a phandle
rather than a child node, make the phy device a child of mdio. This
makes more sense from a devicetree hirearchy where the phandles have to
be initialized before the device itself, allows keeping the priorities
in check with CHECK_INIT_PRIORITIES.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
Fabio Baltieri 2023-07-25 20:04:52 +00:00 committed by Chris Friedt
commit d7504ab474
3 changed files with 14 additions and 7 deletions

View file

@ -115,7 +115,10 @@
};
};
&eth {
&mdio {
pinctrl-0 = <&mdio_default>;
pinctrl-names = "default";
phy: phy {
compatible = "ethernet-phy";
status = "disabled";
@ -124,7 +127,6 @@
};
};
&mdio {
pinctrl-0 = <&mdio_default>;
pinctrl-names = "default";
&eth {
phy-handle = <&phy>;
};