SPI doesn't work

104 views
Skip to first unread message

olivia mckenzy

unread,
Aug 24, 2012, 1:13:13 PM8/24/12
to panda...@googlegroups.com
Hi, i wanted to know why when i enable SPIDEV and MCSPI in the kernel anything works, android doesn't even start, i cannot see the kernel output through the terminal because it never starts, i followed the procedure specified in  http://www.omappedia.com/wiki/PandaBoard_SPI, but i can't get it to work, this is what i have in the kernel:

in the board-omap4panda.c

/*CONFIGURING SPI*/
///////////////////////////////////////////////////////////////////

static const struct spi_board_info panda_spi[] __initconst = {
     {
               .modalias = "spidev",
               .bus_num = 1,
               .chip_select = 0,
               .max_speed_hz = 400000,
               .mode = SPI_MODE_1,
     }
 };

 static void __init panda_spi_devices_init(void) {
      /* muxing pins might be only required if
       * you've connecting
       * device to CS other than CS0 */
      spi_register_board_info(panda_spi, ARRAY_SIZE(panda_spi));
 }

///////////////////////////////////////////////////////////////////

and i'm calling  the panda_spi_devices_init();  function in omap4_panda_init(void).


and this is the configuration in the kernel:

CONFIG_SPI=y
# CONFIG_SPI_DEBUG is not set
CONFIG_SPI_MASTER=y

#
# SPI Master Controller Drivers
#
# CONFIG_SPI_ALTERA is not set
CONFIG_SPI_BITBANG=y
CONFIG_SPI_GPIO=y
# CONFIG_SPI_OC_TINY is not set
CONFIG_SPI_OMAP24XX=y
# CONFIG_SPI_PXA2XX_PCI is not set
# CONFIG_SPI_XILINX is not set
# CONFIG_SPI_DESIGNWARE is not set

#
# SPI Protocol Masters
#
CONFIG_SPI_SPIDEV=y
# CONFIG_SPI_TLE62X0 is not set

#



if someone could help me it would be really great, i really dont know what to do, thanks in advanced.


Best Regards.













olivia mckenzy

unread,
Aug 25, 2012, 1:10:36 PM8/25/12
to panda...@googlegroups.com, wb666...@gmail.com
Hi, thank you for the reply, is just that what i don't understand is that even when i don't modify the structure in the board-omap4panda.c, just only enabling the SPIDEV and the MCSPI drivers in the kernel, it doesn't boot, i can't even check the error because it doesn't start at all, so i don't know if there is some kind of bug or problem between those two drivers because when i enable only SPIDEV (and not the MCSPI) or only the MCSPI (and not the SPIDEV) the system boots. i havent modify the SPIDEV or the MCSPI drivers, they are as they came in the kernel sources. thanks again for your reply i will try with the bus_num=5, the main issue that i have right now is that both drivers are not working together.

Best Regards.

2012/8/24 <wb666...@gmail.com>

In another thread I think you mentioned you were using kernel 3.0.8 and Android ICS.  In that thread the OP used:

   .bus_num = 5, 

And reported later that it was an SPI hardware issue, and  it is now working.  Perhaps trying bus_num=5 is worthwhile for the Android ICS kernel.

I know what is on the Wiki works for kernel 3.2.x & 3.4.x

If you mess up the SPI interface that talks to the SD card it won't get very far on bootup, but I've no experience with Android internals or how they do things.

s.rawat

unread,
Oct 1, 2014, 4:32:14 AM10/1/14
to pandaboard, wb666...@gmail.com
Its an Old post yet would like to recommend have you called panda_spi_devices_init after board_serial_init().

"..pain is temporary.....quitting lasts forever....."
Reply all
Reply to author
Forward
0 new messages