Following up on this thread:
http://e2e.ti.com/support/embedded/f/354/p/145232/527422.aspx
I was able to test the /dev/spidev0.1 driver with the spidev_test test program and all seems to work well on the L137 EVM using pins on the expansion header.
Now I have a new problem. I need to setup a spidev driver on the SPI1 bus. I added the [2] entry to the spi_board_info structure as follows:
static struct spi_board_info da830evm_spi_info[] = {
[0] = {
.modalias = "m25p80",
.platform_data = &da830evm_spiflash_data,
.controller_data = &da830evm_spiflash_cfg,
.mode = SPI_MODE_0,
.max_speed_hz = 30000000, /* max sample rate at 3V */
.bus_num = 0,
.chip_select = 0,
},
[1] = {
.modalias = "spidev",
.mode = SPI_MODE_0,
.max_speed_hz = 30000000, /* max sample rate at 3V */
.bus_num = 0,
.chip_select = 1,
},
[2] = {
.modalias = "spidev",
.mode = SPI_MODE_0,
.max_speed_hz = 30000000, /* max sample rate at 3V */
.bus_num = 1,
.chip_select = 0,
},
};
Also added this definition
static struct davinci_spi_platform_data da830evm_spi1_pdata = {
.version = SPI_VERSION_2,
.num_chipselect = 1,
.intr_line = 1,
};
and this call:
ret = da8xx_register_spi(1, &da830evm_spi1_pdata);
if (ret)
pr_warning("failed to register spi 1 device : %d\n", ret);
---------------------------------------------------
This did successfully create the /dev/spidev1.0 file. But the using it with the spidev_test program hangs the EVM.
# cat /dev/spidev1.0
also hangs the machine. Below is the spi-related info from boot up .
spi_davinci spi_davinci.0: DMA: supported
spi_davinci spi_davinci.0: DMA: RX channel: 14, TX channel: 15, event queue: 0
m25p80 spi0.0: w25x32 (4096 Kbytes)
Creating 3 MTD partitions on "m25p80":
0x000000000000-0x000000040000 : "U-Boot"
0x000000040000-0x000000044000 : "U-Boot-Env"
0x000000044000-0x000000400000 : "Kernel"
spi_davinci spi_davinci.0: Controller at 0xfec41000
spi_davinci spi_davinci.1: DMA: supported
spi_davinci spi_davinci.1: DMA: RX channel: 18, TX channel: 19, event queue: 0
spi_davinci spi_davinci.1: Controller at 0xfef0e000
Any ideas on why this isn't working? I haven't seen any examples of people using both spi busses with linux.
Thanks,
Keith