[U-Boot] SPI question

Steve Strobel steve.strobel at link-comm.com
Wed Feb 20 17:04:07 CET 2013


On Tue, Feb 19, 2013 at 5:12 PM, NeonJohn <jgd at neon-john.com> wrote:

> Hello,
>
> Veteran developer, new to Linux internals.  I'm working with the
> BeagleBone and need three SPI ports.  I'm now working to enable the
> second chip select on the second port.  I need some basic information to
> get started.
>
> Is the port initialization done in u-boot or in the kernel?


I haven't yet used the Beagle Bone (though I have one on my desk), but I
have used SPI on a Blackfin target with U-Boot and Linux.  On that target,
the Blackfin's built-in first-stage bootloader uses SPI to load U-Boot into
memory from flash and runs it.  U-Boot then reads the Linux kernel image
into RAM from the SPI flash and boots it.  Those things probably don't
apply in your case, unless your flash uses an SPI interface.

Then everything else SPI related is done in Linux.  Specifically there is a
"board" file where the peripherals are set up.  On my target there is both
a hardware-assisted SPI bus with several attached chips and a "bitbanged"
SPI bus.  Those buses (including the pin assignments) are set up in the
board file and the peripherals are attached to the buses and assigned chip
select pins.  I don't know if those things are handled the same way for the
Beagle Bone or not;  I use a custom Linux distribution for Blackfin that
may work differently.

This is straying off topic for the U-Boot list, but if you want more info
about how it works on my target, email me directly.

Steve


-- 
Steve Strobel
Link Communications, Inc.
1035 Cerise Rd
Billings, MT 59101-7378
(406) 245-5002 ext 102
(406) 245-4889 (fax)
WWW: http://www.link-comm.com
MailTo:steve.strobel at link-comm.com


More information about the U-Boot mailing list