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.

dm8168 spi help

Hi,

We're using the dm8168 alongside with the z3 for our device.  I'm currently trying to get the spi to work for communication with our fpga.  The board spi is the master and the fpga would be the slave.  I'm having trouble setting it up.  I know the driver is added in the kernel but when i boot i don't see any information regarding the spi.  I fell like i need to edit the board file but i'm unclear on how to go about adding the flash.  In the board file there's a section talking about the spi flash which is partitioned in 4 different ways.  Our fpga slave device is connected using cs0.  I've looked at the pinmux values and they all seem to be correct based on our connections.  

I also tried running the spidev_test but it didn't work.  I believe that's due to the fact that our device isn't set up properly in the board file.  Can anyone help guide me in the right direction to solve this problem?

Thanks,

Rodrigo

  • Sorry i miss typed a word in the previous post...

    Hi,

    We're using the dm8168 alongside with the z3 for our device.  I'm currently trying to get the spi to work for communication with our fpga.  The board spi is the master and the fpga would be the slave.  I'm having trouble setting it up.  I know the driver is added in the kernel but when i boot i don't see any information regarding the spi.  I fell like i need to edit the board file but i'm unclear on how to go about adding the spi.  In the board file there's a section talking about the spi flash which is partitioned in 4 different ways.  Our fpga slave device is connected using cs0.  I've looked at the pinmux values and they all seem to be correct based on our connections.  

    I also tried running the spidev_test but it didn't work.  I believe that's due to the fact that our device isn't set up properly in the board file.  Can anyone help guide me in the right direction to solve this problem?

    Thanks,

    Rodrigo

  • Hi Rodrigo,

    You can refer this portion of user guide

    http://processors.wiki.ti.com/index.php/DM81xx_AM38xx_PSP_McSPI_Driver_Guide#Porting_to_custom_hardware

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • HI AnilKumar,

    I looked at the link provided and have some questions related to it.

    I looked inside of board-ti8168evm.c and there is no device array named ti8168_evm_spi_info  but there isti816x_spi_slave_info array which i think is what it refers to.  I'm a little confuse on what is meant by ensure that num_chipselect member of the platform data for the corresponding SPI master means.  I tried looking in the file for num_chipselect and found nothing so I was hoping you could clarify this.

    Lastly i'm not too sure on what most of the values mean that will be going within the spi structure.  

        • modalias so this seems to be the spi driver for the master.  I our case is an altera fpga that we want to communicate with, does this mean i need to implement my own driver?  If so where would i do it?  If not is there a driver that is generic to spi functionality?
        • platform_data I'm not sure what this is supposed to be.
        • controller_data This is not too clear, can you clarify please?
        • bus_num I'll have to look at the schematic to see what this is connected to.
        • chip_select We are using chip select 0 for this spi interface
        • max_speed_hz I'm not sure what we have decided on yet but this should be easy to determine
    Thanks for you help,
    Rodrigo
  • Hi,

    I got the spi to show up in the file system, ls dev/spidev1.0.  I have been trying to use this driver but i'm not having any luck with this.  I made sure the user mode spi device driver support.  I have been trying to use spidev_test.c or spidev_fdx.c and neither one of the drivers seems to work.  I tried doing echo 1 > dev/spidev1.0 and neither one of these seems to make the spi MOSI value change.  I've looked at this with an oscilloscope and I see the chip select change, the clock change and even a value I send back from the spi slave, but never the value i'm sending through the MOSI pin.  Any ideas on what could be the problem for this?  I'm trying to avoid having to write my own driver if one is out that we could use.

    Thanks,

    Rodrigo

  • Rodrigo and I are using an older version of the PSP (04.00.01.13).

    I see from the Release Notes that there is an outstanding issue related to SPI.  Where can I find more details about issue SDOCM00085072 to determine if this is the cause of our problem.

    http://processors.wiki.ti.com/index.php/DM816x_AM389x_PSP_04.00.01.13_Release_Notes

    SDOCM00085072

    No SPI software support (including SPI boot) for DM8168 Rev H EVM.

    There is no workaround as of now. The SPI part used in this revision of EVM is different from the ones used in the earlier EVMs.