Help with SPI node
grant.likely at secretlab.ca
Tue Oct 6 01:30:44 EST 2009
On Thu, Oct 1, 2009 at 10:19 AM, Joe Shmo <spamreceptor at yahoo.com> wrote:
> I'm attempting to get SPI to work on my embedded design
> that is based on the mpc8313erbd reference board wiht a
> 2.6.27 kernel. I cannot open the SPI device.
> Tracing through the kernel code, it looks like the device is
> not being found in the DTB file. However there is a
> SPI node in there already described. Our boards is a
> SPI master, and the device we will attach is a SPI
> slave. Could someone elaborate on what is needed in
> the DTS file to have our SPI driver work and respond to an
> open() call?
- you should also cc: the linuxppc-dev at lists.ozlabs.org when asking
questions about powerpc platforms.
- Please post in plain text only, not HTML. Yahoo should have an
option for posting in plain text instead of formated.
- "Joe Shmo"? It's not against the rules to use a pseudoname, but
it's not very polite.
Things to check:
- Once the system is booted, look in /sys/bus/of_platform/devices to
see if the SPI bus device is registered. If it isn't there then it
means that the 8xxx platform code (arch/powerpc/platforms/) isn't
registering the device.
- Look in /sys/bus/of_platform/drivers/ to see if the mpc8xxx_spi
driver is loaded into the kernel. If it isn't there, then you need to
load the driver into the kernel.
- If both are present, then look in
/sys/bus/of_platform/devices/e0007000.spi (I think; the name might be
slightly different) for a 'driver' symlink. If the symlink is there,
then it means that the driver is bound to the device. Most likely it
means that the "compatible" value in the node doesn't match what the
driver is looking for.
Look at those things and report back.
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
More information about the Linuxppc-dev