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 a spi-gpio device

Featured Replies

I'm currently working on the meson64 family (C2, K2, Le Potato) as a family, and am trying to more or less make their GPIO behaviors similar and matching (as best I can) to the RPi they are form factor clones of.  An issue I'm having right now has to do with the spidev driver, these boards don't have hardware spi where the Pi/Tinker does does, so I'm defining spi-gpio devices in the device tree.  That part is fine.  Where it gets interesting is setting up a spidev node under it.

 

- Calling out a compatible = "spidev" works, enumerates, etc, but throws the typical ugly error during boot that it is wrong to do it that way.

- Adding a compatible string to the driver (as seen in Tinker and recommended in the documentation) results in no device enumeration.

 

Has anyone come across this?  I'm not going to put much more time into it and just deal with the error if there's not some obvious reason for it not working.

 

[edit] Yes, I have made sure the compatible string added to the driver and the one in the dts match.  :lol:)

 

  • Author

It is a warning with a stack trace, it was intentionally put into the spidev driver to make people create compatible strings. It doesn't actually do anything, but it looks/acts like a real bug in the dmesg output, I'm assuming it's only a matter of time before we get questions about why the kernel is complaining on boot.

Sent from my Pixel using Tapatalk

  • Author

Yes, that one. Basically it is a simple check that just looks to see if compatible = "spidev". It's a technicality that someone decided was worth a lot of noise, the device tree is for hardware description, spidev is a driver, so you "shouldn't say the driver is compatible with itself". So it is desirable for the board/distro maintainers to define a "hardware" at least in name (I was arbitrarily choosing "armbian,soft_spi"), then applying the driver to that.

The concern for me is that compatible = "spidev" loads properly, but after adding a compatible string and using it, it doesn't load. The only functional difference between the working Tinker board implementation of spidev and my try on Amlogic is the fact that I have a bit-banged software SPI device, not a hardware one.

Sent from my Pixel using Tapatalk

Guest
This topic is now closed to further replies.

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.