Orin Nx - Sysfs Pin Mapping for GPIO

Hi officialbertolaf606012,

Are you using the devkit or custom board for Orin NX?
What’s your Jetpack version in use?

Please refer to the Jetson Orin Nano Developer Kit Carrier Board Specification and find the following table.
image

You have to check the above table/pinmux spreadsheet/following command to get the gpio number for sysfs.

$ sudo cat /sys/kernel/debug/gpio

You still could use sysfs to control GPIO but you need to get root permission first.
For the new suggested method, you could refer to the following thread for gpiod.
Unable to access GPIO in the latest L4T 35.3.1 - #23 by lhoang