Using Jetson-TX2-Series-Pinmux-Template I changed the Customer Usage for both uart pins 8 & 10 to GPIO3_PT, exported the dtsi files, converted them to cfgs and re-flashed the TX2.
I have two questions:
The pins are listed as ‘rsvd’ instead of ‘unused’, is this anything to be concerned about?
I am unable to test the pins gpio functionality using jetson-gpio as the pins are not registered in the gpio_pin_date.py file. Is it safe/recommended to manually add the pin into this file? Or is their another more common method to enabling the gpio api for pin 8 10?
[ 0.470658] gpiochip_setup_dev: registered GPIOs 320 to 511 on device: gpiochip0 (tegra-gpio)
[ 0.474610] gpiochip_setup_dev: registered GPIOs 256 to 319 on device: gpiochip1 (tegra-gpio-aon)
the gpio number of GPIO3_PT.00 is… 18 * 8 + 0 + 320 = 464
you may enable GPIOs manually once you know the GPIO number,
for example, # echo 464 > /sys/class/gpio/export # cd gpio464 # echo 1 > value
Thank you, that worked. I am able to manually execute control commands to the GPIO. How do I go about adding the pin/s to the Rpi.gpio (jetson-gpio) so that I can control them via software?
you may add the pin definition then you’ll able to control it through software level.
please look into gpio_pin_data.py and test_all_pins.py for reference,
thanks
I’ve been spending time creating the definition for each pin I’ve modified to be GPIO i.e. pins 3, 5, 8, 10. I’ve looked through documentation and forms but I can figure out a couple of values used for the definitions (indicated by cross out text):
don’t there, Line32-Line47 show the description of each field in the array?
besides,
here’s head file to define all the GPIO ports and the calculation formula.
for example, $L4T_Sources/r32.6.1/Linux_for_Tegra/source/public/kernel/kernel-4.9/include/dt-bindings/gpio/tegra186-gpio.h
please also see the developer guide, GPIO Changes for the instructions to check the GPIO number.
thanks