AnsweredAssumed Answered

/dev/spidev not appearing on iMX6Q despite kernel configuration and modalias="spidev"

Question asked by muthuswamydikshit on Apr 8, 2014
Latest reply on Apr 26, 2014 by muthuswamydikshit

I am using iMX6Q with BSP L3.0.35_4.1.0.

I configured the kernel in imx6_defconfig.dev as

CONFIG_SPI_SPI_DEV=y 

CONFIG_SPI=y

CONFIG_SPI_MASTER=y

 

I modified the /arch/arm/mach-mx6/board-*.c file.

I did the following changes.

 

1.

IOMUX for chip select.

 

static int mx6q_spi_cs[] = {

        -1, IS THIS A PROMLEM? I want to use SS of ecspi.

};

 

2.

static const struct spi_imx_master e25_mx6q_spi_data __initconst = {

        .chipselect     = e25_mx6q_spi_cs,

        .num_chipselect = ARRAY_SIZE(e25_mx6q_spi_cs),

};

 

3.

static struct spi_board_info my_spi5_board_info[] __initdata = {

        {

                /* The modalias must be the same as spi device driver name */

                .modalias       = "spidev",

                .max_speed_hz   = 10000000,

                .bus_num        = 4,

                .chip_select    = 0,

                .platform_data  = NULL,I

        },

};

 

4.

        imx6q_add_ecspi(4, &mx6q_spi_data);

        spi_device_init();

 

I tried to configure CS a GPIO nd gave teh corresponding GPIO number in the mc6q_spi_cs struct. But not luck.

 

Any pointers would be very helpful.

Outcomes