spi

can anyone pls guide me to run spidev_test.c on beagleboard x, a3?
currently i have done
ported linux-2.6.32 with spi patch form
http://elinux.org/BeagleBoard/SPI/Patch-2.6.32
i m able to see in /dev
spidev3.0,3.1,4.0
when i executed the spidev_test.c i m getting only zeros nothing else
pls help me .. i really get frustrated

thank u..

What are you expecting? If you don't have anything connected to the
relevant SPI lines, you will likely get garbage. That being said, I
thought this garbage would be ones, but perhaps I'm misremembering. I
think the easiest test would be to tie SIMO and SOMI. This should act as
a sort of loopback test.

- Ben

hi ben
i have already tested spidev_test.c by shorting SIMO and SOMI..
i m still getting zeros when i try to execute
i found that CONFIG_OMAP_MUX was not set in my .config .
when i enabled that ,it was failed to mount the rootfs while booting.
if spi is working for u then pls send the .config file for the kernel
version u tried successfully.

Do you have access to an oscilloscope? If so, throw it on the SIMO pin
and see if you are seeing any output. A multimeter would also probably
serve in a pinch, provided you modified spidev_test.c to continuously
stream data. This way we can determine whether it's the input or output
side of things failing.

Configuration attached.
Cheers,

- Ben

hi
i ran the spidev_test.c for different combinations....... tx=all
0x00 , all 0xff
but every time i m getting SIMO=1.8V SOMI=1.8V but output=0.
i tested it with v2.6.32...........mainline
can u tell me on which kernel version spi works fine?
if u have tested it fine can u give the steps u followed??

I am using 2.6.33 with the patch available on the BeagleBoard/SPI wiki
page[1]. I did not do anything beyond simply applying the patch and
configuring the kernel.

- Ben

[1] http://elinux.org/BeagleBoard/SPI

hi ben
i tried v2.6.33 mainline kernel with config-2.6.33-tracker… but
surprisingly it failed to mount the filesystem.
i tried with 2gb, 4gb sd card with partition as recommended in
http://code.google.com/p/beagleboard/wiki/LinuxBootDiskFormat,.
is there any prebuilt uImage available with spi support for xm?
pls help me out

thanks u

The 2.6.32 version of the patch looks wrong. You have to set SPI Clock Pins to _INPUT_ to be able to read data back on MISO.

Take a look at the 2.6.37 version for a correct implementation. This issue has been added to the Technical Reference Manual[1] in its latest Revision F as well.

[1] http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sprugn4f&fileType=pdf or http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sprugw9e&fileType=pdf for a diff between Rev E & F.

Oh no! Thank you very much for pointing this out. I must have uploaded
the wrong patch iteration. At this point I think I'll just take down the
2.6.32 patch. The 2.6.37 patch should apply cleanly against earlier
versions anyways.

Cheers,

- Ben

Hmmm, I haven't seen this error before but I'd probably try bumping the
kernel to perhaps 2.6.34 or 2.6.35. Generally this is the approach I
take when there is a strange issue like this; sometimes things improve,
sometimes they regress further. It's worth a try though. Just git merge
the v2.6.34 tag and run make oldconfig and hopefully you'll be all set.
Sorry it's been so difficult to get this up and running.

Cheers,

- Ben

Hi, I tried many times to install Angstrom on a beagleboard rev C2 by Narcissus but I was no able to see the GUI. After the login I can see only black screen with moving mouse arrow. So I decided to install the rootfs at http://www.angstrom-distribution.org/demo/beagleboard/ and then installing what I need by opkg. Is that the right way? I’m trying to config the beagleboard for the connection using VNC and ethernet over USB, but I can’t use the module g_ether…
Please look these messages …

insmod g_ether.ko
[ 3355.881195] g_ether: module is already loaded
insmod: error inserting ‘g_ether.ko’: -1 Invalid parameters

root@beagleboard:/lib/modules/2.6.32/kernel/drivers/usb/gadget# lsmod
Module Size Used by
bufferclass_ti 3389 0
omaplfb 8749 0
pvrsrvkm 124731 2 bufferclass_ti,omaplfb
sdmak 3743 0
lpm_omap3530 6597 0
dsplinkk 125541 1 lpm_omap3530
rfcomm 33488 0
ircomm_tty 30629 0
ircomm 16429 1 ircomm_tty
irda 163469 2 ircomm_tty,ircomm
ipv6 249183 10
hidp 11193 0
l2cap 30104 4 rfcomm,hidp
bluetooth 49221 3 rfcomm,hidp,l2cap
rfkill 15030 1 bluetooth
pwc 74983 0
root@beagleboard:/lib/modules/2.6.32/kernel/drivers/usb/gadget#

Please, what can I do to load g_ether and configure it. After an installation without errors It is impossible … I get frustrated :frowning:
Thanks in advance

Luciana

hi,
i finally tried with v2.6.37-rc2, v2.6.37-rc5 by using .config and spi
patch files from
http://elinux.org/BeagleBoard/SPI#Hardware
but both failed to boot........
OMAP3 beagleboard.org # bootm 0x80300000
## Booting kernel from Legacy Image at 80300000 ...
   Image Name: Linux-2.6.37-rc2-ben+
   Image Type: ARM Linux Kernel Image (uncompressed)
   Data Size: 3203500 Bytes = 3.1 MB
   Load Address: 80008000
   Entry Point: 80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

that,s it.......... no response after then.........

i finally tried with v2.6.37-rc2, v2.6.37-rc5 by using .config and spi

[...]

Uncompressing Linux... done, booting the kernel.

that,s it.......... no response after then.........

In recent kernels the name of the ttyS2 has been changed to ttyO2, so you need to adjust the console boot parameter.

Search the list for ttyO2 for more info.

For 2.6.37rc you need the patches from http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/linux/linux-omap-2.6.37rc

I have compile linux-omap-psp-2.6.32 with the spi patch, with the CLK
set to input.
I have also compiled spidev_test
When I run spidev_test on my C4 all I get is zeros, while the CLK and
SIMO pins are always high (~1.8V) in the scope.

Can someone please provide a known good spidev_test executable? I am not
sure I did the crosscompiling correctly.

Giannis

Koen Kooi wrote:

I have compile linux-omap-psp-2.6.32 with the spi patch, with the CLK
set to input.
I have also compiled spidev_test
When I run spidev_test on my C4 all I get is zeros, while the CLK and
SIMO pins are always high (~1.8V) in the scope.

u should do the pin mux settings in u-boot works fine... i dont know
why it fails in kernel.

Can someone please provide a known good spidev_test executable? I am not
sure I did the crosscompiling correctly.

i dont think that it is problem of spidev_test executable since i
tried successfully through u-boot v2010.09