How to use GPIO pins (for SPI DC and RST)

Hello all.

Well, a newbie question.

Need 2 pins, to connect an OLED screen on my J21 socket in SPI MODE.
DC pin, and Reset pin.

I followed tuto to configure gpio 298 and 398 :
sudo echo 298 > /sys/class/gpio/export
sudo echo 398 > /sys/class/gpio/export

Question : in my adafruit library, what pins should I enter :
Gpio value (298, 398), or pin number (31, 29)?

thanks in advance.

hello elpimous12,

please refer to [Release 28.1 Development Guide]-> [PDF Documents]-> [Tegra Linux Driver Package TX2 Adaptation Guide],
please check the [GPIO Changes] session for more details.

Hi JerryChang,
thanks for answer.
But I was unable to find Tegra Linux Driver Package TX2 Adaptation Guide !!

Berhaps anyone could help me to solve this small problem:

$ ls dev/spidev* -> /dev/spidev3.0

on my python program, I need to call the library with params :

serial = spi(device=3, port=0, DC=31 , RST=29)

is it correct to call spi pins by their number ? or must I do anything else ?
Do I need to import specific library, like gpio ?

thanks all

oh, it seems there was an error with multiples posts.
Please Admin, could you correct it ?

hello elpimous12,

please download the Release 28.1 Development Guide from the Jetson Download Center,
also, here’s TX2 J21 pins for your reference,

hello JerryChang,

Sorry, checked everywere and I couldn’t find this"Release 28.1 Development Guide"

I know the j21 pins, thanks to jetsonhacks.

Just need to control 2 gpio pins with python… (I have both pins, ready to control. Lol)

Anyone could help ?

Hi elpimous12,

Here is the link for “Release 28.1 Development Guide”: