AnsweredAssumed Answered

How to enable spidev for all SPI (1-5) for MX6

Question asked by patrice sarrasin on Dec 11, 2012
Latest reply on Nov 9, 2014 by Arulpandiyan Vadivel
Branched to a new discussion

Hi,

   We are currently trying to enable the spidev driver for the 5 SPI interfaces on the MX6 nitrogen board under Linux. For now, I was having some problem adding SPI 2-5 into my configuration.

 

We are using Yocto with the kernel 3.0.35.

 

I enable the user mode interface in “menuconfig” and modify the following file

 

https://github.com/boundarydevices/linux-imx6/blob/boundary-L3.0.35_MX6DQ_ER_1208-Beta/arch/arm/mach-mx6/board-mx6q_sabrelite.c

 

static struct spi_board_info imx6_sabrelite_spi_nor_device[] __initdata = {

#if defined(CONFIG_MTD_M25P80)

{

.modalias = "spidev",

.max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */

.bus_num = 0,

.chip_select = 0,

.platform_data = &imx6_sabrelite__spi_flash_data,

},

#endif

};

 

Just by changing the driver name to spidev, I can boot and see the spidev interface under /dev/.

 

I tried to add the pads for the ecspi2 interface and modify the bus_num to 1 to try to access the second SPI. After a couple of days with multiple attempts, I was still not able to get the spidev1.0 interface.

 

I was hoping someone can point us to some good documentation regarding the modifications required to enable the other SPI interfaces (2 to 5) under linux for the mx6.

 

Let me know if you need anything else in order to assist.

 

Best regards

 

Patrice

 

Outcomes