Part Number: AM3352
Other Parts Discussed in Thread: TPS65217
Hi,
I have a new design that needed the pin functions that where available on mii1, but only one ethernet, so I decided to use mii2 instead.
However, I struggle to get it working properly.
It kind of looks to be working if with these settings & configuring the phy with address 1 (hardware); (if I comment away cpsw_emac0, it just gets worse)
&cpsw_emac0 {
phy-handle = <ðphy0>;
phy-mode = "mii";
};
&cpsw_emac1 {
phy-handle = <ðphy1>;
phy-mode = "mii";
};
&mac {
slaves = <2>;
active_slave = <1>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&cpsw_default>;
pinctrl-1 = <&cpsw_sleep>;
status = "okay";
};
&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";
ethphy0: ethernet-phy@0 { // phy address is 0
reg = <0>;
};
ethphy1: ethernet-phy@1 { // phy address is 1
reg = <1>;
};
};
Boot log then gives me;
[ 9.846308] libphy: Fixed MDIO Bus: probed
[ 9.975304] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6, bus freq 1000000
[ 9.983611] libphy: 4a101000.mdio: probed
[ 9.988393] mdio_bus 4a101000.mdio: MDIO device at address 0 is missing.
[ 10.016097] davinci_mdio 4a101000.mdio: phy[1]: device 4a101000.mdio:01, driver unknown
[ 10.027407] cpsw 4a100000.ethernet: initialized cpsw ale version 1.4
[ 10.034132] cpsw 4a100000.ethernet: ALE Table size 1024
[ 10.045542] cpsw 4a100000.ethernet: Detected MACID = 14:42:fc:12:54:c1
..
udhcpc: started, v1.31.1
[ 55.194464] cpsw 4a100000.ethernet: initializing cpsw version 1.12 (0)
[ 55.203995] cpsw 4a100000.ethernet: phy "/ocp/interconnect@4a000000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@0" not found on slave 0
[ 55.242626] Generic PHY 4a101000.mdio:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=4a101000.mdio:01, irq=POLL)
udhcpc: sending discover
[ 55.536193] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready
udhcpc: sending discover
[ 58.417010] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 58.426268] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udhcpc: sending discover
udhcpc: no lease, failing
ifup: failed to bring up eth0
If I then configure the interface with ipconfig x.x.x.x netmask y.y.y.y the interface works.
But I don't think this is proper - the errors about not finding phy0 shouldn't be there, should they? I have tried so many combinations now, that I might be ready for the doctors
Is there anything obviously wrong in my set-up or does anyone know of a similar example? (I'm on kernel 5.9.16)