2008-08-14 02:32:18     Port register setting for RMII mode

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

2008-08-14 02:32:18     Port register setting for RMII mode

San J (INDIA)

Message: 60435   

 

Hi,

 

    I am using the BF527 MAC in RMII mode. In the driver code (drivers/bfin_mac.c ), i see that the port register setting is done only for PORTH_FER and PORTH_MUX if  CONFIG_BFIN_MAC_RMII is defined.  As per the HW manual the RMII MDC pin is in PORT G (PG 14). I beleive the PORTG_FER and PORTG_MUX registers should be set for enabling the MDC.

 

Let me know if i am mistaken?

 

Note: I am using the  u-boot-1.1.6-2008R1 release.

 

 

 

Thanks

 

San

QuoteReplyEditDelete

 

 

2008-08-14 06:18:43     Re: Port register setting for RMII mode

Bryan Wu (CHINA)

Message: 60464   

 

Hi San,

 

I agree that we should set PORT G for both MII and RMII in BF527. Actually, in kernel driver, we follow that rule.

 

After a quick scan of u-boot code (both 08R1.5 and trunk), I also failed to see the operation related PORT G. Maybe Mike have some idea about this.

 

-Bryan

QuoteReplyEditDelete

 

 

2008-08-14 08:23:37     Re: Port register setting for RMII mode

Mike Frysinger (UNITED STATES)

Message: 60471   

 

in the kernel you get to cheat and let the common peripheral code handle it

 

i imagine you guys just mean we need these lines ?

*pPORTG_MUX = (*pPORTG_MUX & ~PORT_x_MUX_6_MASK) | PORT_x_MUX_6_FUNC_2;

*pPORTG_FER |= PG14 | PG15;

QuoteReplyEditDelete

 

 

2008-08-17 22:32:28     Re: Port register setting for RMII mode

San J (INDIA)

Message: 60555   

 

Yes, these lines needs to be added

 

*pPORTG_FER |= PG14 | PG15; and

 

*pPORTG_MUX = 0x1000;

 

On the same note I have a question. Is RMII mode tested with this u-boot code ? I do face some issues with the receive side. i.e when i try to do a ping from the u-boot to a host pc, it always times out and says "host is not alive''. It could be issue with my PHY  also. I will check this out but i wanted to make sure that the u-boot MAC driver works for RMII.

 

 

 

Thanks

 

San

 

 

QuoteReplyEditDelete

 

 

2008-08-17 22:34:31     Re: Port register setting for RMII mode

San J (INDIA)

Message: 60556   

 

One correction..

 

PortG Mux should be

 

*pPORTG_MUX |= 0x1000 ;

 

 

QuoteReplyEditDelete

 

 

2008-08-17 23:48:39     Re: Port register setting for RMII mode

Mike Frysinger (UNITED STATES)

Message: 60558   

 

ive added the PORTG_FER/PORTG_MUX code to latest svn

 

the BF527-EZKIT operates in RMII mode afaik

QuoteReplyEditDelete

 

 

2008-08-21 04:45:28     Re: Port register setting for RMII mode

San J (INDIA)

Message: 60814   

 

Mike,

 

I have checkout the latest svn code. I noticed that you have made the above PORTG register setting for both MII and RMII case. This setting should be done only if CONFIG_BFIN_MAC_RMII is defined.

 

 

 

Thanks,

 

San

QuoteReplyEditDelete

 

 

2008-08-21 11:52:11     Re: Port register setting for RMII mode

Mike Frysinger (UNITED STATES)

Message: 60850   

 

the PORTH settings were incorrect as well ... things should be fixed in trunk now

Attachments

    Outcomes