Unable to configure GPIO11

Hello,

We are using Jeston Orin NX devkit board.

We want to set GPIO11 pin as an output pin and toggle it using Jetson GPIO or command line.

Here is what we have tried so far:

  1. In Jetson GPIO, we modified test_all_pins.py to toggle GPIO11 (pin 32), and run the sample code. We can see all other pins are able to toggle, but GPIO11 does not toggle with Jetson-GPIO.

  2. We extracted DTS from the running kernel and changed the nvidia,function=“gp”. Originally it was with value nvdia,function=“extperipher4”. We verified this change was reflected by extracting DTS from procfs again. However we were still not able to toggle the pin

  3. Using devmem, as described in the manual.
    busybox devmem 0x02430070 w 0x004 (also checked with value 0x0, 0x1, 0x2)
    And then toggled the pin via sysfs entry:
    echo 454 > /sys/class/gpio/export
    cd /sys/class/gpio/PQ.06/
    echo out > direction
    echo 1 > value

Thank you,

Hello @pranav.tendulkar,

What do you see if you run:

sudo cat /sys/kernel/debug/gpio | grep 454

regards,
Andrew
support@proventusnova.com

Hi pranav.tendulkar,

What’s your Jetpack version in use?

Please also check the value after you configure it.

# cat /sys/class/gpio/PQ.06/direction
# cat /sys/class/gpio/PQ.06/value
root@xxxx:/home/abcd# sudo cat /sys/kernel/debug/gpio | grep 454
 gpio-454 (PQ.06               )
root@xxxx:/home/abcd# cd /sys/class/gpio/
root@xxxx:/sys/class/gpio# ls
export  gpiochip316  gpiochip348  unexport
root@xxxx:/sys/class/gpio# echo 454 > export
root@xxxx:/sys/class/gpio# ls
export  gpiochip316  gpiochip348  PQ.06  unexport
root@xxxx:/sys/class/gpio# cd PQ.06
root@xxxx:/sys/class/gpio/PQ.06# ls
active_low  device  direction  edge  power  subsystem  uevent  value
root@xxxx:/sys/class/gpio/PQ.06# echo out > direction
root@xxxx:/sys/class/gpio/PQ.06# cat direction
out
root@xxxx:/sys/class/gpio/PQ.06# echo 1 > value
root@xxxx:/sys/class/gpio/PQ.06# cat value
1
root@xxxx:/sys/class/gpio/PQ.06# echo 0 > value 
root@xxxx:/sys/class/gpio/PQ.06# cat value
0

We are using jetpack 6.0

In this thread it says sysfs is deprecate from JP 6.0 onwards. Not sure how these “echo…” commands worked on JP 6.0. In our jetson orion NX installed with 6.3, we could not find these gpio sysfs paths. “/sys/class/gpio/export…”

We enabled sysfs entries by explicitly configuring defconfig with following lines:

CONFIG_DEBUG_GPIO=y
CONFIG_SYSFS=y
CONFIG_GPIO_SYSFS=y
CONFIG_EXPERT=y
1 Like

From Jetpack 6.0, sysfs would not work even if you enable it from kernel config.
Please use gpiod instead, you can refer to the following thread for the detail steps of GPIO control in JP6.
Issue with GPIO on Jetson Orin Nano with Jetpack 6 - #9 by KevinFFF

Now it is working. Thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.