Subject: Re: Micrel KSZ8031 - phy link missing

From: Angelo Dureghello <[email-masked]>
Date: Fri, 10 Oct 2014 14:54:18 +0200

Dear Bruno,

i added the fixup, nothing changes.
I am tracing flags at ksz8021_config_ini:

Starting network...
davinci_mdio davinci_mdio.0: resetting idled controller
micrel.c: ksz8021_config_init: flags: 0x00000203
net eth0: attached PHY driver [Micrel KSZ8031] 
(mii_bus:phy_addr=davinci_mdio-0:00, id=221556)
udhcpc (v1.20.2) started
Sending discover...
Sending discover...
Sending discover...
No lease, failing

So, MICREL_PHY_50MHZ_CLK seems to be set.
I have the suspect that the clock is not received from the phy. 
Unfortunately i can't check
with the scope, the micrel chip is on a hidden part of the board.

 From what i remember, when i was trying to init emac/phy by devicetree, 
it was working.

[root@barix ~]# cat /sys/class/net/eth0/carrier
0
[root@barix ~]# cat /sys/class/net/eth0/carrier_changes
1
[root@barix ~]#

I realize at this point is my own debugging / issue.
But if you have any idea how to debug this, i can put some traces here 
and there.

Still many thanks,
Angelo

On 10/10/2014 13:32, Bruno Thomsen wrote:
> Hey again,
> Looks like you just enable clock output from DA850. You also need to setup PHY to accept RMII clock from MAC.
> This can be done with something like this...
>
> ...
>   
>