Change a GPIO pin internal pull-down to pull-up

I’d like to change a GPIO pin’s internal pull-down to internal pull-up.

The GPIO pin is GPIO17_MDM2AP_READY. This pin is internal pull up on TX1, but it is changed to internal pull down as a default on TX2.

So, I refered to the chapter “TX2 Configuring Pinmux GPIO and PAD” in the document “NVIDIA Tegra Linux Driver Package Development Guide 28.1 Release”. According to this document, I created dtsi files, converted to cfg files, and placed them to /bootloader/t186ref/BCT on the host PC. Placed files are following.


As next step, what should I do to reflect this changed to TX2?

Best Regards,

hello nanoto,

please download the TX2 pinmux spreadsheet from Jetson download center.

please have the modification to change the pin state and following the steps to generate the cfg files for flashing.

hi JerryChang

Thanks for your comment.

I’ve already generated the cfg files at posting the first message. After then, what should I do to flash?
Should I do the following command?

$ ./ jetson-tx2 mmcblk0p1

Because this command overwrites rootfs, I would not like to use this command.
If possible, I’d like to flash a part about pinmux.
Could you please tell me such a method?

Best Regards,

You can clone your rootfs first. Then flash everything with the clone in place via the “-r” option. E.G., if you have backup.img from a clone, then:
cp backup.img /where/ever/it/is/Linux_for_Tegra/bootloader

sudo -r jetson-tx2 mmcblk0p1

…everything will be flashed fresh except for the rootfs…this too will be flashed, but since the source is from a matching clone the net effect is no change (other than a lot of time being used).

Sample clone:

sudo ./ -r -k APP -G backup.img jetson-tx1 mmcblk0p1

…this actually produces both backup.img (sparse) and backup.img.raw (uncompressed, can be loopback mounted and edited).

hi linuxdev
Your method works well. Thank you very much!

However, … this method costs a long time for image backup.
Is not there more efficient method to change configuration of pins? ===> NVIDIA team

Best Regards,

Additional info.

When I tried linuxdev-san’s method, the following files which are described in NVIDIA document were useless.

So, I changed the file /bootloader/t186ref/BCT/tegra186-mb1-bct-pinmux-quill-p3310-1000-c03.cfg directly and flash TX2.
This way works well.

Hi nanoto,

“Is not there more efficient method to change configuration of pins? ===> NVIDIA team”
It just happend to be my question too.

I saw This Post showing how to change some Xaviers GPIOs behavior by tweaking these GPIOs memory block. May be this gives you some inspiration.

Where I can find docs about how to converting .dtsi -> .cfg file?

So far as I know “.dtsi” does not convert into “.cfg”. “.dtsi” files are just combined in the kernel build target “dtbs” depending on the configuration for the kernel. Several device tree source files and their include files are combined and then converted to binary “.dtb” format. I doubt that is what you were asking about, but I have no advice if you are interested in modifying the config file.