On 01/20/2017 03:30 PM, Andrew Lunn wrote:
> The mv88e6390 has two MDIO busses. The internal MDIO bus is used for
> the internal PHYs. The external MDIO can be used for external PHYs.
> The external MDIO bus will be instantiated if there is an
> "mdio-external" node in the device tree.
This looks fine, although I am not clear why we cannot utilize a
standard representation of a MDIO bus (with PHY devices as child nodes)
which has a specific compatible string, e.g:
marvell,mv88e6390-external-mdio, and that is a child node of the 6390
Ethernet switch itself, something like:
/* assuming this is, e.g: an independent or CPU EThernet MAC MDIO bus */
&mdio {
switch@0 {
compatible = "marvell,mv88e6390";
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
phy-handle = <phy0>;
reg = <0>;
};
};
mdio {
compatible = "marvell,mv88e6390-external-mdio";
#address-cells = <1>;
#size-cells = <0>;
phy0: phy@0 {
reg = <0>;
};
};
};
};
In both cases (your proposal) and this one, we still have a dependency
on the Ethernet switch driver being probed to create the internal and
external MDIO buses.
Thanks!
--
Florian