Change GPIO status by /dev/mem

I want to change the GPIO state by changing /dev/mem for speed.
However, I do not know the register address corresponding to GPIO.
Is there a register map like the items in the following materials?

Tegra_X1_TRM_DP07225001_v1.3p.pdf
9.13 GPIO Registers

1 Like

hello kimiharu-nishihata,

since Xavier and NX were sharing the same chip version, you may access Xavier TRM for reference.
please check [Table 8.54 GPIO’s in Different Pad Control Groups] for the PAD control groups of GPIO controller.
you should also found the register address mappings in [8.5.4 PinMux Registers] session.
thanks

Hi JerryChang.

Thanks.
I wanted to make j12 Header 29 pin high in the development kit, but I wrote it to the register as follows, but it did not become high.
(j12 Header 29 = gpio01 = SOC_GPIO41)
Write value 0x00000009 to 0x02430028 address.
Do you need to change the pinmux settings?
image

hello kimiharu-nishihata,

according to your Jetson Expansion Header Tools snapshot, you should configure pin-29 as GPIO pin, i.e. GPIO3_PQ.05 instead of EXTPERIPH3_CLK
thanks

How to flash in case of Jetson Xavier NX kit after generating dtsi file from excel file and converting to cfg with script file?

hello kimiharu-nishihata,

please refer to Pinmux Changes session for steps, thanks

Thanks.
I know about the pinmux settings.

I just want to do something like the link below with Jetson Xavier NX.


But, I don’t know the GPIO address.
For NX, how do I get the address?

At TX2
GPIO_392 0x02215000 // J.00 GPIO address

At Xavier NX
GPIO_421 0x??? // Q.05 GPIO address

hello kimiharu-nishihata,

if you using python scripts to convert those dtsi files into cfg board configuration files.
you’ll also found there’s i2c address, and its default values for the GPIO pins.
thanks

Thanks JerryChang.

I understood.
When setting Output, Drive 0 with pinmux excel, the register to write the setting and output setting to the CFG file was displayed.
It turned out that it would not be necessary to change the kernel if the GPIO settings were changed in the program.


image

Thank you, very much.

1 Like