I am trying to control the PCIe 12V output from the AGX Xavier developer kit. I found a diagram in the setup guide that indicates GPIO 05 is used to control the voltage. I need to turn it on and off so I cannot just setup a new pinmux file and flash the board.
In the pinmux configuration xls GPIO05 is GPIO3_PA.01 It is in the audio_hv section but it does have the description GPIO_VDD_12V_ENABLE on CVB so I think this is the correct pin.
I executed the command $ sudo grep tegra-gpio /sys/kernel/debug/gpio
And my GPIO base address is 288
I looked at tegra186-gpio.h and PORT_A is 0
Based on the Linux GPIO number = (base + (8 * port) + pin) I think my GPIO number should be
288 + (8 * 0) + 1 = 289
In trying to understand this better I found this Python library that can drive GPIO outputs GitHub - NVIDIA/jetson-gpio: A Python library that enables the use of Jetson's GPIOs It does not have my GPIO05 in its configuration. I think this is because this GPIO is not located on the 40 pin connector. I did find it uses CAN1_DIN which in pixmux is GPIO3_PAA.01. AA is not a listed port in tegra186-gpio.h. The python program outputs the Linux GPIO number 289 when you read the input for CAN1_DIN.
I don’t understand why my GPIO05 → GPIO3_PA.01 is not 289 and I don’t know where they got the Linux GIPO number for GPI03_PAA.01
Can anyone help?