spi doesn't work

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

spi doesn't work

665 Views
hamzadardour
Contributor II

Hi everyone,

I try to enable the spi, and I configured the file that allow to enbale the spi for my board (mars board) 'board-mx6q_marsboard.c',spidev is loaded ( verified with lsmod ) and I can find the spidepv2.0 in the /dev folder, but I have no signal on the clk and the MOSI, when I try to use it with ( echo 121 >/dev/spidev2.0 )

this is the modification that I have made in the file '~/linux-imx/arch/arm/mach-mx6

/board-mx6q_marsboard.c'  to enable the spi  :

/*****************************************************/

/* ECSPI3*/

    MX6Q_PAD_DISP0_DAT2__ECSPI3_MISO,

    MX6Q_PAD_DISP0_DAT1__ECSPI3_MOSI,

    MX6Q_PAD_DISP0_DAT0__ECSPI3_SCLK,

    MX6Q_PAD_DISP0_DAT4__GPIO_4_25,

/*****************************************************/

static int mx6q_marsboard_spi2_cs[] = {

        MX6Q_MARSBOARD_ECSPI3_CS0,

};

static const struct spi_imx_master mx6q_marsboard_spi2_data __initconst = {

        .chipselect     = mx6q_marsboard_spi2_cs,

        .num_chipselect = ARRAY_SIZE(mx6q_marsboard_spi2_cs),

};

/*****************************************************/

{

        .modalias = "spidev",

        .max_speed_hz = 20000000,

        .bus_num = 2,

        .chip_select = 0,

        .mode =SPI_MODE_1,

        .platform_data = &imx6_marsboard__spi_flash_data,

    },

/*****************************************************/

Please help me,

Labels (4)
0 Kudos
0 Replies