Skip to contentSkip to conversation

Gumstix Overo omap2_mcspi and spidev driver issues

PATCH Norman Wildmann 2 participants 2 messages Oct 25, 2010 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

Hi all,

i am having big trouble to get the spidev-driver running on my gumstix overo. I patched kernel linux-omap-2.6.34-r90 to not use a touchscreen that was configured for the kernel, but spidev is:

arch/arm/mach-omap2/board-overo.c +14 -4
index f357de9..3a9c519 100644
@@ -70,8 +70,9 @@
 #define OVERO_SMSC911X2_CS     4
 #define OVERO_SMSC911X2_GPIO   65
 
-#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
-	defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
+//#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
+//	defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
+#if 0
 
 #include <linux/spi/ads7846.h>
 
@@ -616,7 +617,8 @@
 	return 0;
 }
 
-static struct spi_board_info overo_spi_board_info[] __initdata = {
+static struct spi_board_info overo_spi_board_info[] = {
+/*
 #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
 	defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
 	{
@@ -639,11 +641,19 @@
 		.mode			= SPI_MODE_3,
 	},
 #endif
+*/
+	{
+		.modalias = "spidev",
+		.bus_num = 1,
+		.chip_select = 0,
+		.max_speed_hz = 1000000,
+		.mode = SPI_MODE_0,
+	},
 };
 
 static int __init overo_spi_init(void)
 {
-	overo_ads7846_init();
+	//overo_ads7846_init();
 	spi_register_board_info(overo_spi_board_info,
 			ARRAY_SIZE(overo_spi_board_info));
 	return 0;

It seems to have worked alright, I can see /dev/spidev1.0 and running the spidev_test program it does not complain. Nevertheless, i dont get any signal on the pins.

Am I missing something essential? Is there a good way to debug the problem? I running out of ideas. I read a lot of other people having similar problems, which could be fixed by not using the max_speed_hz and bits_per_word, but all that did not help for me.

I would appreciate some help, or hints at least.

Regards,
Norman

Signature · 13 lines
GRATIS! Movie-FLAT mit über 300 Videos. 
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 9 lines

-----Original Message-----
From: Norman Wildmann [mailto:[email protected]]

It seems to have worked alright, I can see /dev/spidev1.0 and running the spidev_test program it does not complain. Nevertheless, i dont get any signal on the pins.

You might need to check pin mux first?

-Girish

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev