How to configure & toggle Expansion Header GPIOs on Jetson AGX Orin Dev Kit?

Hello,

I’m trying to control GPIO pins on a Jetson AGX Orin Developer Kit (expansion header) but I can’t toggle the GPIO state. I need clear, official documentation and practical steps to change a pin configuration to GPIO and control the gpio. Please help with:

Hardware / software

  • Board: Jetson AGX Orin Developer Kit
  • L4T version: 36.4
  • Kernel version: 5.15.148-tegra

What I want to do

  1. Configure specific expansion-header pins as GPIO

  2. Export and toggle the GPIO from user space (set direction, drive high/low).

  3. Know whether GPIO output voltage/current is limited, and how to increase current if possible (safe limits, recommended external drivers, device-tree or regulator settings if applicable).

What I’ve tried

  • sudo apt install gpiod then gpioset / gpioget — pin won’t toggle.
  • I have changed the can0_dout pins as gpio and generated the DTB file and put the overlay and flashed the device.

Hi richu.bini,

Which pin from 40-pins expansion header do you want to control?

Please configure pinmux of the desired pins as GPIO/Output/Drive 0 or 1 from pinmux spreadsheet if you want to control them.

For Jetpack 6.x(L4T r36.x), you may need to apply the patch from the following thread in case you hit unexpected issue.
40hdr - SPI1 gpio padctl register bit[10] effect by gpiod tools in JP6 - #20 by KevinFFF

Tried applying this patch. My issues is I tried to configure gen2_i2c scl pin (PCC.07) as gpio and expected it to be toggled with gpioset. But when I try this I do not get the intended result the gpio doesnt toggle but i can see that my configuration in which i tried to set it as output has been applied with gpioinfo. But I do not get resource busy errors either. I could get another pin CAN0_DOUT PAA.00 to toggle with the same method.

When i applied this patch this works Thank you.

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