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.

SPI4 problems on OMAP3

Hi all,

I have an accelerometer sensor connected to the OMAP3 spi4 bus. I am having problems to read/write the register of this device from a driver probe function. I am trying to see the clock on the OMAP but no signal is comming out.

I have the following settings, please advise if I missed something, your help is much appreciated:

from board_config*.c file:

/* SPI config dor Accelerometer */

static struct spi_board_info lis3dh_spi_board_info[] __initdata =

{

{

                .modalias               = "lis3dh",

                .bus_num                = 4,

                .chip_select            = 0,

                .max_speed_hz           = 12000000,

                .controller_data        = &lis3dh_acc_mcspi_config,

.irq = OMAP_GPIO_IRQ(17),

.mode            = SPI_MODE_1,

//.platform_data    = &lis3dh_acc_board_data,

},

};

 

static int __init omap3_nhp_spi_init (void)

{

spi_register_board_info(lis3dh_spi_board_info,

ARRAY_SIZE(lis3dh_spi_board_info));

return 0;

}

/*      SPI Configuartion on MCSPI4 for ACCELEROMETER LIS3DH
OMAP_MUX_MODE1 for MCSPI4 in the following registers:
MCBSP1_CLKR_OFFSET - MCSPI4_CLK (SPI serial port clock (SPC))
MCBSP1_DX_OFFSET - MCSPI4_SIMO 
MCBSP1_DR_OFFSET - MCSPI4_SOMI
MCBSP1_FSX_OFFSET - MCSPI4_CS0 (SPI : 0)
*/
OMAP3_MUX (MCBSP1_CLKR, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
OMAP3_MUX (MCBSP1_DX, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
OMAP3_MUX (MCBSP1_DR, OMAP_MUX_MODE1 | OMAP_PIN_INPUT),
OMAP3_MUX (MCBSP1_FSX, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT),
Thanks!
Federico