Hi,
We are working on Jetson TX2 to Orin Nano migration activity.
Orin nano is running Jetpack 6.0. I have encountered an issue where the ‘/sys/class/gpio’ directory is missing from the system. In TX2 we were using this gpio folder for IO mapping in application.
Could you please provide guidance on the necessary configuration or steps to generate the ‘/sys/class/gpio’ directory?
Our board is missing that too, it seems like the overlay / device tree has the gpio pins on the header disabled. Trying to make sense of the pin mux stuff to get ours up with a fresh overlay.
The feature of using sysfs to control GPIO has been removed in JP6.
Please use GPIO character device API instead.
You can refer to Manage the GPIO lines from command line with gpiod for detailed usage.
Thank you for your response and for pointing us toward libgpiod usage.
Our current product has widely adopted the sysfs method for GPIO control, and transitioning entirely to the GPIO character device API would involve significant porting effort across the application layer. Given this, we would like to inquire if there are any potential configurations, patches, or workarounds available to enable the /sys/class/gpio interface on JetPack 6.0 for legacy support.
Your guidance on this matter would be greatly appreciated as it will help us evaluate the feasibility of maintaining compatibility with our existing product architecture.
Please refer to GPIO Control on JP6 Orin Nano and NX - #11 by DaveYYY for the similar issue as yours.
You can try to enable CONFIG_GPIO_SYSFS=y in kernel config and port the following 2 files since they have been removed in K5.15.
gpiolib-sysfs.c
gpiolib-sysfs.h
We don’t suggest and verify above approach since it is deprecated and would not support from JP6.