For users of the Atmel AT91SAM7 and AT91SAM9 ARM CPU chips. Atmel has taken a new direction by combining on chip flash and ram with the ARM CPU on a single die. This provides low cost devices for small systems using the ARM CPU.
This group is to exchange information to help users get started and learn how to use the devices.
AT91SAM9261EK Linux userspace SPI - Dan Lyke - Mar 19 19:33:50 2009
This should be easy (I think). I've turned on "Device Drivers--->SPI
Support--->User mode SPI device driver support" in my kernel config
(built in, not a module). In
linux-2.6.28/arch/arm/mach-at91/board-sam9261ek.c, I added the
following to the "spi_board_info ek_spi_devices" array:
{ /* comm to my sub device */
.modalias = "spidev",
.chip_select = 1,
.max_speed_hz = 10 * 1000 * 1000,
.bus_num = 0,
},
Which, I believe, should give me a userspace /dev/spisomething
half-duplex interface to SPI0 CS1.
I'm not seeing my device show up.
Anyone got a suggestion?
Dan
------------------------------------

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )
Re: AT91SAM9261EK Linux userspace SPI - micr...@virginbroadband.com.au - Mar 19 21:08:47 2009
Hi Dan,
AFAIK for char devices you need to use 'mkdev' to create the device - it
won't populate the /dev/ tree by itself.
If still problems, I'd consider compiling it as a module - then you can see
what's going on much easier with modprobe & family..
I'm not sure if you can use the alias for the mkdev process though. (?)
HTH
Best regards,
Kris
On Thu, 19 Mar 2009 15:36:51 -0700, Dan Lyke
wrote:
> This should be easy (I think). I've turned on "Device Drivers--->SPI
> Support--->User mode SPI device driver support" in my kernel config
> (built in, not a module). In
> linux-2.6.28/arch/arm/mach-at91/board-sam9261ek.c, I added the
> following to the "spi_board_info ek_spi_devices" array:
>
> { /* comm to my sub device */
> .modalias = "spidev",
> .chip_select = 1,
> .max_speed_hz = 10 * 1000 * 1000,
> .bus_num = 0,
> },
>
> Which, I believe, should give me a userspace /dev/spisomething
> half-duplex interface to SPI0 CS1.
>
> I'm not seeing my device show up.
>
> Anyone got a suggestion?
>
> Dan
> ------------------------------------

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )Re: AT91SAM9261EK Linux userspace SPI - Dan Lyke - Mar 19 22:18:58 2009
On Thu, 19 Mar 2009 15:36:51 -0700
Dan Lyke
wrote:
> This should be easy (I think). I've turned on "Device Drivers--->SPI
> Support--->User mode SPI device driver support" in my kernel config
> (built in, not a module).
Uh. Hang on, I'm having some programming issues, apparently. Still
happy to have insight, but this one's cause my new kernel isn't getting
into the data flash.
Dan
------------------------------------

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )Re: AT91SAM9261EK Linux userspace SPI - Dan Lyke - Mar 20 19:18:39 2009
On Fri, 20 Mar 2009 11:31:34 +1100
m...@virginbroadband.com.au wrote:
> AFAIK for char devices you need to use 'mkdev' to create the device -
> it won't populate the /dev/ tree by itself.
Just for closure on this:
1. I'm not sure if this is the default, but in all my futzing about I
added a
.controller_data = (void *) AT91_PIN_PA4,
line to my spi_board_info ek_spi_devices definition.
2. indeed, load the module, "mdev -s", device appears.
Thanks!
------------------------------------

(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )