GPIO calculation using below is not valid anymore for K5.10.
please refer to developer guide, [Identifying the GPIO Number] for the steps for looking up the port and offset.
may I know which pin you’re going to check?
you should look into pinmux configuration file, i.e. tegra19x-mb1-pinmux-p3668-a01.cfg
there’re address, values, and also the pin naming in the cfg file.
In “Jetson TX2 Platform Adaptation and Bring Up”, there are two base addresses of GPIO, 256 and 320 respectively, which can also be obtained by using the command shown in the following figure. How to obtain the base address of xavier nx in R35.1
ohh… you’re asking for kernel allocation ranges instead of physical reg address.
had you check [Identifying the GPIO Number] for the steps for looking up the port and offset?
there’re some approaches…
for example,
you may follow the same to check /sys/kernel/debug/gpio directly.
these also reported during kernel init, you can check kernel logs. $ sudo dmesg | grep "registered GPIOs" [ 3.062843] gpiochip0: registered GPIOs 504 to 511 on max77620-gpio [ 5.954009] gpiochip1: registered GPIOs 335 to 503 on tegra194-gpio [ 5.956153] gpiochip2: registered GPIOs 305 to 334 on tegra194-gpio-aon
please check via sysfs as below for confirmation.
for example, # cat /sys/kernel/debug/pinctrl/2430000.pinmux/gpio-ranges GPIO ranges handled: 0: tegra194-gpio GPIOS [335 - 499] PINS [0 - 164] 165: tegra194-gpio GPIOS [500 - 503] PINS [195 - 198] 0: tegra194-gpio-aon GPIOS [305 - 334] PINS [165 - 194]
GPIO calculation for using this formula is not valid anymore for JetPack-5.0.2 release version.
you may consider this gpio-321 is correct GPIO number of PCC.04 for system. $ sudo cat /sys/kernel/debug/gpio | grep PCC.04 gpio-321(PCC.04 )
That is, the R35.1 version can only obtain the GPIO number in this way, and cannot obtain the GPIO number through the calculation formula in advance as R32.5.1 version does. That is, there is no GPIO calculation formula in R35.1
Yes, but after seeing the calculation formula in the R32.5.1 manual, I thought that this version could also use the calculation formula to get the GPIO number. Thank you for your help