Beaglebone Black Ethernet Phy Not Detected on Boot.

Just found this thread, adding my 2cents.

We are using kernel 3.8.13-bone30. We have seen many cases of ethernet issues, usually that the ethernet port does not come up at all (no lights). I would say it happens one out of every 20 boots. We are using a cape, but just to extend i/o and provide power.

If anyone has any suggestions or kernel versions that work better, help would be greatly appreciated. I am currently working on a workaround to make the beaglebone detect the lack of ethernet and reboot itself, but this could lead to some really long boot times, and not having the problem at all would be much better!

Well you should keep your 2cents if your running bone30, upgrade! :wink:
There's been a lot of fixes to the v3.8.x branch since Nov 2013.

Regards,

Hi, I’m a newbie in a Beaglebone world, I have Beaglebone black rev. B, no capes, usb power. Yesterday I downloaded and flashed debian instead of angstrom Debian (BeagleBone Black - 2GB eMMC) 2014-05-14 and today after power off and power on by power button on board I had this issue too… hardware reset helped, but it is not a solution…

[ 1.042332] davinci_mdio 4a101000.mdio: detected phy mask fffffffb

[ 25.164264] net eth0: initializing cpsw version 1.12 (0)
[ 25.166761] libphy: PHY 4a101000.mdio:00 not found
[ 25.172002] net eth0: phy 4a101000.mdio:00 not found on slave 0
[ 25.178425] libphy: PHY 4a101000.mdio:01 not found
[ 25.183605] net eth0: phy 4a101000.mdio:01 not found on slave 1
[ 25.201488] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready

So how can I fix it?

Regards,
Petra

I have encountered the same issue(s) on A6A boards.

I couldn’t find a patch, so I wrote this patch to update the device tree in the davinci_mdio driver in the 3.15.1 tree, it seems to correct it. I would welcome any input on a different approach.

diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 0cca9de…e5a9cdc 100644
— a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -39,6 +39,7 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/pinctrl/consumer.h>
+#include <linux/phy.h>

/*

  • This timeout definition is a worst-case ultra defensive measure against
    @@ -97,6 +98,10 @@ struct davinci_mdio_data {
    unsigned long access_time; /* jiffies */
    };

+#if IS_ENABLED(CONFIG_OF)
+static void davinci_mdio_update_dt_from_phymask(u32 phy_mask);
+#endif

Hello,
I’m using BBB board A5C, and kernel version 3.15.3-bone3.1. I also see ethernet PHY is not detected. Log as below:
Please refer detailed attached log.

[ 3.740457] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 3.746859] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[ 3.754398] libphy: 4a101000.mdio: probed
[ 3.758612] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver unknown
[ 3.767567] Detected MACID = 90:59:af:5c:61:78
[ 3.773165] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[ 3.779741] sr_init: No PMIC hook to init smartreflex
[ 3.785201] sr_init: platform driver register failed for SR
[ 3.794297] VFS: Cannot open root device “nfs” or unknown-block(0,255): error -6
[ 3.802114] Please append a correct “root=” boot option; here are the available partitions:
[ 3.810888] b300 1875968 mmcblk0 driver: mmcblk
[ 3.816464] b301 72261 mmcblk0p1 00000000-01
[ 3.822046] b302 1799280 mmcblk0p2 00000000-02
[ 3.827617] b310 1024 mmcblk0boot1 (driver?)
[ 3.833197] b308 1024 mmcblk0boot0 (driver?)
[ 3.838767] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)
[ 3.847616] CPU: 0 PID: 1 Comm: swapper Not tainted 3.15.3-bone3.1 #1
[ 3.854410] [] (unwind_backtrace) from [] (show_stack+0xb/0xc)
[ 3.862356] [] (show_stack) from [] (panic+0x65/0x170)
[ 3.869572] [] (panic) from [] (mount_block_root+0x1af/0x21c)
[ 3.877421] [] (mount_block_root) from [] (prepare_namespace+0xe9/0x128)
[ 3.886271] [] (prepare_namespace) from [] (kernel_init_freeable+0x1ab/0x1b8)
[ 3.895574] [] (kernel_init_freeable) from [] (kernel_init+0xb/0xb4)
[ 3.904060] [] (kernel_init) from [] (ret_from_fork+0x11/0x38)
[ 3.911998] drm_kms_helper: panic occurred, switching back to text console
[ 3.919217] —[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,255)

EthernetPhyNotDetected.txt (18.3 KB)

This is a known problem with V3.15 and NFS. We are working on finding a solution. First, you must build the SMSC driver into the kernel. Currently it is built as a kernel module which won’t work because you have to mount the rootfs to load the kernel module. That will eliminate the first issue:

3.758612] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver unknown

Next we are trying to find out why the network isn’t getting started. Looks like something to do with cpsw. Using the same MLO, u-boot, uEnv.txt and rootfs, V3.8.13-bone57 works just fine. Changing the kernel to V3.15.3-bone3, I get the same problem you have.

Regards,

John

Hello,

I’m on the Kernel 3.8.13-bone56 and I’ve still this problem :

Scanning for Btrfs filesystems
systemd-fsck[202]: rootfs: clean, 110431/966656 files, 771069/3864576 blocks
[ 7.665617] libphy: PHY 4a101000.mdio:00 not found
[ 7.670642] net eth0: phy 4a101000.mdio:00 not found on slave 0
[ 7.676834] libphy: PHY 4a101000.mdio:01 not found
[ 7.681844] net eth0: phy 4a101000.mdio:01 not found on slave 1

I’ve to reboot many times to get lucky …

I would like to know what this means ? Is it a electrical problems ? Can we monitor this ?

Hello,

I’m on the Kernel 3.8.13-bone56 and I’ve still this problem :

Scanning for Btrfs filesystems
systemd-fsck[202]: rootfs: clean, 110431/966656 files, 771069/3864576 blocks
[ 7.665617] libphy: PHY 4a101000.mdio:00 not found
[ 7.670642] net eth0: phy 4a101000.mdio:00 not found on slave 0
[ 7.676834] libphy: PHY 4a101000.mdio:01 not found
[ 7.681844] net eth0: phy 4a101000.mdio:01 not found on slave 1

I’ve to reboot many times to get lucky …

Hello Micka,

This almost sounds like a power issue. How are you powering your board, and what other peripherals are you using ?

Well, we made our own rs485 cap, and it also power the cap ( we took example of the lcd7). But I don’t why it will make problem…

Well, we made our own rs485 cap, and it also power the lcd7 and the beagle ( we took example of the lcd7). But I don’t why it will make problem…

FWIW I have seen this issue on occasions with many BBBs. Quite infrequent, but seemingly random. The only way out appears to be doing a hard reset (or power cycle).

Regards,

Dave.

Hey Micka,

how about the newly pushed out bone60?

Regards,

Hello John,
Thanks for info.

I found below configs are not set in 3.15 by default which were set in 3.8. If we set below configs in 3.15, it works including NFS.

CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_ROOT_NFS=y

optional:
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y

Hello John,
Thanks for info.

I found below configs are not set in 3.15 by default which were set in 3.8. If we set below configs in 3.15, it works including NFS.

CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_ROOT_NFS=y

optional:
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y

Hi Vishnu,

I found something similar to you. I enabled

CONFIG_IP_PNP
CONFIG_ROOT_NFS

Which gets me further and I see the login prompt, but now I get the following error:

INIT: /run/initctl is not a fifo

I did try the other config selections that you did and it didn’t make a difference for me. I’m using Robert Nelson’s Debian-v7.5-console-armhf rootfs.

Regards,
John

Hello John,
Thanks for info.

I found below configs are not set in 3.15 by default which were set in 3.8. If we set below configs in 3.15, it works including NFS.

CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_ROOT_NFS=y

optional:
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y

Hi Vishnu,

I updated to V3.15.4-bone4 and now I can login successfully. I still have some issues with systemd shutting down, but that is another issue.

Regards,
John

For your informations :

We think that we found where this problems come from . Our power Cap takes more time to provide the power that the Beagle need at the boot. We have to modify our CAP : release later the RESET .

which is what you have done in the REV A6A :

  1. Changed C24 to a 2.2uF capacitor. This extends the reset signal to solve an issue where some boards would not boot on power up.

Micka,

Also thx you Gerald, the bone60 deals better the problem at boot .

Micka,

I am using 3.15.0-rc8-bone1 kernel and I am experiencing the same problem with loosing eth occasionally. For some reasons I don’t want to use 3.8.* kernels. Can you recommend me some of these new kernel that do not replicate the issue? I am thinking of giving a try to the latest 3.16-rc5…

Well, I added that patch in "3.15.4-bone4" so "3.15.0-rc8-bone1"
doesn't include it. The latest from that branch is "3.15.6-bone5"

Regards,