0
Yagi_Berra

[Rock64] How to Communicate with a SPI Device?

Recommended Posts

Armbianmonitor:

 

I have a Rock64 v2.  For my project I wish to connect the board to an MCP3008 ADC chip via SPI so I can read some analog sensors.  Pretty straightforward.

 

But when I look at /lib/modules/4.4.178-rockchip64/kernel/drivers I see there are modules for i2c, usb, one wire, GPIO ... everything but SPI.  Am I out of luck?

 

ARMBIAN 5.75 stable Ubuntu 18.04.2 LTS 4.4.178-rockchip64

 

Share this post


Link to post
Share on other sites

I switched to Nightly, that didn't help.  But I see on github that ayufan has mainline kernels that appear to have SPI in them.  I'll read up on how to do that and give it a try.  Thanks.

Share this post


Link to post
Share on other sites
9 hours ago, Yagi_Berra said:

I switched to Nightly, that didn't help.  But I see on github that ayufan has mainline kernels that appear to have SPI in them.

Armbian builds are based on Ayufan's branch. The spidev.ko module is present in DEV images. But you need to enable SPI in DeviceTree.

 

Share this post


Link to post
Share on other sites
On 5/17/2019 at 7:29 AM, martinayotte said:

Armbian builds are based on Ayufan's branch. The spidev.ko module is present in DEV images. But you need to enable SPI in DeviceTree.

 

 

This suggests I should be able to do a DT overlay with 

sudo enable_dtoverlay spi0 spi@ff190000 okay

but the enable_dtoverlay command is not found.  BTW I'm a maker, not a developer, so if it seems I'm floundering here, I am :-)  It would be really sweet if the armbian-config utility included an "interfaces" option similar to what the RPi has, where you can simply toggle GPIO, SPI, i2C, etc on and off.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0