Identifying the GPIO Number
If you designed your own carrier board, to translate from SOM connector pins to actual GPIO numbers, you must understand the following GPIO mapping formula. The translated GPIO numbers can be controlled by the driver.
Because the Jetson module dynamically registers GPIOs, search the kernel messages to check the GPIO allocation ranges for each GPIO group. The command and resulting output are similar to the following:
root@jetson:/home/ubuntu# **dmesg** | **grep gpiochip**
[ 5.726492] gpiochip0: registered GPIOs 348 to 511 on **tegra234-gpio**
[ 5.732478] gpiochip1: registered GPIOs 316 to 347 on **tegra234-gpio-aon**
root@jetson:/home/ubuntu#
As shown in the output above, there are two Jetson GPIO ports with different base indices:
- tegra234-gpio, at base index 348
- tegra234-gpio-aon, at base index 316
You can check the GPIO number in one of the following ways:
- Using a calculation.
Before you get started, you need to know how you plan to configure the offset at each available port.
Here is the list of the tegra234 GPIO ports and offset mapping:
Port | Number of Pins | Port Offset |
PORT_A | 8 | 0 |
PORT_B | 1 | 8 |
PORT_C | 8 | 9 |
PORT_D | 4 | 17 |
PORT_E | 8 | 21 |
PORT_F | 6 | 29 |
PORT_G | 8 | 35 |
PORT_H | 8 | 43 |
PORT_I | 7 | 51 |
PORT_J | 6 | 58 |
PORT_K | 8 | 64 |
PORT_L | 4 | 72 |
PORT_M | 8 | 76 |
PORT_N | 8 | 84 |
PORT_P | 8 | 92 |
PORT_Q | 8 | 100 |
PORT_R | 6 | 108 |
PORT_X | 8 | 114 |
PORT_Y | 8 | 122 |
PORT_Z | 8 | 130 |
PORT_AC | 8 | 138 |
PORT_AD | 4 | 146 |
PORT_AE | 2 | 150 |
PORT_AF | 4 | 152 |
PORT_AG | 8 | 156 |
PORT_AA | 8 | 0 |
PORT_BB | 4 | 8 |
PORT_CC | 8 | 12 |
PORT_DD | 3 | 20 |
PORT_EE | 8 | 23 |
PORT_GG | 1 | 31 |
- Search for the pin details from the Orin pinmux table (see Pinmux Changes).
For example SOC_GPIO08, which is GPIO3_PB.00. - Identify the port as B and the Pin_offset as 0.
- Calculate the pin number with the following formula:
base + port_offset + pin_offset - Verify the following values:
- Using Kernel debugfs.
Note
To use a pin as GPIO, ensure that E_IO_HV field is disabled in corresponding pinmux register of the GPIO pin. You can disable the 3.3V Tolerance Enable field in the pinmux spreadsheet and reflash the board with the updated pinmux file.
'기술자료 > Jetson' 카테고리의 다른 글
Jetson Orin Nano GPIO Input Control (0) | 2023.11.22 |
---|---|
Jetson Orin Nano GPIO Output Control (0) | 2023.11.22 |
Jetson Orin Nano GPIO Listing (0) | 2023.11.22 |
Jetson Partition (0) | 2023.11.22 |
Jetson/AGX Xavier Misc Interfaces (0) | 2023.11.22 |
Jetson boot dtb dts 관련 compile/decompile Makefile (0) | 2023.11.22 |
젯슨 상태 모니터링 jetson-stats 설치(jtop) (0) | 2023.08.07 |
터미널에서 jtop(jetson-stats) 원격 실행 (Remote jtop Run By Terminal) (0) | 2023.08.07 |