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:
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.
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
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
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
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…”