[U-Boot-Users] [PATCH v2] spi: Kill spi_chipsel table and introduce spi_setup()

Ulf Samuelsson ulf at atmel.com
Wed Feb 6 17:58:21 CET 2008


>> but is there any real spi controllers that can transmit less than a byte at a 
>> time ?  i guess if you consider gpio-based soft spi ...
>> -mike
>>   
> Sure, the Freescale SPI controller that I wrote a driver for (MPC8xxx) 
> can send an arbitrary number of bits.  Not sure exactly where that's 
> useful, but my worldview is limited to high-powered telecom/datacom 
> equipment.
> 

Yes, the Atmel SPI in the AT91 can send 8..16 bits.
I think that typical use would be for ADCs and different kind of RF chips,
but I can't think of any specific examples right now.

Other things supported by the Atmel SPI are 
* Introducing delays during various parts of the transfers.
* Selection whether to terminate the access at the end of the transfer
   or let the chip select remain active
* You can either set the chip select manually, or let the data contain the chip select number.

Since in many AT91 boards, both Linux and the RAM disk is loaded from a dataflash,
you want to set the SPI speed as high as possible for flash access - or you will affect boot time.
33 Mbps will mean that you load a 4 MB RAM disk in about 1 second while 5 Mbps
means you load it in about 6 seconds.

In this user case, the SPI is probably already initialized by the AT91 bootstrap
which loads U-Boot to SDRAM from the dataflash, so any initialization should maybe be optional.

Best Regards
Ulf Samuelsson 





More information about the U-Boot mailing list