Hello all,
I'm working on a custom i.MX6 board based on SabreSD.
I've been struggling with making the ethernet connection work for a couple of days now.
We're using KSZ9031RNX from Micrel as the PHY.
Schematics:
- Pin configuration is the same: RGMII, nRST, INT, CLK, etc.
- AVDDH = 3.3V, DVDDH = 2.5V, core = 1.2V using external regulator (MMPF0100 actually)
- Strappings:
PHY_ADD = 1
Mode = 1111: RGMII - advertise all capabilities
CLK125_EN: enabled
LED_MODE: tri-color dual mode
In U-Boot;
- I removed AR8031 related "mx6_rgmii_rework" lines and modified it for KSZ9031 using
the skew settings from another board with more or less the same length RGMII signals.
The link does not come up.
Then I tested the PHY in local loopback mode. After setting up the necessary registers (using mii
commands) and setting valid ipaddr and ethaddr parameters, I pinged my own address and it
seems to be OK.
=> mii write 1 9 1300
=> mii write 1 0 4140
=> ping 192.168.0.254
Using FEC device
host 192.168.0.254 is alive
So, does that mean RGMII interface is OK?
In kernel;
- I enabled Micrel PHY driver support from menuconfig and compiled that way. Other than that,
no changes really. No link again.
The following lines comes up in the console:
Configuring network interfaces... fec 2188000.ethernet eth0: Freescale FEC PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=2188000.ethernet:01, irq=-1)
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
And the following is the ifconfig output:
root@imx6qdlsolo:/# ifconfig
eth0 Link encap:Ethernet HWaddr BA:74:F7:68:38:76
inet addr:192.168.0.254 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:700 (700.0 B) TX bytes:700 (700.0 B)
Also, one funny thing is that when I make the PHY enter reset state, it says the link is up.
root@imx6qdlsolo:/# cd sys/class/gpio/
root@imx6qdlsolo:/sys/class/gpio# echo 25 > export
root@imx6qdlsolo:/sys/class/gpio# cd gpio25
root@imx6qdlsolo:/sys/class/gpio/gpio25# echo out > direction (the value seems to 0 by default)
root@imx6qdlsolo:/sys/class/gpio/gpio25# libphy: 2188000.ethernet:01 - Link is Up - 1000/Full
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Of course, actually it does not come up. What's up with that?
I can't locate the problem. Any help is appreciated.
Thanks in advance.
Durmus