Jetson NX SOM GPIO mapping to board or bcm for python code


I am implementing the Jetson NX SOM via 260 pin SODIMM and want to utilise the GPIO’s that are different to those used in standard 40 pin header.

How do I address these GPIO’s via python code using BCM or Board mode from Jetson GPIO python library.

For example, I want to define GPIO04 (pin127) and GPIO06 (pin130) as inputs and read from these pins.

I have code that works using BCM for pins that exist in 40 pin header by cross referencing the BCM number for corresponding Pin using RPi header table, but I have not been able to find any complete table that defines Jetson GPIO numbers to BCM or Board numbers

What is the proper way to address GPIO’s on NX SOM without having to change any pinmux tables, or does anyone have a complete GPIO to BCM table.

hello rapidproto,

there’s pinmux spreadsheets to show the mappings.

Thanks Jerry, I already have pinmux, what I am looking for is an example or instructions on how to address these GPIO’s from Python. We are not using any dev kit, we are connecting directly to the SOM SODIMM 260 pin numbers, e.g GPIO04 (pin 127) in pinmux

hello rapidproto,

you may check # cat /sys/kernel/debug/tegra_pinctrl_reg for pin address, and its values.
please note that,
kernel side is using “Ball Name” for its pin naming, for example, GPIO04 named SPI2_MISO in system level, and it’ll follow by its pin configuration, due to the pin configured as GPIO, you’ll need to check spi2_miso_pcc1 for the pin address,
for example,

# cat /sys/kernel/debug/tegra_pinctrl_reg | grep pcc1
Bank: 1 Reg: 0x0c302050 Val: 0x00001002 -> spi2_miso_pcc1

Thanks Jerry,

On this xavier-nx, it does not allow cat on that directory, reports permission denied. I included sudo as shown.

I found this link which is consistent with your reply, so am i missing a step somewhere.

Regards, rapidproto

hello rapidproto,

may I also know which JetPack release you’re working on? thanks

Hi Jerry,

I tried JP 5.0.1 and got permissions error

hello rapidproto,

JetPack 5.0.2 is now live, please access JetPack SDK | NVIDIA Developer and moving to production release for confirmation.
JetPack 5.0.1 / l4t-r34.1.1 is developer preview version, and it’ll deprecated soon.

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