-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RSDK-1008] Support GPIO pins in the Jetson Orin AGX #1759
Conversation
Ugh. The linter isn't happy because it wants to disallow all replacements in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One ask - can you test on a beagle?
@edaniels @Otterverse what should he do here? Base library we use for other boards is missing a lot of functionality, we'd want to use our own fork of it, Alan has the functionality fixed on there. If we want to fix inside rdk, would need more thought and this is blocking Orin usage currently which consulting engineers want. He's going to add a ticket for more long-term adds to periph.io, which I think it the way to go. |
Replace will not work. Replace is not transitive to other modules. For example, if someone were to import RDK, the replace wouldn't take effect. The end user would also have to go mod replace. We should make a PR against periph. |
I made one at periph/host#27, but it doesn't support pinmuxing. Periph doesn't want to merge without that, and I had hoped that because Viam is not using pinmuxing I was unblocked enough that I could get back to working on our code, and Periph could do pinmux stuff themselves if they wanted. Eric, it sounds like you'd prefer that I work on Periph's requests some more, yeah? For background: Periph currently does not support any GPIO pins on the Jetson Orin board, so an end user importing the RDK and using Periph's library would be unable to use any GPIO features on an Orin (but would still be able to seamlessly work on a non-Orin board: our changes didn't modify that behavior at all). |
I tried the appimage on a fresh beaglebone: was able to toggle a GPIO pin high and low through app.viam.com, and verified with a multimeter that it did the expected thing. |
Eric, how would you feel if we imported "github.com/viamrobotics/host/v3" in our code instead of "periph.io/host/v3", with a comment about switching back if Periph ever adds support for the Jetson Orin? That's, like, a 5-line change that doesn't depend on a third party. |
…a replace directive?
|
If that works fine, that's okay. We should slowly get our change into periph though. Also need to file a JIRA and have a TODO)(JIRA-XXX) in the |
Sigh. I don't seem to be able to do this without a I still think a I think I need to give up on this PR, give up on periph for the Jetson Orin's GPIO pins entirely, and write our own version. 😖 I'm leaving the PR open in case someone disagrees, but will likely close it by tomorrow unless anyone has a better plan. |
Let's just port over that functionality into |
@penguinland and I discussed this last week (at least in part.) Periph.io is using the old "sysfs" interface anyway. The kernel developers have giant all caps warnings about it being deprecated and how it shouldn't be used. So the "right" way to do things would be the newer (kernel 4.8+, so not THAT new) character device interface. So I'd vote for implementing that properly and maybe drop our periph.io dependency entirely. Quick look found some other go libraries using the new cdev interface: https://github.com/temoto/gpio-cdev-go or https://github.com/warthog618/gpiod and there are probably others. |
sgtm |
The important line is the last line of go.mod, which references https://github.com/viamrobotics/periphio_host/pull/1. All the other changes to go.mod and go.sum were automatically created from running a
go get
command that the compiler prompted me to do.Tried at my desk: GPIO pins still work on Raspberry Pi, and work for the first time on a Jetson Orin AGX!