BBB spi dts follow up
ash
ash at aeria.net
Mon Apr 3 22:45:44 UTC 2017
On Saturday, 1 April 2017 23:13:24 UTC, Oleksandr Tymoshenko wrote:
> ash (ash at aeria.net) wrote:
>> I decompiled the stock dts to get started with:
>>
>> #dtc -I dtb -O dts /boot/dtb/beaglebone-black.dtb
> ... skipped ...
>> But still no /dev/spi0 device. Any pointers are welcome.
> There is no /dev/spi0 in FreeBSD at the moment. The only
> way to access SPI from userland is by using spigen device.
> With later HEAD builds (post r314934) you can load it as
> a module: "kldload spigen" otherwise you'll need to add it
> to kernel config as a "device spigen".
>
> spigen functionality is very limited, you can't specify
> SPI mode or CS line. General procedure is to open
> /dev/spigen0 with O_RDWR and then use ioctls to transfer
> data. You can use this example as a simple reference:
>
> https://github.com/gonzoua/freebsd-embedded-demos/blob/master/libssd1306/ssd1306_spi.c#L86
>
#kldload /dtmp/spigen.ko
:root:~:22:40:48:468beaglebone
spigen0: <SPI Generic IO> at cs 0 mode 0 on spibus0
*grin* Thank you so much.
--
-ash
More information about the freebsd-arm
mailing list