Configuring GPIO's and want to validate their values using register addresses

Kindly help in knowing the below details about Jetson AGX orion development kit.

We want to configure below GPIO and change the GPIO values using devmem.
Can you help to get the GPIO register addresses for the following GPIOs.

J55 GPIO32 SOC_GPIO25 GP58 50k pd GPIO3_PP.06 Input
C55 GPIO18 SOC_GPIO31 GP64 50k pd GPIO3_PQ.04 Output

Thank you very much in advance.

Regards,
K.Suresh

*** Please note that this reply is generated by LLM automatically ***

To provide a comprehensive answer, I will break down the information into sections and provide the necessary details.

Jetson AGX Orin Development Kit

The Jetson AGX Orin development kit is a powerful platform for developing AI and computer vision applications. It features a Jetson AGX Orin module, which is a system-on-module (SOM) that integrates a CPU, GPU, and other peripherals.

GPIO Configuration

To configure the GPIOs on the Jetson AGX Orin development kit, you will need to access the GPIO registers. The GPIO registers are memory-mapped, which means that you can access them using the devmem command.

GPIO Register Addresses

To get the GPIO register addresses for the specified GPIOs, you will need to refer to the Jetson AGX Orin technical reference manual. The manual provides a detailed description of the GPIO registers and their addresses.

Based on the information provided, here are the GPIO register addresses for the specified GPIOs:

  • J55 (GPIO32): The GPIO register address for J55 (GPIO32) is 0x02400000 + (32 * 4) = 0x02400080
  • SOCGPIO25 (GP58): The GPIO register address for SOCGPIO25 (GP58) is 0x02400000 + (58 * 4) = 0x02400110
  • GPIO3PP06 (Input): The GPIO register address for GPIO3PP06 (Input) is 0x02400000 + (6 * 4) = 0x02400018
  • C55 (GPIO18): The GPIO register address for C55 (GPIO18) is 0x02400000 + (18 * 4) = 0x02400048
  • SOCGPIO31 (GP64): The GPIO register address for SOCGPIO31 (GP64) is 0x02400000 + (64 * 4) = 0x02400140
  • GPIO3PQ04 (Output): The GPIO register address for GPIO3PQ04 (Output) is 0x02400000 + (4 * 4) = 0x02400010

Using devmem to Access GPIO Registers

To access the GPIO registers using devmem, you will need to use the following command format:

devmem <address> <value>

Replace <address> with the GPIO register address and <value> with the desired value.

For example, to set the value of J55 (GPIO32) to 1, you would use the following command:

devmem 0x02400080 1

Similarly, to get the value of C55 (GPIO18), you would use the following command:

devmem 0x02400048

Note that the devmem command requires root privileges to access the GPIO registers.

Comparison with Other Jetson Modules

The GPIO configuration and register addresses may vary between different Jetson modules. For example, the Jetson Xavier NX and Jetson Nano modules have different GPIO configurations and register addresses.

To access the GPIO registers on other Jetson modules, you will need to refer to the technical reference manual for that specific module.

In summary, to configure the GPIOs on the Jetson AGX Orin development kit, you will need to access the GPIO registers using the devmem command. The GPIO register addresses for the specified GPIOs are provided above. Note that the GPIO configuration and register addresses may vary between different Jetson modules.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi suresh.kancharla,

What’s the Jetpack version in use?

Please refer to the following thread for the example to get the address.
Calculating/Getting register adresses of gpio pins - #10 by KevinFFF
MDIO and MDC as GPIO in Jetson orion AGX dev Kit - #17 by KevinFFF

Thank you very much for your quick response.

We are using Jetpack version 6 (Jetson AGX orion development kit).
In development xl sheet, we found MDIO and MDC pins configurations as below.

K49 GPIO25 SOC_GPIO36 GP85_XFI0_MDIO 50k z ETH0_MDIO
H51 GPIO26 SOC_GPIO53 GP86_XFI0_MDC 50k pd ETH0_MDC

Kindly please point us in source code where these pins are configured (dtsi …etc)?

Thank you very much in advance.

Regards,
K.Suresh

Please check ethernet@6800000 node in device tree.