/opt/nvidia/jetson-io/jetson-io.py does not work, so I’m wondering after reading this post and this post if I missed an update or a step in setting up the GPIO?
there’s an issue to configure GPIO directly on JetPack-5.0 DP,
currently, if you would like to make changes dynamically, you may use devmem/reg_dump to update pinmux register , or update MB1 pinmux bct file.
for example, pinmux.0x02430030 = 0x0000005a; # soc_gpio42_pq6: rsvd2, pull-up, tristate-enable, input-enable, io_high_voltage-disable, lpdr-disable
please set both bit-4 and bit-6 as 0 to configure this pin as output mode. after that, you should be able to control the pin through sysfs.
for example,
pinmux register: 0x02430030 / Default boot value: 0x5a
please update bit-4 and bit-6 to set required direction. whereas, Output: Bit 4 = 0 Bit 6=0, Input: Bit 4=1 Bit 6=1
please try below steps to make GPIO output working.
$ sudo devmem2 0x02430030 w 0x0a
$ echo [GPIO number] > /sys/class/gpio/export
$ cd /sys/class/gpio/PQ.06
$ echo out > direction
$ cat value # change value and check.
you may also refer to developer guide, To check a GPIO number ,
please follow the GPIO debugfs for looking up the port and offset.
for example,
454 is the GPIO number of PQ.06
FYI,
there’s GPIO fixes included in the next Jetpack public release, JetPack-5.0.2 will be available on mid-Aug,
you may see-also Topic 222842 for details. thanks