2009-03-13 15:24:44     M25P80 driver - not identifying device correctly

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

2009-03-13 15:24:44     M25P80 driver - not identifying device correctly

Tim Shearer (UNITED STATES)

Message: 70968   

 

 

Hi community,

 

This issue relates to the device initialisation of an SPI flash IC.

 

I'm using a cm-bf537e board, hooked up to a Spansion S25FL064A flash chip (SPI), using chip select 1.  I have a recent uClinux from trunk (svn 7843).  The kernel and board/platform data are configured as per the wiki:

http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:spi_flash

 

At boot time, my device isn't recognised:

m25p80 spi0.1: found m25p80, expected s25sl064a

 

I had this working correctly on 2008R1.5.

 

Incidentally, I disabled SPI/MMC to eliminate any possible conflicts.

 

This warning displayed is misleading, since a check with a scope reveals that chip select 1 isn't being toggled at any point during the boot process.  I did, however, manage to get the chip select line to operate, but only by changing the mode to SPI_MODE_0.  But the device still wasn't recognised.  Incidentally, I have pull-ups on MOSI, MISO, and SCK, but not the chip select.

 

My kernel configs follow (I included support for CFI/JEDEC flash devices):

 

                 --- Memory Technology Device (MTD) support                                       

  │ │                  [*]   MTD partitioning support     

  │ │                  [*]     Command line partition table parsing

  │ │                  < >     TI AR7 partitioning support             

  │ │                  <*>   Direct char device access to MTD devices

  │ │                  -*-   Common interface to block layer for MTD 'translation layers'                    

  │ │                  <*>   Caching block device access to MTD devices              

  │ │                        RAM/ROM/Flash chip drivers  --->   

>                   <*> Detect flash chips by Common Flash Interface (CFI) probe                             

>                   <*> Detect non-CFI AMD/JEDEC-compatible flash chips                                      

>                   [*] Flash chip driver advanced configuration options                                     

>                         Flash cmd/query data swapping (NO)  --->                                           

>                   [*]   Specific CFI Flash geometry selection                                              

>                   [*]     Support  8-bit buswidth                                                          

>                   [*]     Support 16-bit buswidth                                                          

>                   [*]     Support 32-bit buswidth                                                          

>                   [*]     Support 1-chip flash interleave                                                  

>                   [*]     Support 2-chip flash interleave                                                   

>                   <*> Support for Intel/Sharp flash chips                                                  

>                   <*> Support for AMD/Fujitsu/Spansion flash chips                                         

>                   <*> Support for ST (Advanced Architecture) flash chips                                   

>                   <*> Support for RAM chips in bus mapping                                               

>                   <*> Support for absent chips in bus mapping   

 

  │ │                        Mapping drivers for chip access  --->                                           

>                   [ ] Support non-linear mappings of flash chips                                         

>                   <M> CFI Flash device in physical memory map                                            

>                   (0x0) Physical start address of flash mapping                                          

>                   (0x000) Physical length of flash mapping                                               

>                   (2)   Bank width in octets                                                             

>                   <*> Generic uClinux RAM/ROM filesystem support                                         

>                   < > Map driver for platform device RAM (mtd-ram)                       

 

  │ │                        Self-contained MTD device drivers  --->

>                   < > Support for AT45xxx DataFlash                                                        

>                   <*> Support most SPI Flash chips (AT26DF, M25P, W25X, ...)                             

>                   [*]   Use FAST_READ OPCode allowing SPI CLK <= 50MHz  

>

           --- SPI support                                                                         

│ │             *** SPI Master Controller Drivers ***                                            

│ │              <*>   SPI controller driver for ADI Blackfin5xx

 

 

 

 

It seems that the m25p driver isn't talking to the  SPI framework properly, but if that's the case then I'm surprised no-one else on the forum has encountered this.

 

Any thoughts appreciated.

 

Thanks,

Tim

QuoteReplyEditDelete

 

 

2009-03-14 20:29:28     Re: M25P80 driver - not identifying device correctly

Robin Getz (UNITED STATES)

Message: 70988   

 

Tim:

 

I don't have a SPI flash card on me - or I would test it out. - someone will have a look on Monday.

 

-Robin

QuoteReplyEditDelete

 

 

2009-03-16 06:26:46     Re: M25P80 driver - not identifying device correctly

Yi Li (CHINA)

Message: 71025   

 

I just tested with a m25p64 spi flash chip on svn trunk, on BF537-STAMP, it works ok:

 

"m25p80 spi0.1: m25p64 (8192 Kbytes)                                           

Creating 3 MTD partitions on "m25p80":                                        

0x00000000-0x00040000 : "bootloader(spi)"                                     

0x00040000-0x001c0000 : "linux kernel(spi)"                                   

0x001c0000-0x00800000 : "file system(spi)""

 

I don't have a S25FL064A flash to test with..

 

-Yi

Attachments

    Outcomes