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.

DM8148 SPI slave device

Hi,

How to add SPI slave device to dm8148 ? I want to send just send some commands to the slave device is it OK to have user space application or such ? can I use spidev any pointers on how to add it ?

Thanks & Regards,

Mike

  • Hi,

    I have added following snippet, in slave devices

        {
            .modalias = "spidev",
            .max_speed_hz = 500000,
            .bus_num = 1,
            .chip_select = 1,
            .mode = SPI_MODE_0,
        },

    But when I run ./spidev_test -D /dev/spidev1.1
    spi mode: 0
    bits per word: 8
    max speed: 500000 Hz (500 KHz)

    FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF FF FF FF FF
    FF FF


    Any pointers why this could be happening ?

    Thanks & Regards,

    Mike

  • Mike,

    Do you have a slave device connected to the SPI bus (on node /dev/spidev1.1)? If not, you should short MOSI and MISO lines to do a SPI test. See the below links for more info:

    http://processors.wiki.ti.com/index.php/Linux_Core_SPI_User%27s_Guide

    http://communistcode.co.uk/blog/blogPost.php?blogPostID=1

    http://armbedded.eu/node/318

    http://e2e.ti.com/support/arm/sitara_arm/f/791/t/327117.aspx

    http://e2e.ti.com/support/embedded/linux/f/354/p/69019/256852.aspx#256852

    Regards,
    Pavel