GPIO issues in Jetpack 6.0 with Linux 36.3

I have 3 of the same Jetson Orin AGX 32GB machines on my desk.

I had Jetpack 5 on 2 of them, and Jetpack 6 (36.2) on one of them. A colleague told me that the GPIO outputs where not working on his Jetpack 6 device. I tried it on my Jetpack 6 device, and confirmed that it indeed was not working. It did, however, work on the Jetpack 5 devices. This is the script I used to test the GPIO output:

#!/bin/bash
# Define the gpiochip and correct line number
GPIOCHIP="gpiochip1"
GPIOLINE=8  # Adjust this based on `gpioinfo` output

# Run for 10 seconds
END=$(($(date +%s) + 10))
while [ $(date +%s) -lt $END ]; do
    # Set GPIO high
    sudo gpioset --mode=time -u 100000 $GPIOCHIP $GPIOLINE=1

    # Set GPIO low
    sudo gpioset --mode=time -u 100000 $GPIOCHIP $GPIOLINE=0
done

When I say that the GPIO was “working” on Jetpack 5, but not 6, I mean that I hooked up the oscillioscope to the pin in question (pin 32), and see the nice square wave on Jetpack 5, but nothing on Jetpack 6.

For documentation sake, I am getting the GPIOCHIP and LINE by first looking at the PIN diagram on page 32 here:

Jetson_AGX_Orin_DevKit_Carrier_Board_Specification_SP-10900-001_v1.1.pdf (1.1 MB)

which indicates that PIN 32 is called GPIO09. Page 34 of that document indicates that GPIO09 is SoC GPIO
Port # PBB.00. gpioinfo then tells us this:

...
gpiochip1 - 32 lines:
...
	line   8:     "PBB.00"       unused   input  active-high

As I mention, this works in the Jetpack 5 devices, but not the Jetpack 6 devices.

In the process of investigating, I came across this post, where the moderator says that the pinmux needs to be manually changed, and the device reflashed: How to dynamically set GPIO in Jetpack 6.0DP

To investigate further, I flashed one of my Jetpack 5 devices with Jetpack 6 (specifically the new production release 36.3). So now I have 3 different devices to test. The outputs of cat /etc/nv_tegra_release look like
:

# R35 (release), REVISION: 2.1, GCID: 32413640, BOARD: t186ref, EABI: aarch64, DATE: Tue Jan 24 23:38:33 UTC 2023
# R36 (release), REVISION: 2.0, GCID: 35084178, BOARD: generic, EABI: aarch64, DATE: Tue Dec 19 05:55:03 UTC 2023
... 
# R36 (release), REVISION: 3.0, GCID: 36106755, BOARD: generic, EABI: aarch64, DATE: Thu Apr 25 03:14:05 UTC 2024
# KERNEL_VARIANT: oot
TARGET_USERSPACE_LIB_DIR=nvidia
TARGET_USERSPACE_LIB_DIR_PATH=usr/lib/aarch64-linux-gnu/nvidia

The aforementioned script works on the Jetpack 5 device, but fails on both of these Jetpack 6 devices. By that I mean that the oscilloscope output is flat.

One thing that I find peculiar is that on the Jetpack 6 devices, the gpioinfo output seems to indicate that it should be working. But the oscilloscope output is flat. Specifically, under normal conditions,

matt@ubuntu:~$ gpioinfo | grep PBB.00
line 8: “PBB.00” unused input active-high

But when I run the script, then I see that change to :

matt@ubuntu:~$ gpioinfo | grep PBB.00
line 8: “PBB.00” “gpioset” output active-high [used]

1 Like