I am trying to configure an GPIO as chip select on SPI 1 interface.
I have a board that retrieve the signals from the Logic EVM and I am able to see the signals of clock, MOSI and MISO changing state when communicate with spi flash.
I have followed some topics on this forum [1] and was able to add a device that uses the spidev interface for spi.
Using that interface I am able to see the communications signals changing state, but chip select don't change state.
I found some examples [2] how to use /sys/class/gpio/ and was able to change the state to GP1[0] but after configure it as a chip select it don't make any change of state when using the device.
Any idea ?
Regards and a great 2011 :)
Aníbal
The configuration for the device :
static struct davinci_spi_platform_data da850_spi1_pdata = {
.version = SPI_VERSION_2,
.num_chipselect = 2,
.wdelay = 0,
.odd_parity = 0,
.parity_enable = 0,
.wait_enable = 0,
.timer_disable = 0,
.clk_internal = 1,
.cs_hold = 1,
.intr_level = 0,
.poll_mode = 1,
.use_dma = 0,
.c2tdelay = 8,
.t2cdelay = 8,
};
[1] = {
.modalias = "spidev",
.mode = SPI_MODE_0,
.max_speed_hz = 30000000, /* max sample rate at 3V */
.bus_num = 1,
.chip_select = 1,
.controller_data = (void *) 16, /* GP1[0] -> 1 x 16 + 0 = 16*/
},
[1] - topics about spidev
* http://e2e.ti.com/support/embedded/f/354/t/74188.aspx
* http://e2e.ti.com/support/embedded/f/354/p/74188/297335.aspx
[2] - example how to use gpio class
* http://www.gumstix.net/wiki/index.php?title=GPIO