This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Ethernet problem on custom Sitara AM3894 board

Other Parts Discussed in Thread: AM3894

Hi everyone,

I need a tip on how to solve a problem regarding ethernet configuration in kernel. I'm porting Android OS to custom Sitara AM3894 board and I'm having problem when I try to configure ethernet, to connect to network, with command netcfg. When I type netcfg I get this output message:

# netcfg
lo       UP    127.0.0.1       255.0.0.0       0x00000049
eth0     DOWN  0.0.0.0         0.0.0.0         0x00001002
eth1     DOWN  0.0.0.0         0.0.0.0         0x00001002
# netcfg eth0 up
PHY 0:01 not found
net eth0: could not connect to phy 0:01

Since I have already ported u-boot, for my board (boards  ethernets phy ID isn't 0x01 it's 0x1F). I made some changes to u-boots ethernet driver so he can work with my ethernet phy, and I've managed to get it work, since I'm able to boot kernel via TFTP. So it seems to me that phys ID could be a problem in Linux kernel. (I'm using TI816xevm board as a reference system for porting to my board, just to know)

In kernel log screen I even get this message which tells me that linux driver is aware of my ethernet phy :

davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
davinci_mdio davinci_mdio.0: detected phy mask 7fffffff
davinci_mdio.0: probed
davinci_mdio davinci_mdio.0: phy[31]: device 0:1f, driver unknown

My question is, is this PHY ID hard coded somewhere in ethernets driver, because command netcfg tries to communicate with phy that has that ID (0x01), but not with proper ID in this case, 0x1F!?

Kind regards,

Srdjan

  • Srdjan Radulovic said:

    davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    davinci_mdio davinci_mdio.0: detected phy mask 7fffffff

    davinci_mdio.0: probed
    davinci_mdio davinci_mdio.0: phy[31]: device 0:1f, driver unknown

    Can you provide more information about the PHY you are using? Please verify if you have enabled the respective driver in the kernel config.

    The supported PHY drivers can be found in the kernel menuconfig at:

    Device drivers -> Network device support -> PHY device support and infrastructure

  • Hi Vishveshwar Bhat,

    my PHY device is Lantiq XWAY PHY11G PEF 7072. And as I can see, in kernel menuconfig, there is no support for this PHY, unfortunately.

    Does  this mean that I need to write my own driver for this PHY or I can "hack"  the current driver, like this one for TI816xevm board?

    Kind regards,

    Srdjan

  • Hi,

    I was able to solve the problem with my PHY's physical ID. I found a definition of structure in code that hard coded phy_id to 0x01 and 0x02 (for the purpose of EVM board configuration). In file /kernel/arch/arm/mach-omap2/devices.c there is a structure:

    static struct emac_platform_data ti816x_emac1_pdata = {
        .rmii_en    =    0,
        .phy_id        =    "0:1f", /* ID changed from 0:01 to 0:1f */
    };

    After changing this parameter my ethernet  works fine!

    Best regards,

    Srdjan