[beagleboard] BB_xm and SPI : spidev_test compile but get error message can't open device

It's only active with that image by default if you modify
"buddy=$buddy" in uEnv.txt on the boot partition to "buddy=spidev"...

Regards,

Thanks for your responses

I find the uEnv.txt file in /boot/uboot but i only find “buddy=${buddy}” i guess it’s the good line and replaced it by “buddy=spidev”
The problem is i didn’t find the spidev folder in /dev/ so i guess this modification of buddy= will probably change nothing.

I also tried to run a patch copying this patch :
http://elinux.org/BeagleBoard/SPI/Patch-rcn-ee-2.6.38.2-d9_mcspi3_gpio144_gpio183
in a file named myfile.patch but after typing “patch -p1 <myfile.patch”, i have this message :

(Stripping trailing CRs from patch.)
can’t find file to patch at input line 8
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

Thanks for your responses

I find the uEnv.txt file in /boot/uboot but i only find "buddy=${buddy}" i
guess it's the good line and replaced it by "buddy=spidev"
The problem is i didn't find the spidev folder in /dev/ so i guess this
modification of buddy= will probably change nothing.

Look again... Did you reboot after changing uEnv.txt?

Also verify via "dmesg | grep buddy"

I also tried to run a patch copying this patch :

http://elinux.org/BeagleBoard/SPI/Patch-rcn-ee-2.6.38.2-d9_mcspi3_gpio144_gpio183
in a file named myfile.patch but after typing "patch -p1 <myfile.patch", i
have this message :

That's been replaced via:

https://github.com/RobertCNelson/stable-kernel/blob/master/patches/beagle/0019-Enable-buddy-spidev.patch

Anything: 3.2.19-x13 and ++ has that enabled by default..

Regards,

thanks for your quick response

yes i had rebooted

dmesg | grep buddy give me :

[ 0.000000] Kernel command line: console=ttyO2,115200n8 console=tty0 vram=12MB omapfb.mode=dvi:1280x720MR-16@60 omapdss.def_disp=dvi root=/dev/mmcblk0p2 ro
rootfstype=ext4 rootwait fixrtc buddy=spidev buddy2=none

so i guess the modification is effective

i try the new patch you said but still have message "can’t find file to patch at input line 9
it’s asking me for a file just after the line:

+++ b/arch/arm/mach-omap2/board-omap3beagle.c

my command is still patch -p1 <myfile.patch
perhaps i use the wrong option (-p , --strip ) for this command ?
is that command supposed to create the dev/spidev directory ?

Why are you still trying to patch it? It's concluded by default...

voodoo@beagle-xm-512mb-a4:~$ dmesg | grep -i spidev
[ 0.000000] Beagle expansionboard: spidev
[ 0.000000] Kernel command line: console=ttyO2,115200n8
console=tty0 vram=12M omapfb.mode=dvi:1280x720MR-16@60
omapdss.def_disp=dvi root=/dev/sda6 ro rootfstype=ext4 rootwait fixrtc
buddy=spidev buddy2=none
[ 0.106109] Beagle expansionboard: registering SPIDEV

voodoo@beagle-xm-512mb-a4:~$ ls /dev/spidev*
/dev/spidev3.0 /dev/spidev3.1 /dev/spidev4.0

Regards,

Sorry for the last question, I didn’t see that spidev3.0, 3.1 and 4.0 were actually at the root of /dev

Now, i can’t execute the prog but the result is
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF…
hook up porblem like explain
in http://www.brianhensley.net/2012/02/spi-working-on-beagleboard-xm-rev-c.html

I guess it’s because i don’t have any SPI device plugged. for now, i was just thinking about monitor the result
on a logic analyser but since it doesn’t work without slave i will have to get one.

So my next purpose is to plug one DAC, but i recently found out that manage gpio with direct memory access (mmap function)
was a lot more faster. I wonder if the same is true with SPI since the OMAP3530 have special register
function dedicated to SPI or if the technique you help me with is equivalent ?

Thanks