This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Multi spi in OMAP-L138

Guru 20755 points

Hello,

I am trying to use spi0 & spi1 ports simultanously.
I tried several configurations of the relevant tasks but it seems that probing is done only once.
I would appreciate if you can guide me how to configure 2 spi, and wether the driver does support dual spi's.

Thank you,

Ran

static struct spi_board_info da850_evm_spi1_info[] __initconst = {
 {
  .modalias     = "spi_davinci",
  .max_speed_hz = 25 * 1000 * 1000,
  .bus_num     = 1,
  .chip_select = 0,
  .mode      = SPI_MODE_0,
 },
 {
  .modalias     = "spi_davinci",
  .max_speed_hz = 25 * 1000 * 1000,
  .bus_num     = 2,
  .chip_select = 0,
  .mode      = SPI_MODE_0,
 },
 
};

  • Hi,

    Please see http://e2e.ti.com/support/embedded/f/354/p/8055/328495.aspx#328495 forum post where similar problem was discussed. This is a long forum thread but see for a reply from Gururaja where the below information is present.

    "SPI module compares master->bus_num which is dm365_spi0_device.id with chip->bus_num which is dm365_evm_spi1_info.bus_num.
    If they match, it registers the device."

    Regards, Sudhakar

  • Hello Sudhakar,

    Thanks for the reply, your advice did helped to advance a bit more, but now it seems that the kernel initialization is stuck at "spi_read_then_write" routine when doing jedec_probe for the spi flash which is connected to spi bus=0 , and chip_select=2. I tried many things, but nothing helps. before running the kernel on the U-BOOT I do spi probe 0:2 and succeed in the probing, then when I boot, the kernel starts running and then get stuck while probing this flash. I thought maybe it has to do with the lpsc, but I dont think the kernel disbale any lpsc controller( I wanted to check the lpsc status with CCS, but becuase of the virtual addressing I did not suceed in running the debug script from LogicPD, anyway I asked about this in another post). I also thought that maybe it has to do with pinmux, but I configured the kernel not to change any pinmux (all the pinmux configuration is done in u-boot). Do you have any idea what is wrong here or how to debug this issue?

    Best Regards,

    Ran