> > So it will access the MDIO bus of the PHY that is attached to the > > MAC. > > If that's the case, wouldn't the ioctl() calls "just work" even when > only the fixed-phy mdio bus and fake PHY are declared in the device > tree?
The fixed-link PHY is connected to the MAC. So the IOCTL calls will be made to the fixed-link fake MDIO bus. > OK, I think I've got a vague idea of how that would be done. > > [When it comes to device-tree stuff, I've learned that "a vague idea" > is pretty much the best I can manage. Nothing ever works the way I > think it's going to the first time, but with enough guesses I usually > get there.] There are plenty of examples to follow. e.g. arch/arm/boot/dts/vf610-twr.dts &fec0 { phy-mode = "rmii"; phy-handle = <ðphy0>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_fec0>; status = "okay"; mdio { #address-cells = <1>; #size-cells = <0>; ethphy0: ethernet-phy@0 { reg = <0>; }; ethphy1: ethernet-phy@1 { reg = <1>; }; }; }; So one Ethernet controller with an MDIO bus with two PHYs on it. It has a phy-handle pointing it is own PHY. &fec1 { phy-mode = "rmii"; phy-handle = <ðphy1>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_fec1>; status = "okay"; }; A second Ethernet, with phy-handle pointing to the second PHY on the other controllers MDIO bus. Andrew