2008-07-02 23:08:48     u-boot ethernet to work on BF527 custom board

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

2008-07-02 23:08:48     u-boot ethernet to work on BF527 custom board

San J (INDIA)

Message: 58235   

 

Hello,

 

       We have a BF527 custom board with the  u-boot-1.1.6-2008R1 successfully ported into it. Next we need to get the ethernet working. Our board has the  Micrel KSZ8893MQL PHY switch . This switch has two PHYs and three MAC units. Will the existing MAC driver work with this switch? If no, please tell me what changes needs to be done to make the tftp work at u-boot level.

 

Thanks,

 

San

 

 

QuoteReplyEditDelete

 

 

2008-07-02 23:36:28     Re: u-boot ethernet to work on BF527 custom board

Mike Frysinger (UNITED STATES)

Message: 58240   

 

you can find the blackfin mac driver at drivers/bfin_mac.c

QuoteReplyEditDelete

 

 

2008-07-03 06:51:38     Re: u-boot ethernet to work on BF527 custom board

San J (INDIA)

Message: 58264   

 

Thanks for the reply. I am using the same driver (bfin_mac.c) to do ether_post_test .

 

Basically I would like to do a loopback test first at the MAC level and then at the PHY level.

 

To do the MAC level loopback, i set the LB bit in the OPMODE register and then execute the ether_post_test(). But this test fails and i get the message "EMAC can't receive any data". I made sure that i have configured the MAC address correctly.Is there any other configuration that needs to be done in the driver.

 

Please guide me on how to proceed further.

 

 

 

Thanks,

 

San

 

 

QuoteReplyEditDelete

 

 

2008-07-03 20:30:12     Re: u-boot ethernet to work on BF527 custom board

Robin Getz (UNITED STATES)

Message: 58294   

 

San:

 

I don't know if those test work (sorry) - did you try them on a BF527 EZKit (to make sure they work on known hardware?)

 

Thanks

 

-Robin

QuoteReplyEditDelete

 

 

2008-07-03 22:00:01     Re: u-boot ethernet to work on BF527 custom board

San J (INDIA)

Message: 58298   

 

Robin,

 

      Sorry, i do not have the bf527 ez-kit  to test this out. But i do have the BF537 stamp board with me. I think the MAC driver is the same for both BF537 and BF527.Am i right?

 

 

 

Thanks

 

San

QuoteReplyEditDelete

 

 

2008-07-03 22:59:54     Re: u-boot ethernet to work on BF527 custom board

Mike Frysinger (UNITED STATES)

Message: 58300   

 

all Blackfins have the same on-chip MAC

QuoteReplyEditDelete

 

 

2008-07-04 01:48:53     Re: u-boot ethernet to work on BF527 custom board

San J (INDIA)

Message: 58312   

 

I am able to do MAC loopback on the BF537 stamp board using the ether_post_test() and also setting  the LB bit to 1 in the opmode register. But the same test fails on BF527.

 

I am hardcoding the MAC address in the ether_post_test() and setting the same address in the ethaddr env variable.

 

Just wondering if i missed something? Any pointers will be helpful

 

 

 

Thanks

 

San

QuoteReplyEditDelete

 

 

2008-07-04 05:17:34     Re: u-boot ethernet to work on BF527 custom board

Bryan Wu (CHINA)

Message: 58343   

 

San,

 

Could you provide the code you used in u-boot to do ether_post_test?

 

We did not do such loopback testing in bfin_mac.c driver. Just found some decription in HRM:

 

---

 

Internal loopback enable (LB)

When internal loopback is enabled, the frames transmitted by the

MAC are internally redirected to the receive MAC port. The external

MII port is inactive. The RX pins are ignored and the TX pins

are set to TXEN = 0, TXD = 1111.

[1] Internal loopback enabled.

[0] Internal loopback not enabled.

 

---

 

-Bryan

QuoteReplyEditDelete

 

 

2008-07-04 06:42:18     Re: u-boot ethernet to work on BF527 custom board

San J (INDIA)

Message: 58348   

 

I used the ether_post_test() function  in the  drivers/bfin_mac.c file. I am calling this function after ethernet initialization is done by the u-boot.  Also, i set the LB bit in the EMAC_OPMODE register. This is done in the bfin_EMAC_init() in the same file.

 

opmode |= TE | RMII | LB ;

 

Note:CONFIG_BFIN_MAC_RMII is defined.

 

 

 

 

QuoteReplyEditDelete

 

 

2008-07-14 05:14:49     Re: u-boot ethernet to work on BF527 custom board

San J (INDIA)

Message: 58752   

 

When the CONFIG_BFIN_MAC_RMII is not defined, the MAC internal loopback works fine. So does the blackfin MAC not support internal loopback in RMII mode?

Attachments

    Outcomes