[#4420] Ethernet not working under u-boot BF527

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

[#4420] Ethernet not working under u-boot BF527

Submitted By: Phil Wilshire

Open Date

2008-09-12 09:31:13    

Priority:

Medium     Assignee:

Nobody

Category:

networking     Fixed In Release:

N/A

Found In Release:

2008R1.5     Status:

Open

Board:

EZ-Kit Lite     Processor:

BF527

Silicon Revision:

?     Resolution:

Not reproducible

Is the bug repeatable?:

yes     

Summary: Ethernet not working under u-boot BF527

Details:

 

I can send a uboot image and boot via serial

 

I have set up the board per the documantation as far as I can tell.

http://docs.blackfin.uclinux.org/doku.php?id=hw:boards:bf527-ezkit

 

I try the dhcp command and see no errors

the lights blink on my hub with each dhcp attempt

 

 

bfin> bootp

BOOTP broadcast 1

BOOTP broadcast 2

BOOTP broadcast 3

BOOTP broadcast 4

 

When I try the ping I see lights blink but no network activity

Abort

bfin> ping 192.168.100.128

Using Blackfin EMAC device

ping failed; host 192.168.100.128 is not alive

bfin> ping 192.168.100.128

Using Blackfin EMAC device

ping failed; host 192.168.100.128 is not alive

bfin> ping 192.168.100.128

Using Blackfin EMAC device

ping failed; host 192.168.100.128 is not alive

bfin>                                             

 

and for good measure

 

bfin> bdinfo

U-Boot      = U-Boot 1.1.6 (ADI-2008R1) (Sep 11 2008 - 18:49:45)

CPU         = bf527-0.0

Board       = bf527-ezkit

VCO         = 525 MHz

CCLK        = 525 MHz

SCLK        = 131 MHz

boot_params = 0x00000000

memstart    = 0x00000000

memsize     = 0x04000000

flashstart  = 0x20000000

flashsize   = 0x00400000

flashoffset = 0x00000000

ethaddr     = 00:11:12:13:14:15

ip_addr     = 192.168.100.28

baudrate    = 57600 bps

 

Trying the same system to ping something from my host I do see lights blink and I do capture network packets with ethereal (Wireshark)

I do NOT see any activity ever FROM the board under ethereal.

 

The switches are set

 

  4 3 2 1

  x o x x

  o x o o

      on

 

  o= switch at this position

 

What am I doing wrong ?

 

I take the same system and plug the ethernet cable into a BF537 and it all works.

 

  Phil Wilshire

 

Follow-ups

 

--- Robin Getz                                               2008-09-15 08:13:39

Phil:

 

things work fine for us - or we would not release it...

 

Can you detail the hardware you have (what version of PCB, BOM, etc).

 

-Robin

 

--- Phil Wilshire                                            2008-10-03 11:46:03

Hi Robin,

 

I have just tried this on a brand new BF527 just out of the box.

EzKit lite v 1.4 BOM 1.9

 

I get the same results as on my customer's v 1.4 BOM 1.6 board.

 

I tried with the random MAC and the compiled in MAC and I have set the eth

switches as per 

http://docs.blackfin.uclinux.org/doku.php?id=hw:boards:bf527-ezkit

 

I get no errors cable, hub, connection all verified

bfin> version                                                              

  

                                                                              

 

U-Boot 1.1.6 (ADI-2008R1) (Oct  3 2008 - 11:50:27)                            

 

bfin> bdinfo                                                               

  

U-Boot      = U-Boot 1.1.6 (ADI-2008R1) (Oct  3 2008 - 11:50:27)              

 

CPU         = bf527-0.0                                                       

 

Board       = bf527-ezkit                                                     

 

VCO         = 525 MHz                                                         

 

CCLK        = 525 MHz                                                         

 

SCLK        = 131 MHz                                                         

 

boot_params = 0x00000000                                                      

 

memstart    = 0x00000000                                                      

 

memsize     = 0x04000000                                                      

 

flashstart  = 0x20000000                                                      

 

flashsize   = 0x00400000                                                      

 

flashoffset = 0x00000000                                                      

 

ethaddr     = 02:80:AD:20:31:E8                                               

 

ip_addr     = 192.168.0.15                                                    

 

baudrate    = 57600 bps                                                       

 

bfin> ping 192.168.0.2                                                     

  

Using Blackfin EMAC device                                                    

 

ping failed; host 192.168.0.2 is not alive                                    

 

bfin>

 

The the lights look OK on the board.

So I am sure I have a hard failure here.

 

My uart u-boot  download works just fine with the

boot switch in position 8

and the uart switches SW10 all on

JP5 and JP1 both open.

 

 

Any suggestions ?

 

  Phil Wilshire

 

--- Phil Wilshire                                            2008-10-03 12:30:38

More info,

 

Here is the system trying to work with ethernet debug on

I added a few PSW debug messages.

 

 

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC PSW

Warning: Blackfin EMAC PSW MAC addresses don't match:

Address in SROM is         57:00:00:00:00:00

Address in environment is  02:FFFFFF80:FFFFFFAD:20:31:FFFFFFE8

 

MAC:   02:80:AD:20:31:E8

I2C:   ready

bfin> ping 192.168.0.2

Eth_halt: ......

Eth_init: ......

Using Blackfin EMAC PS..- 1� device                                         

 

Ethernet: tx send PSW                                                         

 

BFIN EMAC send: length = 42                                                   

 

Ethernet: tx send PSW                                                         

 

BFIN EMAC send: length = 42                                                   

 

Eth_halt: ......                                                              

 

ping failed; host 192.168.0.2 is not alive    

 

   Phil Wilshire

 

--- Robin Getz                                               2008-10-05 19:18:03

Phil:

 

Are you sure you have the switches set properly? (The default is for the EZKit

is NAND, not Ethernet).

 

-Robin

 

--- Phil Wilshire                                            2008-10-06 07:35:40

Hi Robin,

Yup I am quite sure about the switches. On some of them I have tried all

combinations.

There are two switches to worry about.

 

 

One thing I am taking a look at is the latest 2008R1.5 release.

 

I'll let you know how this works out later today.

  Phil

 

--- Robin Getz                                               2008-10-06 07:39:52

The EZKit I have works with the binary that is posted on the frs section.

 

-Robin

 

--- Phil Wilshire                                            2008-10-06 08:22:23

Hi Robin,

Thanks for the info

I'll try that too

There are two switches sw1 and sw9 what is your set up for both ?

I have sw1 1:on 2:on 3:off 4:on

sw9: all off or all:on with all on I get no link light.

 

I am running from a uart load binary if that makes any difference.

 

Trying the frs build now...

 

  -- Phil

 

results follow

bfin> set ipaddr 192.168.1.95

bfin> ping 192.168.1.134

Eth_halt: ......

Eth_init: ......

Using Blackfin EMAC device

BFIN EMAC send: length = 42

BFIN EMAC send: length = 42

Eth_halt: ......

ping failed; host 192.168.1.134 is not alive

bfin> bdinfo

U-Boot      = U-Boot 1.1.6 (ADI-2008R1.5) (Oct  6 2008 - 08:21:44)

CPU         = bf527-0.0

Board       = bf527-ezkit

VCO         = 525 MHz                                                         

 

CCLK        = 525 MHz                                                         

 

SCLK        = 131 MHz                                                         

 

boot_params = 0x00000000                                                      

 

memstart    = 0x00000000                                                      

 

memsize     = 0x04000000                                                      

 

flashstart  = 0x20000000                                                      

 

flashsize   = 0x00400000                                                      

 

flashoffset = 0x00000000                                                      

 

ethaddr     = 02:80:AD:20:31:E9                                               

 

ip_addr     = 192.168.1.95                                                    

 

baudrate    = 57600 bps

 

 

 

--- Phil Wilshire                                            2008-10-06 08:26:57

Robin,

How did you load the frs image ?

 

It looks like there is a uImage so I presume I'll have to do a serial load and

execute.

 

  - Phil

 

 

 

--- Phil Wilshire                                            2008-10-06 08:33:34

Robin-

Sorry my bad I was looking at the uClinux images

 

The the frs uart load image did not ping either.

Are we sensitive to the sort of hub at all.

The hub works fine for the dev host system

 

Both link and act lights are on with the act light blinking.

Did you try the uart load image ?

 

  - Phil

 

--- Robin Getz                                               2008-10-06 14:45:03

rgetz@imhotep:~> bfin-elf-ldr -l

/tftpboot/u-boot-bf527-ezkit-uart-2008R1.5.ldr /dev/ttyS0 && kermit -l

/dev/ttyS0 -b 57600 -C connect

Loading LDR /tftpboot/u-boot-bf527-ezkit-uart-2008R1.5.ldr ... OK!

Removing stale lock '//var/lock/LCK..ttyS0'

Opening /dev/ttyS0 ... OK!

Configuring terminal I/O ... OK!

Trying to send autobaud ... OK!

Trying to read autobaud ... OK!

Checking autobaud ... OK!

Autobaud result: 115200bps 29.491mhz (header:0xBF DLL:0x10 DLH:0x00 fin:0x00)

Sending blocks of DXE 1 ... [10/10] (100%)[board said:

怘�怘�ff�▒�����`��▒�▒�x�����~��▒x~�]

[board said: x]

[board said: ▒▒��▒▒▒▒~▒▒~▒�����怘�ff�~]

[board said: ]

[board said: x~fx]

[board said: x�▒�]

[board said: 怘�]

[board said:

����▒������x������f�������f����▒�x��]

[board said: 怘�������~]

[board said: ��]

[board said: ��x▒���f���▒f]

[board said: ���x�����▒�]

[board said:

�����▒▒▒▒��fx▒f��怘���f~�▒▒▒��fx▒f�]

[board said: �怘�f�����~]

[board said: ��f~�▒▒▒�▒������x����]

[board said: �怘���怆~]

[board said: �x怘�▒�x�����▒�]

OK!

You may want to run minicom or kermit now

Quick tip: run 'ldr <ldr> <tty> && minicom'

Connecting to /dev/ttyS0, speed 57600

Escape character: Ctrl-\ (ASCII 28, FS): enabled

Type the escape character followed by C to get back,

or followed by ? to see other options.

----------------------------------------------------

 

bfin> dhcp

BOOTP broadcast 1

DHCP client bound to address 10.64.204.105

bfin> bdinfo

U-Boot      = U-Boot 1.1.6-svn1273 (ADI-2008R1.5) (Jul 21 2008 - 00:30:21)

CPU         = bf527-0.0

Board       = bf527-ezkit

VCO         = 525 MHz

CCLK        = 525 MHz

SCLK        = 131 MHz

boot_params = 0x00000000

memstart    = 0x00000000

memsize     = 0x04000000

flashstart  = 0x20000000

flashsize   = 0x00400000

flashoffset = 0x00000000

ethaddr     = FA:BE:BC:CB:DB:33

ip_addr     = 10.64.204.105

baudrate    = 57600 bps

 

 

Like I said - works for me.

 

EZkit 1.3

BF527 0.1

 

Switches are set up per the docs.

 

--- Phil Wilshire                                            2008-10-06 15:58:07

Robin,

Just tried a BF537 in the same hub, same psu and same network cable and it

worked just fine.

 

I did notice that the link and activity lights both remained lit on the BF527

when I removed the ethernet cable.

 

Can I ask you what are your settings for SW9 ...

 

Do your link and activity lights stay on with the cable unplugged ?

 

Many thanks

  - PHIL

 

--- Robin Getz                                               2008-10-06 16:58:16

Phil:

 

Switch settings are what is described on

 

https://docs.blackfin.uclinux.org/doku.php?id=hw:boards:bf527-ezkit#sw9_-_eth_mode_flash_cs_switch

 

--- Phil Wilshire                                            2008-10-07 07:54:17

Robin:

 

I have a customer who has reported the same problem.

Hopefully they will post their bug report here too.

 

None of my 527 boards have ever run linux.

Is it possible that Linux sets up the system to use the ethernet interface and

u-boot ( possibly without a power reset ) inherits this setup during your

testing.

 

Would it be possible for you to test on a brand new , never seen linux, 527

ezkit ?

 

 

My debug shows the data being DMA'd to the MAC but I see no network traffic on

the interface. This points to a PHY problem of some sort.

 

Anyway I'll keep looking as time allows.

 

  -Phil

 

  

 

--- Michael Hennerich                                        2008-10-07 08:10:07

Phil,

 

I never had any network problems with my BF527-EZkits!

I'll check the documantation...

 

-Michael

 

--- Michael Hennerich                                        2008-10-07 08:13:42

Phil,

 

try SW9: OFF, OFF, OFF, ON

 

-Michael

 

--- Michael Hennerich                                        2008-10-07 08:20:33

SW9 [0:2]

 

"1" means "On", "0" means "Off".

 

Should be:

"1" means "OFF", "0" means "ON".

 

This is due to the fact that the LAN 8700 MODE bit have PULL Ups and the switch

connects to them to GND.

 

I fixed the documentation.

 

Best regards,

Michael

 

--- Phil Wilshire                                            2008-10-07 09:25:18

Michael

 

Thanks but still no go.

With the SW9 switches all off I get a blinking activity light but the

link light goes out when the ether cable is plugged in.

 

It comes back on with the ether  cable is removed ????

 

dhcp and ping still do not work on either board.

 

I tried an older hub as well with no change in the results.

 

I assume that if the link light is out we will not talk.

 

Is there any set up that needs to be done to the LAN8700 ?

Are there any tests I can do to check that this device is working ?

 

-Phil

 

 

 

--- Michael Hennerich                                        2008-10-07 09:58:30

Phil,

 

No Cable: Both LEDs constantly ON (ACT, LINK)

With cable pluged in: ACT Blinking.

 

You should see the same thing on your side.

What is your SW1 ETH ENABLE setting?

Can you connect the board to a switch instead of an HUB?

 

-Michael

 

--- Phil Wilshire                                            2008-10-07 10:00:27

Ok some more

I have added some debug and I see that we are possibly getting incorrect

data back from the PHY.

 

I suspected porth mux and porth fer but these seem to be set up

( I set them up anyway )

 

First ping

bfin> ping 192.168.1.1

Eth_halt: ......

Eth_init 1: ......phmux 0000 phfer 0000

Eth_init 2: ......phmux 0015 phfer ffff

 

My debug

PSW debug phydat PHY_MODESTAT ffff count 1

PSW debug phydat PHY_ANLPAR ffff

 

Second Ping

(note the modified phfer/phmux setup)

 

bfin> ping 192.168.1.1                                                     

  

Eth_halt: ......                                                              

 

Eth_init 1: ......phmux 0005 phfer 01ff                                       

 

Eth_init 2: ......phmux 0015 phfer ffff                                       

 

PSW debug phydat PHY_MODESTAT ffff count 1                                   

 

PSW debug phydat PHY_ANLPAR ffff                                             

 

Using Blackfin EMAC device                                                    

 

BFIN EMAC sent: i = 175 status 400043 txIdx 0                                 

 

BFIN EMAC send: length = 42                                                   

 

Eth_halt: ......              

 

So I guess we need to look at the PHY access in some more

detail.

I attached my bfin_mac.c file

 

  -Phil

 

 

--- Michael Hennerich                                        2008-10-07 10:07:11

Phil,

 

as I said - I never had problems.

I just build a fresh u-boot image from trunk -

again no problem at all.

 

Check your hardware, cables, etc.!

 

-Michael

 

U-Boot 1.1.6-svn1383 (ADI-2009R1-pre) (Oct  7 2008 - 16:01:32)

 

CPU:   ADSP bf527-0.0 (Detected Rev: 0.0)

Board: ADI BF527 EZ-Kit board

       Support: http://blackfin.uclinux.org/

Clock: VCO: 525 MHz, Core: 525 MHz, System: 131 MHz

RAM:   64 MB

Flash:  4 MB

In:    serial

Out:   serial

Err:   serial

Net:   Blackfin EMAC

MAC:   00:E0:22:FE:B8:16

Hit any key to stop autoboot:  0

bfin> run ramboot

Using Blackfin EMAC device

TFTP from server 10.44.2.88; our IP address is 10.44.2.45

Filename 'uImage'.

Load address: 0x1000000

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

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

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

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

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

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

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

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

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

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

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

done

Bytes transferred = 3604161 (36fec1 hex)

 

--- Michael Hennerich                                        2008-10-07 10:27:01

Phil,

 

I attached a picture of my Switch settings.

 

-Michael

 

--- Phil Wilshire                                            2008-10-07 11:13:25

Thanks Michael,

 

All cables checked , twice even.

 

There were a few different switch settings but the system still does not

seem to work.

 

Can U try my attached bfin_mac.c under u-boot and see what you get from the

phy ?

 

Sorry this is so painful.

 

Many thanks

  -Phil

 

 

 

--- Phil Wilshire                                            2008-10-07 11:17:14

Michael, Robin,

 

I see you are using trunk u-boot 2009R1-pre

 

Is this possibly the problem ?

 

I am using 2008R1.5 ?

 

-Phil

 

 

--- Phil Wilshire                                            2008-10-07 11:44:26

-- Hi

Using the latest trunk I get the same result.

192.168.1.1 and 192.168.1.134 are both alive and well.

 

bfin> set ipaddr 192.168.1.15                                              

  

bfin> ping 192.168.1.1                                                     

  

Using Blackfin EMAC device                                                    

 

ping failed; host 192.168.1.1 is not alive                                    

 

bfin> ping 192.168.1.134                                                   

  

Using Blackfin EMAC device                                                    

 

ping failed; host 192.168.1.134 is not alive                                  

 

bfin> bdinfo                                                               

  

U-Boot      = U-Boot 1.1.6-svn1383 (ADI-2009R1-pre) (Oct  7 2008 - 11:57:38)  

 

CPU         = bf527-0.0                                                       

 

Board       = bf527-ezkit                                                     

 

VCO         = 525 MHz                                                         

 

CCLK        = 525 MHz                                                         

 

SCLK        = 131 MHz                                                         

 

boot_params = 0x00000000                                                      

 

memstart    = 0x00000000                                                      

 

memsize     = 0x04000000                                                      

 

flashstart  = 0x20000000                                                      

 

flashsize   = 0x00400000                                                      

 

flashoffset = 0x00000000                                                      

 

ethaddr     = 00:E0:22:FE:BD:8C                                               

 

ip_addr     = 192.168.1.15                                                    

 

baudrate    = 57600 bps                                                       

 

 

Switch settings as per Micheal's photograph

 

--- Phil Wilshire                                            2008-10-08 08:05:07

Hi,

 

I tried a new bf548-ezkit with the same network set up.

both dhcp and ping worked first time.

 

Also the ldr tool worked first time on the 548 for the uart load.

The bf527 is a lot more difficult to make work under uart load.

I have to reset and retry about 6-12 times each run.

But that is a different problem.

 

I would be interested if someone with a working system could add some debug

to show the results of reading and writing to the PHY in bfin_mac.c

(AS in the attached file)

Many thanks

  Phil

 

 

 

--- Robin Getz                                               2008-10-08 13:42:20

I was using the release - 2008R1.5

 

-Robin

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

bfin_mac.c    text/x-csrc    14703    Phil Wilshire

BF527-EZKIT_SW_BOT.jpg    image/pjpeg    1038194    Michael Hennerich

Attachments

Outcomes