2011-09-21 10:19:27     Problems with phy (micrel 8051)

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-09-21 10:19:27     Problems with phy (micrel 8051)

Henning Hörentrup (GERMANY)

Message: 103477   

 

Hello

 

I've got a problem regarding the ethernet connection of my custom board based on bf526-ezkit. As phy I'm using the micrel 8051MNL (mii mode).

 

 

If I interrupt the boot-sequence and use the u-boot ping everything works fine.

 

 

 

U-Boot 2010.06-svn242 (ADI-2010R1-RC2) (Sep 12 2011 - 10:11:55)

 

 

 

CPU: ADSP bf526-0.2 (Detected Rev: 0.2) (spi flash boot)

 

Board: FHF_IP3

 

Support:   blackfin.uclinux.org/

 

Clock: VCO: 300 MHz, Core: 300 MHz, System: 100 MHz

 

RAM: 64 MiB

 

SF: Detected M25P128 with page size 256, total 16 MiB

 

In: serial

 

Out: serial

 

Err: serial

 

KGDB: [on serial] ready

 

Net: bfin_mac

 

Hit any key to stop autoboot: 0

 

bfin>

 

bfin>

 

bfin>

 

bfin> ping 192.168.40.1

 

Using bfin_mac device

 

host 192.168.40.1 is alive

 

bfin>

 

bfin>

 

bfin>

 

bfin>

 

bfin>

 

bfin> ping 192.168.40.2

 

Using bfin_mac device

 

host 192.168.40.2 is alive

 

bfin>

 

 

 

 

 

I'm also loading my uImage.ext2 via tftp successfully, what leads me to the conclusion, that my hardware design works. But after the kernel has booted, I'm not able to ping any host (beside localhost) anymore. Below follows my boot-sequence.

 

 

 

 

 

U-Boot 2010.06-svn242 (ADI-2010R1-RC2) (Sep 12 2011 - 10:11:55)

 

 

 

CPU: ADSP bf526-0.2 (Detected Rev: 0.2) (spi flash boot)

 

Board: FHF_IP3

 

Support:   blackfin.uclinux.org/

 

Clock: VCO: 300 MHz, Core: 300 MHz, System: 100 MHz

 

RAM: 64 MiB

 

SF: Detected M25P128 with page size 256, total 16 MiB

 

In: serial

 

Out: serial

 

Err: serial

 

KGDB: [on serial] ready

 

Net: bfin_mac

 

Hit any key to stop autoboot: 0

 

Using bfin_mac device

 

TFTP from server 192.168.40.34; our IP address is 192.168.40.111

 

Filename 'uImage.ext2'.

 

Load address: 0x1000000

 

Loading: #################################################################

 

#################################################################

 

#################################################################

 

##################################################

 

done

 

Bytes transferred = 3590775 (36ca77 hex)

 

## Booting kernel from Legacy Image at 01000000 ...

 

Image Name: Linux Kernel and ext2

 

Image Type: Blackfin Linux Kernel Image (gzip compressed)

 

Data Size: 3590711 Bytes = 3.4 MiB

 

Load Address: 00001000

 

Entry Point: 001be590

 

Verifying Checksum ... OK

 

Uncompressing Kernel Image ... OK

 

Starting Kernel at = 001be590

 

Linux version 2.6.35.7-ADI-2011R1-pre-svn247 (hh@FHF-Linix-HH) (gcc version 4.3.5 (ADI) ) #140 Wed Sep 21 14:47:32 CEST 2011

 

register early platform devices

 

bootconsole [early_shadow0] enabled

 

bootconsole [early_BFuart0] enabled

 

early printk enabled on early_BFuart0

 

Found mtd parition at 0x001d4000, (len=0xfdc000), moving to 0x02f24000

 

Board Memory: 64MB

 

Kernel Managed Memory: 64MB

 

Memory map:

 

fixedcode = 0x00000400-0x00000490

 

text = 0x00001000-0x00132f30

 

rodata = 0x00132f30-0x0018e4f4

 

bss = 0x0018f000-0x001a0728

 

data = 0x001a0728-0x001b4000

 

stack = 0x001b2000-0x001b4000

 

init = 0x001b4000-0x001d4000

 

available = 0x001d4000-0x02f24000

 

rootfs = 0x02f24000-0x03f00000

 

DMA Zone = 0x03f00000-0x04000000

 

Hardware Trace Active and Enabled

 

Boot Mode: 3

 

Blackfin support (C) 2004-2010 Analog Devices, Inc.

 

Compiled for ADSP-BF526 Rev 0.2

 

Blackfin Linux support by   blackfin.uclinux.org/

 

Processor Speed: 300 MHz core clock and 100 MHz System Clock

 

NOMPU: setting up cplb tables

 

Instruction Cache Enabled for CPU0

 

External memory: cacheable in instruction cache

 

Data Cache Enabled for CPU0

 

External memory: cacheable (write-back) in data cache

 

Built 1 zonelists in Zone order, mobility grouping off. Total pages: 11973

 

Kernel command line: root=/dev/mtdblock0 rw clkin_hz=25000000 debug earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=192.168.40.111:192.168.40.34:192.f

 

PID hash table entries: 256 (order: -2, 1024 bytes)

 

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

 

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

 

Kernel managed physical pages: 12068

 

Memory available: 45832k/65536k RAM, (128k init code, 1223k kernel code, 517k data, 1024k dma, 572k reserved)

 

Hierarchical RCU implementation.

 

RCU-based detection of stalled CPUs is disabled.

 

Verbose stalled-CPUs detection is disabled.

 

NR_IRQS:159

 

Configuring Blackfin Priority Driven Interrupts

 

console [ttyBF0] enabled, bootconsole disabled

 

console [ttyBF0] enabled, bootconsole disabled

 

Calibrating delay loop... 595.96 BogoMIPS (lpj=1191936)

 

pid_max: default: 32768 minimum: 301

 

Security Framework initialized

 

Mount-cache hash table entries: 512

 

Blackfin Scratchpad data SRAM: 4 KB

 

Blackfin L1 Data A SRAM: 16 KB (16 KB free)

 

Blackfin L1 Data B SRAM: 16 KB (16 KB free)

 

Blackfin L1 Instruction SRAM: 48 KB (35 KB free)

 

NET: Registered protocol family 16

 

i2c-core: driver [dummy] registered

 

Blackfin DMA Controller

 

ezkit_init(): registering device resources

 

bio: create slab <bio-0> at 0

 

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

 

i2c-core: driver [attiny-keypad] registered

 

i2c i2c-0: adapter [i2c-bfin-twi] registered

 

i2c 0-0034: uevent

 

attiny-keypad 0-0034: probe

 

input: attiny-keypad as /devices/platform/i2c-bfin-twi.0/i2c-0/0-0034/input/input0

 

i2c i2c-0: client [attiny-keypad] registered with bus id 0-0034

 

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400

 

Advanced Linux Sound Architecture Driver Version 1.0.23.

 

Switching to clocksource bfin_cs_cycles

 

NET: Registered protocol family 2

 

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

 

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

 

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

 

TCP: Hash tables configured (established 2048 bind 2048)

 

TCP reno registered

 

UDP hash table entries: 256 (order: 0, 4096 bytes)

 

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

 

NET: Registered protocol family 1

 

Setting up Blackfin MMR debugfs

 

JFFS2 version 2.2. (NAND) (SUMMARY) �© 2001-2006 Red Hat, Inc.

 

msgmni has been set to 89

 

io scheduler noop registered

 

io scheduler cfq registered (default)

 

bfin-jtag-comm: initialized

 

bfin-otp: initialized

 

bfin-dma: initialized

 

bfin_sport: registered sport0

 

bfin_sport: registered sport1

 

bfin-uart: Blackfin serial driver

 

bfin-uart.0: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART

 

brd: module loaded

 

uclinux[mtd]: RAM probe address=0x2f24000 size=0xfdc000

 

Creating 1 MTD partitions on "RAM":

 

0x000000000000-0x000000fdc000 : "ROMfs"

 

m25p80 spi0.1: found m25p128, expected m25p16

 

m25p80 spi0.1: m25p128 (16384 Kbytes)

 

Creating 3 MTD partitions on "m25p80":

 

0x000000000000-0x000000080000 : "bootloader(spi)"

 

0x000000080000-0x000000200000 : "persistent files(spi)"

 

0x000000200000-0x000001000000 : "uImage.ext2(spi)"

 

bfin_mii_bus: probed

 

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)

 

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

 

console [netcon0] enabled

 

netconsole: network logging started

 

i2c /dev entries driver

 

i2c-core: driver [dev_driver] registered

 

i2c-dev: adapter [i2c-bfin-twi] registered as minor 0

 

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

 

No device for DAI MAX9851

 

dma rx:5 tx:6, err irq:16, regs:ffc00900

 

max9851 Audio Codec 0.5

 

i2c-core: driver [MAX9851 I2C Codec] registered

 

i2c 0-0010: uevent

 

MAX9851 I2C Codec 0-0010: probe

 

dma_alloc_init: dma_page @ 0x0111c000 - 256 pages at 0x03f00000

 

asoc: MAX9851 <-> bf5xx-i2s mapping ok

 

ALSA device list:

 

#0: bf537_max9851 (MAX9851)

 

TCP cubic registered

 

NET: Registered protocol family 17

 

IP-Config: Complete:

 

device=eth0, addr=192.168.40.111, mask=255.255.255.0, gw=192.168.40.2,

 

host=FHF, domain=, nis-domain=(none),

 

bootserver=192.168.40.34, rootserver=192.168.40.34, rootpath=

 

VFS: Mounted root (ext2 filesystem) on device 31:0.

 

Freeing unused kernel memory: 128k freed

 

probing persistent memory

 

mounted persistent memory

 

Network setup

 

eth0 is 192.168.40.111 netmask 255.255.255.0, default route is 192.168.40.2

 

route: SIOCADDRT: File exists

 

enviroment setup

 

_____________________________________

 

a8888b. / Welcome to the uClinux distribution \

 

d888888b. / _ _ \

 

8P"YP"Y88 / | | |_| __ __ (TM) |

 

8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |

 

8' .88 \ | | | | _ \| | | | \ / |

 

8`._.' Y8. \ | |__ | | | | | |_| | / \ |

 

d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |

 

dP . Y8b. \ For embedded processors including |

 

d8:' " `::88b \ the Analog Devices Blackfin /

 

d8" 'Y88b \___________________________________/

 

:8P ' :888

 

8a. : _a88P For further information, check out:

 

._/"Yaa_: .| 88P| -   blackfin.uclinux.org/

 

\ YP" `| 8P `H Y : - htt0://:ocs0bla0kfi .uc-inu .orL/

 

0 `-/.._F)88u8P`l_.'l U p http //w-w.u lin1x.o0g/

 

s/a:f -   www.analog.com/blackfin

 

 

 

Have a lot of fun...

 

 

 

 

 

BusyBox v1.16.2 (2011-09-21 12:03:53 CEST) hush - the humble shell

 

 

 

 

 

Here some ping-test:

 

 

 

root:/> ping localhost

 

PING localhost (127.0.0.1): 56 data bytes

 

64 bytes from 127.0.0.1: seq=0 ttl=64 time=0.443 ms

 

64 bytes from 127.0.0.1: seq=1 ttl=64 time=0.342 ms

 

^C

 

--- localhost ping statistics ---

 

2 packets transmitted, 2 packets received, 0% packet loss

 

round-trip min/avg/max = 0.342/0.392/0.443 ms

 

 

 

root:/> ping 192.168.40.1

 

PING 192.168.40.1 (192.168.40.1): 56 data bytes

 

^C

 

--- 192.168.40.1 ping statistics ---

 

4 packets transmitted, 0 packets received, 100% packet loss

 

 

 

root:/> arping 192.168.40.1

 

ARPING to 192.168.40.1 from 192.168.40.111 via eth0

 

^CSent 7 probe(s) (7 broadcast(s))

 

Received 0 reply (0 request(s), 0 broadcast(s))

 

 

 

Here my eth0 setup.

 

 

 

root:/> route -n

 

Kernel IP routing table

 

Destination Gateway Genmask Flags Metric Ref Use Iface

 

192.168.40.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

 

                192.168.40.2 0.0.0.0 UG 0 0 0 eth0

 

 

 

root:/> ifconfig

 

eth0 Link encap:Ethernet HWaddr 9E:AB:BE:EE:FF:FC

 

inet addr:192.168.40.111 Bcast:192.168.40.255 Mask:255.255.255.0

 

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

 

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

 

TX packets:3 errors:0 dropped:0 overruns:0 carrier:0

 

collisions:0 txqueuelen:1000

 

RX bytes:0 (0.0 B) TX bytes:126 (126.0 B)

 

 

 

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:3 errors:0 dropped:0 overruns:0 frame:0

 

TX packets:3 errors:0 dropped:0 overruns:0 carrier:0

 

collisions:0 txqueuelen:0

 

RX bytes:336 (336.0 B) TX bytes:336 (336.0 B)

 

 

 

 

 

I also tried to get some more information with mii-tool.

 

 

 

root:/> mii-tool -vV

 

mii-tool.c 1.9 2000/04/28 00:56:08 (David Hinds)

 

eth0: negotiated 100baseTx-FD, link ok

 

product info: vendor 00:08:85, model 21 rev 5

 

basic mode: autonegotiation enabled

 

basic status: autonegotiation complete, link ok

 

capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

 

advertising: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

 

link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control

 

 

 

 

 

I looked into the proc-directory.

 

 

 

root:/> ls /proc

 

1 5 cpuinfo kmsg slabinfo

 

134 51 devices loadavg softirqs

 

139 53 diskstats locks sram

 

144 55 dma maps stat

 

149 6 driver max9851 sys

 

2 85 execdomains meminfo sysvipc

 

209 87 filesystems misc timer_list

 

215 9 fs mounts tty

 

217 asound gpio mtd uptime

 

218 buddyinfo interrupts net version

 

227 bus iomem pagetypeinfo vmstat

 

3 cmdline ioports partitions zoneinfo

 

4 config.gz irq sched_debug

 

49 cplbinfo kallsyms self

 

 

 

root:/> cat /proc/interrupts

 

6: 115730 CORE Blackfin CoreTimer

 

16: 0 INTN SPORT err

 

25: 0 INTN SPORT RX Data

 

26: 0 INTN SPORT TX Data

 

27: 97 INTN i2c-bfin-twi

 

29: 0 INTN BFIN_UART_RX

 

30: 185 INTN BFIN_UART_TX

 

35: 0 INTN EMAC_RX

 

NMI: 0 CORE Non Maskable Interrupt

 

Err: 0

 

 

 

root:/> cat /proc/dma

 

5: SPORT RX Data

 

6: SPORT TX Data

 

8: BFIN_UART_RX

 

9: BFIN_UART_TX

 

12: Blackfin dma_memcpy

 

13: Blackfin dma_memcpy

 

 

 

So, right know I'm clueless what could be wrong. :-/ I will attach my config files and it would be great if someone could help me or point me in the right direction.

 

 

 

Thx

Henning

 

 

1404lib.config

1404kernel.config

QuoteReplyEditDelete

 

 

2011-09-21 10:24:14     Re: Problems with phy (micrel 8051)

Henning Hörentrup (GERMANY)

Message: 103478   

 

Edit:

 

root:/proc/217/net> route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.40.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

0.0.0.0         192.168.40.2    0.0.0.0         UG    0      0        0 eth0

QuoteReplyEditDelete

 

 

2011-09-21 11:13:58     Re: Problems with phy (micrel 8051)

Henning Hörentrup (GERMANY)

Message: 103479   

 

Okay, the problem is solved.

 

 

 

You have to edit the boardfile (ezkit.c) and change the RMII-mode to MII-mode.

Outcomes