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.

OMAP3530 SPI drivers

Other Parts Discussed in Thread: OMAP3530

Hi All,

I am using SBC8100 evaluation board with OMAP3530 processor (http://www.armkits.com/product/sbc8100.asp)

Currently I am trying to use the SPI pin on the board. I have recompile the kernel to support SPI as module. I do the following:
1. insmod spidev.ko
2.  /sbin/mdev -s
However I still did not see the spidevA.B in /dev.

I read in spi linux documentation that I have to list the driver in the spi_board_info for a device. Where should I add this spi_board_info (which specific file, if possible could you tell me the directory and location of the file).

Under linux/arm/ directory, I found many folders which does not have a name "omap35xx". It has a lot of folders with "mach-xxxxx", however there is no "mach-omap3530" folder there. Some folders that could be possible are mach-omap1, mach-omap2 or plat-omap.

Does anyone has tried the SPI using OMAP3530 in Linux. Could you please advise me on how to configure it.

I am still beginner with embedded linux development, need your advise on this.
Thank you very much for your help. 

Helmi

  • Helmi Kurniawan said:

    1. insmod spidev.ko
    2.  /sbin/mdev -s
    However I still did not see the spidevA.B in /dev.

    It is quite possible that mdev scripts in the filesystem are not handling/detecting the device. You can try compiling the driver 'into' the kernel. While configuring the driver (via menuconfig) you would have chosen the SPI driver as module (seen as <M>). Change it to <*>.

    Helmi Kurniawan said:

    I read in spi linux documentation that I have to list the driver in the spi_board_info for a device. Where should I add this spi_board_info (which specific file, if possible could you tell me the directory and location of the file).

    Look at the board-*.c files in arch/arm/mach-omap2 directory.

    Helmi Kurniawan said:

    Under linux/arm/ directory, I found many folders which does not have a name "omap35xx". It has a lot of folders with "mach-xxxxx", however there is no "mach-omap3530" folder there. Some folders that could be possible are mach-omap1, mach-omap2 or plat-omap.

    OMAP35x (and other processors in OMAP3 family) share much of code with the OMAP2 family. You will find code in mach-omap2 and plat-omap directory. As mentioned above, you will find most relevant code under mach-omap2. Depending upon the kernel version, header files will be at different location - it moved around a bit in 2009.

    Best regards,
    Sanjeev

  • Hi Sanjeev,

     

    Thanks for your explanation. I still want to ask you how do I know the bus number in OMAP3530 processor.

    I write the following in my board-omap3evm.c:

     

    struct spi_board_info omap3evm_spi_board_info1[] = {
            [0] = {
                    .modalias       = "spidev",
                    .bus_num        = 2,
                    .chip_select    = 1,
                    .max_speed_hz   = 1500000,
            },              
    };

    But it seems the bus number 2 has been used by the touch screen. I want to use other SPI but not very sure what is the bus number for each of the SPI. Could you tell me where can I get this information. Thanks.


    Best Regards,

    Helmi