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.

SPI access on OMAP

Would like to access a slave microcontroller (connected to OMAP35xx). In opposite to i2c, I can't see a /dev/spi device.

The examples in /Documentation/spi are accessing a /dev/spidev1.1, which I don't have.

I compiled the kernel with

CONFIG_SPI=y
CONFIG_SPI_MASTER=y
CONFIG_SPI_OMAP24XX=y

I did some tests with spi_register_board_info() (see below) but this doesn't help.
So what am I doing wrong?

 

static struct omap2_mcspi_device_config spidev_mcspi_config = {
    .turbo_mode    = 0,
    .single_channel    = 1,    /* 0: slave, 1: master */
};

struct spi_board_info omap3evm_spi_board_info[] = {
    [0] = {
        .modalias        = "SPI_DEV",
        .bus_num        = 1,
        .chip_select        = 0,
        .max_speed_hz        = 1500000,
        .controller_data    = &spidev_mcspi_config,
        .irq            = OMAP_GPIO_IRQ(175),
    },
};

spi_register_board_info(omap3_spi_board_info,
                ARRAY_SIZE(omap3_spi_board_info))

  • Hello Arno Steffens,

    I'm No expert on this but, don't you think that while registering the device there is typo.

    Arno Steffens said:

    struct spi_board_info omap3evm_spi_board_info[] = {

        [0] = {
            .modalias        = "SPI_DEV",
            .bus_num        = 1,
            .chip_select        = 0,
            .max_speed_hz        = 1500000,
            .controller_data    = &spidev_mcspi_config,
            .irq            = OMAP_GPIO_IRQ(175),
        },
    };

    spi_register_board_info(omap3_spi_board_info,
                    ARRAY_SIZE(omap3_spi_board_info))

    Shouldn't the register_board_info line be, like the one shown below

    spi_register_board_info(omap3evm_spi_board_info,
                    ARRAY_SIZE(omap3evm_spi_board_info));