2010-08-11 03:49:42     BF527 custom board. NAND and ethernet simultaneous

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

2010-08-11 03:49:42     BF527 custom board. NAND and ethernet simultaneous

Yuriy Urasinov (RUSSIAN FEDERATION)

Message: 92317    I have my custom board on BF527. Also I have BF527-Ez-Kit. And I know that Bf527-Ez-Kit can not use Ethernet and NAND flash at same time. But I connect NAND flash to other port. NAND data lines connected to PORTF (PF0...PF7), NAND control lines connected to PORTH (PH10...PH15). Ethernet is connected trough RMII same as BF527-Ez-Kit. I make custom board file for u-boot. Ethernet works good. And than I try to enable NAND flash. I think it's necessary only change PORTx_FER and PORTx_MUX register values. But NAND flash doesn't work and Ethernet also doesn't work. I use u-boot-2008.10-2009R1.1-rc1. I change next in file drivers/mtd/nand/bfin_nand.c.

 

/* enable GPIO function enable register */

#ifdef __ADSPBF54x__

bfin_write_PORTJ_FER(bfin_read_PORTJ_FER() | 6);

#elif defined(__ADSPBF52x__)

//bfin_write_PORTH_FER(bfin_read_PORTH_FER() | 0xFCFF);

//bfin_write_PORTH_MUX(0);

/* edited by uriy for bf 527-tiny support*/

/* set function for data lines*/

bfin_write_PORTF_FER(bfin_read_PORTF_FER() | PF0 | PF1 | PF2 | PF3 | PF4 | PF5 | PF6 | PF7 );

bfin_write_PORTF_MUX((bfin_read_PORTF_MUX() & 0xFFFE) | 0x0002);

/* set function for control lines*/

bfin_write_PORTH_FER(bfin_read_PORTH_FER() | PH9 | PH10 | PH11 | PH12 | PH13 | PH14 | PH15 );

bfin_write_PORTH_MUX(bfin_read_PORTH_MUX() & 0xFFCF); // clear bit[5:4]

#else

# error no support for this variant

#endif

QuoteReplyEditDelete

 

 

2010-08-11 18:17:18     Re: BF527 custom board. NAND and ethernet simultaneous

Mike Frysinger (UNITED STATES)

Message: 92339   

 

i'm pretty sure you cant use ethernet and nand at the same time on the bf527-ezkit.  the devies are not wired up to allow this, and there are specific switches on the board to toggle between nand and ethernet.

 

also, if you read the HRM, you'll see that the EMAC TX DMA (and thus interrupt) use the same DMA PMAP value as the NFC.  i'm not entirely sure how this affects interrupt routing, but it certainly means you cannot use the two in DMA mode at the same time.

 

u-boot 2008.10 hardcodes the portmuxing for both the EMAC in the bfin_mac.c file and the NFC in the bfin_nand.c file.  you'll probably need to modify both.

 

however, you should double check on http://ez.analog.com/ to see if you can even use the NFC at the same time as the EMAC before you spend any more time on the software.

QuoteReplyEditDelete

 

 

2010-08-27 08:56:40     Re: BF527 custom board. NAND and ethernet simultaneous

Yuriy Urasinov (RUSSIAN FEDERATION)

Message: 92868   

 

At this time NAND and ethernet works good. I can load by tftp uImage and write to NAND. And than load ucLinux from NAND. But I have new problem in ucLinux with NAND. I describe it here https://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?_forum_action=ForumMessageBrowse&thread_id=42442&action=ForumBrowse&forum_id=39

QuoteReplyEditDelete

 

 

2010-08-27 12:00:42     Re: BF527 custom board. NAND and ethernet simultaneous

Mike Frysinger (UNITED STATES)

Message: 92870   

 

doing it under u-boot is different from Linux.  u-boot only uses one device at a time, and it uses nand in PIO mode.  you will need to debug the nand driver to make sure it doesnt use dma under Linux.

Attachments

    Outcomes