BBB SPI port config ofw,dts question
ash
ash at aeria.net
Thu Mar 30 00:09:30 UTC 2017
I'd like to mate an SPI flash for my lattice iCE fpga's directly to the spi
port on
the BBB. I'm having difficulty driving the ofw/dts/devtree .
I've crocheted an install; and it's stable enough to boot, network and
mount nfs.
root at beaglebone:~ # uname -a
FreeBSD beaglebone 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r315282: Tue Mar 14
21:06:39 UTC 2017
root at kaylee.dyn.aeria.net:/dozer/bbone/crochet/work/obj/arm.armv6/usr/12headsrc/sys/BEAGLEBONE
arm
I see that the spi peripherals are in the dts via:
root at beaglebone:~ # ofwdump -a | grep spi
Node 0x5eb4: spinlock at 480ca000
Node 0x67ac: spi at 48030000
Node 0x68d8: spi at 481a0000
How do I instruct the fdt machinery to 'instantiate' an
spi channel, associate cs pins and see what spi flash i/o options are
already in the tree.
The config.txt documentation has so far evaded me.
This helped a bit, but that heavy lifting has been done a is in CURRENT +
crochet
https://wiki.freebsd.org/FlattenedDeviceTree
I'd like to use one of these common spi devices at the end of the day:
SST25VF512A-33-4C-SAE
S25FL116K0XMFI041
N25Q128A13ESE40E
http://www.mouser.com/Search/ProductDetail.aspx?R=SST25VF512A-33-4C-SAEvirtualkey57940000virtualkey804-25VF512A3CSAE
http://www.mouser.com/Search/ProductDetail.aspx?R=S25FL116K0XMFI041virtualkey66850000virtualkey797-25FL116KOXMFI041
http://www.digikey.com/product-detail/en/N25Q128A13ESE40E/557-1562-ND/3874288
Given the spigen code, am I going to be writing a kernel module or is are
there enough userland tools to manage? Is there some sample code that does
this?
--
-ash
More information about the freebsd-arm
mailing list