AnsweredAssumed Answered

SPI config in ezkit.c for spidev on bus 1

Question asked by MarkBishop on Apr 12, 2012
Latest reply on Apr 13, 2012 by Aaronwu

On a BF548 I am trying to setup spidev correctly in the linux board file (ex, ezkit.c).

 

I am using SPI bus 1, and only one chip select (SPISS1 - PG11).

 

Here is the error in the bootup

...

spi spi1.0: Warning: SPI CPHA not set: Slave Select not under software control!

See Documentation/blackfin/bfin-spi-notes.txt

spi spi1.0: peripheral_request() error

bfin-spi bfin-spi.1: can't setup spi1.0, status -19

bfin-spi bfin-spi.1: can't create new device for spidev

....

 

The bfin-spi-notes.txt mentions to use MODE_3 instead of MODE_0.

 

#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)

        {

                .modalias = "spidev",

                .max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */

                .bus_num = 1,

                .chip_select = 0,

                .mode = SPI_MODE_3,

        },

..

static struct bfin5xx_spi_master bf54x_spi_master_info1 = {

        .num_chipselect = 1,

        .enable_dma = 1,  /* master has the ability to do dma transfer */

        .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},

};

 

Any idea what I am missing?

Outcomes