I cannot control the gpio from orin nano 8GB devkit

when i burn the factory image

and i install the gpiod library, use the follow command to control the header J12 the pin31 PQ.06:

sudo gpiofind “PQ.06” , this command return values: gpiochip0 106. so i send other command:sudo gpioset gpiochip0 106=1.and i use The multimeter reads 0V。

gpioset –drive=push-pull gpiochip0 106=1 is the same result

why??? how can i control the gpio???

*** Please note that this reply is generated by LLM automatically ***

Based on the provided context, I’ll try to help you troubleshoot the issue with controlling the GPIO pin on your Jetson Orin Nano.

Firstly, it’s great that you’ve successfully installed the gpiod library and used the gpiofind command to identify the GPIO pin corresponding to PQ06, which is gpiochip0 106.

However, when you try to set the pin high using gpioset gpiochip0 106=1, the multimeter reading doesn’t change, and you’re wondering why.

Here are a few potential reasons:

  1. Pin configuration: Make sure that the pin is configured as a GPIO pin and not as an SFIO (Special Function Input/Output) pin. You can check the Jetson Orin Nano pinmux spreadsheet to confirm the pin’s configuration. If the pin is configured as an SFIO pin, you might need to change the pinmux configuration to use it as a GPIO pin.
  2. Pin direction: Ensure that the pin direction is set to bidirectional (input/output) or output. You can use the gpiod command gpioinfo gpiochip0 106 to check the pin’s direction. If the pin direction is set to input, you won’t be able to control the pin’s output.
  3. Pin value: Verify that the pin value is actually being set to 1. You can use the gpiod command gpioget gpiochip0 106 to read the pin’s value. If the value is not being set to 1, there might be an issue with the gpioset command or the pin’s configuration.
  4. Pinmux settings: Check the pinmux settings for the PQ06 pin. You can use the pinmux command to verify the pinmux settings. Make sure that the pinmux settings are correct and that the pin is not being used by another peripheral.
  5. Hardware issue: It’s possible that there’s a hardware issue with the pin or the board. Try using a different pin or a different board to rule out any hardware problems.

To troubleshoot further, you can try the following:

  • Use the gpioinfo command to check the pin’s configuration and direction.
  • Use the gpioget command to read the pin’s value and verify that it’s being set correctly.
  • Use the pinmux command to verify the pinmux settings for the PQ06 pin.
  • Try using a different pin or a different board to rule out any hardware problems.

If none of these troubleshooting steps help, please provide more information about your setup, including the exact commands you’re using and the output of the gpioinfo and gpioget commands.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

I try you recommand the three command,but i found pinmux command not found

tvt@ubuntu:~$ sudo gpioinfo get the result: line 106: “PQ.06” unused output active-high

and gpioget value is always zero like this:

tvt@ubuntu:~$ sudo gpioset gpiochip0 106=1
tvt@ubuntu:~$ sudo gpioget gpiochip0 106
0

@carolyuu

tvt@ubuntu:~$ sudo pinmux
sudo: pinmux: command not found
tvt@ubuntu:~$ sudo apt-get install pinmux
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
E: Unable to locate package pinmux

Hi 1007306682,

What’s the Jetpack version in use?

Please apply the following patch if you are using JP6.x.
40hdr - SPI1 gpio padctl register bit[10] effect by gpiod tools in JP6 - #20 by KevinFFF

Have you configured the pinmux as following in pinmux spreadsheet?
image

Could you run the following command to control this pin instead?

# gpioset --mode=wait `gpiofind "PQ.06"`=1

jetpack 6.1

can you tell me how to modify the kernel driver and build it ???

like this website : Kernel Customization — Jetson Linux Developer Guide documentation???

@KevinFFF i modify the kernel as your suggestion, and flash new kernel image.

and i test sudo gpioset --mode=wait gpiofind "PQ.06"=1 but the header J12 the pin31 PQ.06 also reads 0v

Please refer to Kernel Customization — NVIDIA Jetson Linux Developer Guide 1 documentation instead for Jetpack 6.1(r36.4.0).

Have you also configured the pinmux spreadsheet for PQ.06 as I suggested before?

@KevinFFF i have modify kernel src as your suggestion,like this

but the test result is same problem

@KevinFFF After I tested the GPIO according to your modifications, it still cannot output high and low levels. What should I do next?

Could you run the following command when you hit the issue with controlling PQ.06?

$ sudo busybox devmem 0x02430070

Are you using the following command to control it?

# gpioset --mode=wait `gpiofind "PQ.06"`=0
# gpioset --mode=wait `gpiofind "PQ.06"`=1

Please simply use scope or multimeter to measure it w/o connecting any device.

@KevinFFF i change the jestson6.1 to jetson 5.1.2, i found this problem disappear, i can control the gpio normally why???

JP6 and JP5 have different SW stack and kernel driver for GPIO.
Do you want to stay in JP5.1.2 with workable GPIO control?

Or do you want to move back to JP6.x and I could help you to clarify the issue?
I’ve verified GPIO control working with JP6.x on my Orin Nano devkit setup.

you use the jetpack6.1 or jetpack6.2.1??? i am using jetpack 6.1

tvt@ubuntu:~$ sudo busybox devmem 0x02430070
0x00000058

and i excute the command of gpioset, i get the same result:gpio cannot output high level

@KevinFFF

Both should be fine.

How do you configure PQ.06(GPIO11) in pinmux spreadsheet?

Do you connect any device on this pin or you just use scope to check its level?

@KevinFFF

i do not configure PQ.06(GPIO11) in pinmux spreadsheet, how can i configure??? excute the /opt/nvidia/jetson-io/jetson-io.py file???

i just connect the pin with scope or multimeter, I do not connect other things

I had shared the example configuration in pinmux spreadsheet here.

Please refer to Generating the Pinmux dtsi Files for the details to apply the change.

@KevinFFF

I download the pinmux spreadsheet, and i found the pq.05 pq.05 is default function and do not need modify

@KevinFFF I modify the devicetree like this

and reflash the image to the board of using this command: sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_t234_nvme.xml -p “-c bootloader/generic/cfg/flash_t234_qspi.xml” --showlogs --network usb0 jetson-orin-nano-devkit internal

and test this problem is still exist