Forums » Software Development »
Ethernet RMII2 working in u-boot, but not kernel
Added by dan mcgee about 11 years ago
problem description:
no eth0 data begin transmitted on tx0 or tx1 lines, running with rmii2 configuration.
mac_control loopback not working.
ifconfig stats for eth0: showing tx counter incrementing, all other counters are zero.
- AM335XPSP_04.06.00.02 git working branch
- attached is git patch
- no changes to kernel's .config file.
-
---------------------- U-boot output showing Ethernet working with ping dhcp ---------------------
U-Boot# dhcp
phy name cpsw addr 1
phy name cpsw addr 2
link up on slave num 0 phy port 1, speed 100, full duplex gmii_sel 0xf5 sma2 0x0
sliver 0x4a100dc4 val 0x18021
link up on slave num 1 phy port 2, speed 100, full duplex gmii_sel 0xf5 sma2 0x0
sliver 0x4a100d84 val 0x18021
- BOOTP broadcast 1
DHCP client bound to address 10.1.0.26
U-Boot# ping 10.1.1.1
phy name cpsw addr 1
phy name cpsw addr 2
link up on slave num 0 phy port 1, speed 100, full duplex gmii_sel 0xf5 sma2 0x0
sliver 0x4a100dc4 val 0x18021
link up on slave num 1 phy port 2, speed 100, full duplex gmii_sel 0xf5 sma2 0x0
sliver 0x4a100d84 val 0x18021
Using cpsw device
host 10.1.1.1 is alive
U-Boot# printenv ipaddr
ipaddr=10.1.0.26
U-Boot# ping 10.1.0.163
phy name cpsw addr 1
phy name cpsw addr 2
link up on slave num 0 phy port 1, speed 100, full duplex gmii_sel 0xf5 sma2 0x0
sliver 0x4a100dc4 val 0x18021
link up on slave num 1 phy port 2, speed 100, full duplex gmii_sel 0xf5 sma2 0x0
sliver 0x4a100d84 val 0x18021
Using cpsw device
host 10.1.0.163 is alive
Replies (44)
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee about 11 years ago
on the board is a pic that is connected to /dev/ttyACM0
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier about 11 years ago
Yes, but you had suggested I test this on our devkit which we don't have such a pic.
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee about 11 years ago
ok we are know on the same page. let me see what i can come up with.
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Michael Williamson about 11 years ago
I would recommend that you guys sync up on your .config files for the kernel builds as well.
-Mike
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee about 11 years ago
the only change was the usb cdc device. attach is our .config file
kernel.config.txt (68.8 KB) kernel.config.txt |
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier about 11 years ago
Dan,
I compiled the 3.2 kernel for your board. The networking seems to be working for me (see below). Also the usb_test didn't break but it is reporting some errors. Did you see this when you tried it?
arm login: root Password: Last login: Sat Jan 1 00:00:23 UTC 2000 on ttyO0 Linux arm 3.2.0-00030-g1f98a91 #6 Tue Oct 29 11:25:39 EDT 2013 armv7l The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@arm:~# ls /dev/ttyACM0 /dev/ttyACM0 root@arm:~# ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 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:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) root@arm:~# ifconfig eth0 up [ 150.793975] PHY 0:01 not found [ 150.797546] [ 150.797546] CPSW phy found : id is : 0x7c0f1 root@arm:~# dhcliente[ 153.794342] PHY: 0:00 - Link is Up - 100/Full eth0 root@arm:~# ifconfig eth0 Link encap:Ethernet HWaddr 90:59:af:6d:b1:32 inet addr:10.0.102.33 Bcast:10.0.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING ALLMULTI MULTICAST MTU:1500 Metric:1 RX packets:32 errors:0 dropped:2 overruns:0 frame:0 TX packets:1 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:3304 (3.2 KiB) TX bytes:342 (342.0 B) Interrupt:40 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 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:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) root@arm:~# ls 1 board_test cdc-acm.ko hello2 musb-reset.c tmp usbreset work root@arm:~# cd board_test/ root@arm:~/board_test# ls Debug ethernet getIp getIp4 serial.c Makefile ethernet.c getIp.c getIp4.c usb_test Makefile~ ethernet2 getIp3 musb-reset.c usb_test.c Rules.make ethernet2.c getIp3.c serial usb_test.c.old root@arm:~/board_test# ./usb_test /dev/ttyACM0 port is open. Loop cnt 1 Wrote data bytes size 11 read correct num of bytes 11 compare - good data Wrote data bytes size 107 read correct num of bytes 107 compare - Error index 106 data is: 0 should be:35 Wrote data bytes size 593 read correct num of bytes 593 compare - Error index 592 data is: 0 should be:1f Loop cnt 2 Wrote data bytes size 11 read correct num of bytes 11 compare - good data Wrote data bytes size 107 read correct num of bytes 107 compare - Error index 106 data is: 0 should be:35 Wrote data bytes size 593 read correct num of bytes 593 compare - Error index 592 data is: 0 should be:1f Loop cnt 3 Wrote data bytes size 11 read correct num of bytes 11 compare - good data Wrote data bytes size 107 read correct num of bytes 107 compare - Error index 106 data is: 0 should be:35 Wrote data bytes size 593 read correct num of bytes 593 compare - Error index 592 data is: 0 should be:1f Loop cnt 4 Wrote data bytes size 11 read correct num of bytes 11 compare - good data Wrote data bytes size 107 read correct num of bytes 107 compare - Error index 106 data is: 0 should be:35 Wrote data bytes size 593 read correct num of bytes 593 compare - Error index 592 data is: 0 should be:1f Loop cnt 5 Wrote data bytes size 11 read correct num of bytes 11 compare - good data Wrote data bytes size 107 read correct num of bytes 107 compare - Error index 106 data is: 0 should be:35 Wrote data bytes size 593 read correct num of bytes 593 compare - Error index 592 data is: 0 should be:1f Loop cnt 6 Wrote data bytes size 11 read correct num of bytes 11 compare - good data Wrote data bytes size 107 read correct num of bytes 107 compare - Error index 106 data is: 0 should be:35 Wrote data bytes size 593 read correct num of bytes 593 compare - Error index 592 data is: 0 should be:1f Loop cnt 7 Wrote data bytes size 11 read correct num of bytes 11 compare - good data Wrote data bytes size 107 read correct num of bytes 107 compare - Error index 106 data is: 0 should be:35 Wrote data bytes size 593 read correct num of bytes 593 compare - Error index 592 data is: 0 should be:1f Loop cnt 8 Wrote data bytes size 11 read correct num of bytes 11 compare - good data Wrote data bytes size 107 read correct num of bytes 107 compare - Error index 106 data is: 0 should be:35 Wrote data bytes size 593 read correct num of bytes 593 compare - Error index 592 data is: 0 should be:1f
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee about 11 years ago
great, how did you test the ethernet?
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier about 11 years ago
- ifconfig eth0 up
- dhclient eth0
and then scp'd the kernel uImage file
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee about 11 years ago
which git tag do you use?
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee about 11 years ago
the error index are expected, no i/o (sign) attach
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier about 11 years ago
I based it off the mityarm-linux-v3.2 branch but also tested it using the cl_v3.2_AM335XPSP_04.06.00.07 tag that you mentioned and got the same results. I would highly recommend using the mityarm-linux-v3.2 branch though as there have been some changes since the tag that are for the som you are using.
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier about 11 years ago
Here is my version of your patch which was applied to the head of the mityarm-linux-v3.2 branch.
EDIT:
Attached again with proper extension.
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier about 11 years ago
I'm fairly certain the only difference with my patch is it doesn't mess up all the whitespace and so should cleanly apply to the branch.
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee about 11 years ago
thanks work great, but two questions:
1) why is the rmii2 pin mux being called from the baseboard_setup_can()?
2) baseboard_setup_enet is calling rgmii2 pin mux config?
i'm commented out the code in baseboard_setup_enet and inserted rmii2 pin config and removed rmii2 for baseboard_setup_can.
the ethernet stop working
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier about 11 years ago
Interesting, I tried fixing my typo and it breaks ethernet....
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier about 11 years ago
Dan,
I found the issue. There was a pin in conflict. The mmc2_wl12xx_init() was using one of the pins your rmii pin mux was using.
I've attached the original patch with my typo fixed. And a patch that disables some extra peripherals that you aren't using. This happens to clean up the omap_i2c omap_i2c.1: controller timed out message that was stalling boot for 6 seconds as well so now your system boots much faster. Go through each of the peripherals I disabled to make sure you don't use them.
You should be able to apply the patches to a fresh mityarm-linux-v3.2 checkout using the git am <patch dir>/00*.patch
command.
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier about 11 years ago
Also this is unrelated but your /etc/fstab file was corrupted on the sd card you sent to us and was throwing a few errors on boot.
root@arm:~/board_test# cat /etc/fstab # UNCONFIGURED FSTAB FOR BASE SYSTEM /dev/mmcblk0p2Â| Â| /Â| Â| Â| Â| Â| Â| Â| Â| Â| Â| autoÂ| Â| errors=remount-rroÂ| Â| 0Â| Â| 1 /dev/mmcblk0p1Â| Â| /boot/uboot autoÂ| Â| defaultsÂ| Â| Â| Â| Â| Â| Â| Â| Â| ÂÂ| Â| 0Â| Â| 0
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee about 11 years ago
thanks for the support great job. yes fstab need to be fixed along with omap-i2c timeout.
RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier about 11 years ago
Dan,
I noticed while working on your board that you are using debian as your root filesystem. Could you point me to where you got the base filesystem? Or any pointers on getting this to work?
I've found a helpful tutorial for the beaglebone that might prove useful. http://eewiki.net/display/linuxonarm/BeagleBone#BeagleBone-Debian7%28smallflash%29
- « Previous
- 1
- 2
- Next »