Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no MDIO, no PHY, no Ethernet on BeagleBoneBlack with Kernel >5 (tested on 5.4 and 5.10) #50

Open
Rockstein2 opened this issue Aug 14, 2021 · 4 comments

Comments

@Rockstein2
Copy link

Sorry if already there. Google could not really help me. Everything was out of date.
On my BeagleBoneBlack Board Rev. B6 with AM3358BZCZ100 the MDIO does not come up with kernel 5.4 and 5.10.

dmesg says following
mdio_bus 4a101000.mdio: MDIO device at address 0 is missing
phy "/ocp/interconnect@4a0000/segment@0/target-module@100000/ethernet@0/mdio@1000/ethernet-phy@0" not found on slave 0

I changed in /arch/arm/boot/dts/am335x-bone-common.dtsi under "ethphy0: ethernet-phy@0" reg = <0> to reg = <2>. After that everything was ok. I am not sure if I have fixed it correctly. Maybe it is better to overlay it in am335x-boneblack.dts because the am335x-bone-common.dtsi is included by several boards.

It took me a while to find it.

Again the correct section am335x-bone-common.dtsi
&davinci_mdio {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&davinci_mdio_default>;
pinctrl-1 = <&davinci_mdio_sleep>;
status = "okay";

ethphy0: ethernet-phy@0 {
	reg = <2>;
};
@RobertCNelson
Copy link
Owner

RobertCNelson commented Aug 14, 2021

Actually, it is zero..... The phy is buggy, there is a patch in the tree which tries to rediscover it, but it's broken with ti latest changes.. what uname -r are to booting with.. there is a better fix in uboot I'm going to start moving to that.

patch: https://github.com/RobertCNelson/ti-linux-kernel-dev/blob/ti-linux-4.14.y/patches/drivers/ti/cpsw/0001-cpsw-search-for-phy.patch

u-boot fix: https://github.com/u-boot/u-boot/blob/master/board/ti/am335x/board.c#L677-L703

@Rockstein2
Copy link
Author

Thanks for the quick reply. Surprisingly it still worked with 5.4.40 from a year ago.
By "PHY is buggy" you mean the power on problem, which comes very rarely after PowerUp? It is due to duration of SYS_RESET pulse and I have seen somewhere a HW solution with capacitor.
Anyway thanks for your great work.

@boneblackbeagle
Copy link

I have this issue with 5.10.168-ti-r77.
On U-boot I see : Net: eth2: ethernet@4a100000, eth3: usb_ether
I can fix the issue with the following in the debug terminal : sudo gpioset gpiochip1 8=0
After this command the led-s of the Ethernet starts blinking and after a reboot I have working network.

Maybe the reset-deassert-us = <6500>; is not enough in the am335x-bone-common.dtsi ?

Another interesting thing is that with 5.10.168-ti-r72 works well all the time.

@boneblackbeagle
Copy link

I have changed the reset-deassert-us = <6500>; to reset-deassert-us = <10500>; and still working after about a 20 cycle with 1 min off time between two startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants