Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

spidev on sk-am64b

Featured Replies

Hi, is it possible to use spidev on sk-am64b?

 

when i run

 ls /dev/spidev*

it return nothing so i suppose its not enabled by default. 

 

Regards

Tobias

 

Edited by Tobias

  • Author

Ok, thank you. I cant find the overlay folder (probably because no overlays exist for sk-am64b). 

 

I have found some information regarding SPIDEV for my board here: https://software-dl.ti.com/processor-sdk-sitara/esd/am64x/latest/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/SPI.html.

It actually show an example of a device tree. Do someone know if there exist overlays that is known to be working or do i have to create my own?

 

Regards

Tobias

Hey Tobias, 

 

Indeed there aren't many examples but to point you in the right direction:

 

TI offers a web tool that you can also download called Sysconfig that lets you generate DTS files so you can find the right pin files (you'll need to match your config parameters with EVM schematic)

https://www.ti.com/tool/SYSCONFIG 

Screenshot2025-03-08at2_02_38PM.thumb.png.81ccb47344fd5bde074b2241845321df.png

You'll want to select Device (not Software Product) and click start....

 

Screenshot2025-03-08at2_03_39PM.thumb.png.627f4055970ca55ff46e7e04ea4d98d1.png

Then you can add a SPI node and match your pins etc, and you'll see it generates a device tree.dtsi files with the right pins for you. Something like this - 

 

Screenshot2025-03-08at2_03_59PM.thumb.png.1e0511fcd821fef98d7b3cb538dc930a.png

 

From there, to enable Spidev itself I would look at examples from BeagleBoard like this and adjust for your needs, this should give you the spidev node-

 

https://openbeagle.org/beagleboard/BeagleBoard-DeviceTrees/-/blob/v6.12.x-Beagle/src/arm64/overlays/k3-am67a-beagley-ai-spidev0.dtso?ref_type=heads 

 

Note - you might notice some oddity with "compatible = "rohm,dh2228fv";" - That's one of those weird things about embedded Linux, my understanding is that the Spidev maintainers don't really want you to just attach "any" device, they want you to specify the exact device that SPI will be connected to but if you'r developing you can use some of those older drivers to kind of force it to be have generically. 

 

Let me know if that helps :)

 

 

 

 

 

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.