Project

General

Profile

Ethernet RMII2 working in u-boot, but not kernel

Added by dan mcgee over 10 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 Jonathan Cormier over 10 years ago

FYI, the kernel has very strict rules about formatting. In this case the use of tabs instead of spaces. Most of your patch is converting tabs to spaces which is a big no no for kernel code.
https://www.kernel.org/doc/Documentation/CodingStyle

-Jonathan

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier over 10 years ago

I'm having a hard time finding the actual change in the patch. If you could recreate your patch ignoring white space change that would be much appreciated.

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier over 10 years ago

Also do you plan on using the nand? You have a module that has the larger 512MB nand which requires the latest u-boot and kernel image to work (See the CONFIG_NAND_MITYARM_LARGE_PAGE_SUPPORT option for the kernel and the mityarm335x_4kpage build option for u-boot). If you don't plan on using the nand then you should be fine using the current u-boot and kernel image.

Also the HX model numbers support a higher clock frequency (800Mhz instead of 720MHz) which you can use if you use the 3.2 kernel.

http://support.criticallink.com/redmine/projects/armc8-platforms/wiki/Linux_Kernel
http://support.criticallink.com/redmine/projects/armc8-platforms/wiki/UBIFS_Nand_Boot#512MB-NAND

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

we are not using flash

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

commented out some of the pin mux structs and now Ethernet is working.

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

thank you for the support

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Alexander Block over 10 years ago

Could you post an updated patch to show what was changed to resolve the issue?

Thank you.

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

still a problem with usb on this branch.

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

the usb port is stable on tag cl_v3.2_AM335XPSP_04.06.00.07
but Ethernet will not work. usb is unstable on tip AM335XPSP_04.06.00.02 branch, but Ethernet will work.
Any ideas?

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier over 10 years ago

Are you applying your patch on top of these checkouts?

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier over 10 years ago

Dan,

We found a bug in our reference filesystem. I created a wiki page on it. Could you please apply the changes it describes and let us know if it solves your problem.
http://support.criticallink.com/redmine/projects/armc8-platforms/wiki/Using_USB_port

Note: If you have further problems please post some steps on how the problem occurs and a log showing the error messages.

Thanks
Jonathan

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

yes the udev update and script does restart the usb2 port. thanks for the patch.
usb is still unstable running /usb_test /dev/ttyACM0 test code.
/usb_test is stable under cl_v3.2_AM335XPSP_04.06.00.07
just a note the hokey-pokey.sh needs formatting(remove cr/ln).

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Bob Duke over 10 years ago

Dan,

Can you provide specific details on what you are doing to create the usb_test program and what device you have connected to /dev/ttyACM0? How are you determining USB is unstable?

Thanks,

-Bob

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

background:
usb_test runs all day on 3.2 kernel with git tag:cl_v3.2_AM335XPSP_04.06.00.07
on AM335XPSP_04.06.00.02 the following error occurs.(see below)

source code for usb_test is in the ~/board_test/usb_test.c
gcc usb_test.c -o usb_test // gcc is installed.
run ~/board_test/usb_test /devttyACM0

this is the error log:

Wrote data bytes size 11
read correct num[ 863.096633] ti81xx_interrupt 863: CAUTION: musb1: Babble Interrupt Occured
[ 863.105041] ti81xx_interrupt 864: Please issue long reset to make usb functional !!
[ 863.113057] ti81xx_interrupt 950: Babble: devtcl(80)Restarting musb....
of bytes 11
co[ 863.120043] usb 2-1: USB disconnect, device number 2
mpare - good dat[ 863.126992] evm_deferred_musb_restart 808: deferred musb restart musbid(1)
a
Wrote data bytes size 107
Error read bytes size should be 107, size was res -1
Resource temporarily unavailable
again sleep
[ 863.682633] usb 2-1: new full speed USB device number 3 using musb-hdrc
[ 863.823855] usb 2-1: New USB device found, idVendor=04d8, idProduct=000a
[ 863.830851] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 863.838312] usb 2-1: Product: CDC RS-232 Emulation Demo
[ 863.843768] usb 2-1: Manufacturer: Microchip Technology Inc.
[ 863.852667] cdc_acm 2-1:1.0: This device cannot do calls on its own. It is not a modem.
[ 863.861111] cdc_acm 2-1:1.0: ttyACM1: USB ACM device
Error read bytes size should be 107, size was res 0
Resource temporarily unavailable
again sleep
Error read bytes size should be 107, size was res 0
Resource temporarily unavailable
again sleep

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier over 10 years ago

Dan,

I found a patch on the 3.2 branch that may solve the problem your having. I pushed it to a new branch on our git "usb_fix_test". I tried to compile and test it on the board you gave us but it wouldn't get past "Waiting for root device /dev/mmcblk0p2...". So I'm missing some critical changes you made to the board and baseboard files. Please try out the patch and let me know if anything changes.

http://support.criticallink.com/gitweb/?p=linux-mityarm-335x.git;a=shortlog;h=refs/heads/usb_fix_test

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

downloading now, the wait on /dev/mmcblk.... is do to the gpio.cd and gpio.wp should be set to -EINVAL.

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

what does this patch address? in the 3.2 kernel the usb works great. the rmii2 ethernet is the problem.

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

i ran the patch on your mityarm board. I found the usb to be unstable, ethernet works.

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier over 10 years ago

I had meant that I pulled the patch from the 3.2 branch into the 3.1 branch where you already had ethernet working. How can I test this on our mityarm baseboard? I don't have a cdc device to plug in.

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

you can test this by running the usb_test /dev/ttyACM0

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier over 10 years ago

Dan, I don't have a /dev/ttyACM0 device. The only one i have is attached to your board. I'm currently trying to get the kernel to boot on your board. Your patch from above doesn't apply cleanly to the AM335XPSP_04.06.00.02 branch.

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

when you build the kernel add a usb cdc acm device.

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by dan mcgee over 10 years ago

in the config menu

RE: Ethernet RMII2 working in u-boot, but not kernel - Added by Jonathan Cormier over 10 years ago

What I meant was that we don't have a physical usb device that identifies itself as /dev/ttyACM0.

(1-25/44) Go to top
Add picture from clipboard (Maximum size: 1 GB)