How to get the address of gpio register

I want to use devmem2 to operate the registers of gpio, such as gpio B59, how do I get the related registers of the gpio, such as where to determine the register address of the gpio, how to set it as input and output, from which register to read input values, etc.

hello qinyyuu,

you may check Topic 57925 for reading gpio interrupts from user space.
or, you may access pinmux spreadsheets from download center, please have pin configuration and generate cfg files to flash the board for updating.
please also check documentation, Configuring the 40-Pin Expansion Header for more details.

BTW, please also check Topic 123596 for a simple look-up table for values for any of Tegra GPIOs.

hello JerryChang,
thank you very much!