I have a board with Sitara AM3352 - the networking is not via Ethernet PHY, but with a switch (Marvell 88E6341) that is connected to the CPU with MII. the switch has a port that is connected to a PHY and RJ45 connector.
My Linux version is 4.14
I configured the dts file correctly for having a network, but I also want the MDIO driver to be active so I will be able to manage the switch.
It looks like I can interact the Sitara MDIO controller with "devmem" commands, but I prefer to do it the "normal" way with the kernel devinci-mdio driver.
My dts looks like this:
&cpsw_emac0 {
phy_id = <&davinci_mdio>, <0>;
fixed-link = <1 1 100 0 0>;
phy-mode = "mii";
};
&mac {
slaves = <1>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
status = "okay";
};
&davinci_mdio {
compatible = "ti,cpsw-mdio";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";
};
This what I get in the dmesg:
[ 0.975182] mdio_bus fixed-0: GPIO lookup for consumer reset
[ 0.975195] mdio_bus fixed-0: using lookup tables for GPIO lookup
[ 0.975202] mdio_bus fixed-0: lookup for GPIO reset failed
[ 0.975223] libphy: Fixed MDIO Bus: probed
[ 0.994386] mdio_bus 4a101000.mdio: GPIO lookup for consumer reset
[ 0.994398] mdio_bus 4a101000.mdio: using lookup tables for GPIO lookup
[ 0.994405] mdio_bus 4a101000.mdio: lookup for GPIO reset failed
[ 1.047323] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 1.055025] davinci_mdio 4a101000.mdio: no live phy, scanning all
[ 1.061484] davinci_mdio 4a101000.mdio: mdiobus_register ret=-5
I think it is rather common such design - so if anybody managed to handle this issue, I will much appreciate it if he will share the knowledge. Thanks