Device Tree Overlay for GPIO in Jetpack 6

I, like many others, am having issues getting the Orin AGX on Jetpack 6 to work. I’ve gotten to the point where I have a device tree overlay and can see it as an option in the expansion header configuration screen of jetson-io.py. However, I cannot get it to mark the pin as used in any way.

Below is the relevant portion of the dts file. It should be setting the pin 18 on the 40 pin header to be gpio (I need it as input).

    fragment@0 {
        target = <&pinmux>;

        __overlay__ {
            pinctrl-names = "default";
            pinctrl-0 = <&jetson_io_pinmux>;

            jetson_io_pinmux: exp-header-pinmux {
                    hdr40-pin18 {
                        nvidia,pins = "soc_gpio21_ph0";
                        nvidia,tristate = <0x0>;
                        nvidia,enable-input = <0x1>;
                        nvidia,pull = <0x0>;
                    };
             };
        };

What am I missing? I’ve been going through the documentation and forum but can’t find anything helpful.

Hi xguay,

Are you using the devkit or custom board for AGX Orin?
What’s the exact Jetpack version in use?

What do you mean about “mark the pin as used”?
May I know what’s your use case?

Are you trying to use Jetson-IO tool to configure the pin to be used as GPIO?
(e.g. PIN18 of 40-pins header to be GPIO/Input !?)

Are you trying to use Jetson-IO tool to configure the pin to be used as GPIO?
(e.g. PIN18 of 40-pins header to be GPIO/Input !?)

Exactly that. I’m trying to write a compatible hardware configuration for the Orin AGX Developer kit.
Also note I applied this related patch: jetson-orin-gpio-patch/pinctrl-tegra-sfsel.patch at main · jetsonhacks/jetson-orin-gpio-patch · GitHub
And I can’t generate a dts file via the pinmux spreadsheet to compare against because the macros fail for me.

Please also share this information so that I can know your state.

It is not supported currently.
Jetson-IO tool can only help you to enable some functions on expansion header.
By default, the unused pins are configured as GPIO/Input.
You can simply check pinmux spreadsheet for them.

You can also refer to GPIO JP6.1 different behavior than JP5.1.2 - #3 by KevinFFF for the similar use case.

So, now knowing that the default state of the pin is what I was looking for I dug into the issue a bit more. I tried declaring the pin usage though another method. It seems the BCM style pin declaration is not what I thought it was. My understanding is that it was the pin number NOT the GPIO number on the Raspberry Pi header. Big difference. So pin 18 is GPIO 24 according to this pinout document
Thank you for your time.