# Xavier NX changing pin function

**URL:** <https://forums.developer.nvidia.com/t/xavier-nx-changing-pin-function/195558>\
**Category:** Jetson Xavier NX\
**Tags:** device-tree, gpio\
**Created:** [November 18, 2021, 12:12pm UTC](https://forums.developer.nvidia.com/t/xavier-nx-changing-pin-function/195558 "2021-11-18T12:12:37Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![boris16](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@boris16](https://forums.developer.nvidia.com/u/boris16)\
**Post date:** [November 18, 2021, 12:12pm UTC](https://forums.developer.nvidia.com/t/xavier-nx-changing-pin-function/195558/1 "2021-11-18T12:12:37Z")

</div>

Hello,  
I’m a littile bit confused about how should I modify a pin configuration.  
I’m using Xavier NX development kit, and I want to use 2 SPI interfaces by changing the pin configuration from GPIO to SPI.  
What have I done so far is:

1. Edited the xlsm file.
2. Generated 3 dtsi files from the xlsm file.
3. Created 2 cfg files (one for PINMUX and GPIO and another for PAD VOLTAGES) according to the readme file in Linux\_for\_Tegra/kernel/pinmux/t19x

I saw this guide [https://docs.nvidia.com/jetson/l4t/#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/mb1\_platform\_config\_xavier.html#wwpID0E0H50HA](https://docs.nvidia.com/jetson/l4t/#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/mb1_platform_config_xavier.html#wwpID0E0H50HA)  
But it’s not so clear how to continue.

I have a few questions regarding the next steps:

1. What should I do with the cfg files? Should they have a specific name?
2. What should I do with the 3 dtsi files I’ve generated from the xlsm file?
3. How should I generate the new dtb file? I’m familiar with the dtc tool to compile the device tree files but should I somehow include the generated dtsi files into the directory of the dts sources located in directory Linux\_for\_Tegra/sources/hardware/nvidia/platform/t19x/jakku/kernel-dts  
and after that run the dtc?
4. How should I flash cfg files?  
a. Will the following command flash the cfg files to the board?  
sudo ./flash.sh -r -k bpmp-fw-dtb jetson-xavier-nx-devkit mmcblk0p1  
b. If I run from nvme should it be as following?  
sudo ./flash.sh -r -k bpmp-fw-dtb jetson-xavier-nx-devkit nvme0n1  
I would like to keep the rootfs contant and not to do full flash.
5. Should I change anything in the device tree sources in order to change pin function?

Please help me to understand this issue

Thanks,

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [November 21, 2021, 2:45pm UTC](https://forums.developer.nvidia.com/t/xavier-nx-changing-pin-function/195558/3 "2021-11-21T14:45:25Z")

</div>

hello boris16,

you should copy those dtsi file to your local x86 host machine and re-compile the device tree blob (i.e. \*.dtb)  
the generated \*.cfg file used by the flashing process, you need to perform the full flash to apply the changes correctly.

---

<div class="post-metadata">

**Author:** ![boris16](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@boris16](https://forums.developer.nvidia.com/u/boris16)\
**Post date:** [November 22, 2021, 7:27am UTC](https://forums.developer.nvidia.com/t/xavier-nx-changing-pin-function/195558/4 "2021-11-22T07:27:23Z")

</div>

Hi JerryChang,

Thanks for the reply.  
I still have few questions:

Which names should I give to cfg and dtsi files?

Should I copy the dtsi files to _Linux\_for\_Tegra/sources/hardware/nvidia/platform/t19x/jakku/kernel-dts/common_ directory? And how to be sure that those files are compiled, should I edit one of the dts files and include my dtsi files there?

Thanks for your help  
Boris

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [November 22, 2021, 7:45am UTC](https://forums.developer.nvidia.com/t/xavier-nx-changing-pin-function/195558/5 "2021-11-22T07:45:46Z")

</div>

hello boris16,

please check the flash messages for the actual binary and configure files that burning to the target.  
for example,

```auto
[4.0498] Parsing config file :tegra19x-mb1-pinmux-p3668-a01.cfg

```

```auto
[464.1538] Writing partition kernel-dtb with tegra194-p3668-all-p3509-0000_sigheader.dtb.encrypt
[464.1617] [................................................] 100%

```

---

<div class="post-metadata">

**Author:** ![boris16](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@boris16](https://forums.developer.nvidia.com/u/boris16)\
**Post date:** [November 29, 2021, 3:01pm UTC](https://forums.developer.nvidia.com/t/xavier-nx-changing-pin-function/195558/6 "2021-11-29T15:01:32Z")

</div>

Hi Jerry,  
I still didn’t understand the whole workflow of changing the pinmux.  
I saw the Pinmux Changes section in Nvidia guid:  
[https://docs.nvidia.com/jetson/l4t/#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/adaptation\_and\_bringup\_xavier\_nx.html#wwpID0E0VL0HA](https://docs.nvidia.com/jetson/l4t/#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/adaptation_and_bringup_xavier_nx.html#wwpID0E0VL0HA)

But it is not clear what to do with the generated dtsi and cfg files.

dtsi sources are located in directory  
Linux\_for\_Tegra/sources/hardware/nvidia/platform/t19x/jakku/kernel-dts/common  
How should I include the generated dtsi files?

Should I copy the cfg files into the following directory?  
Linux\_for\_Tegra/bootloader/t186ref/BCT  
Should the generated cfg files have a specific name or they should replace some of the existing files?

Thanks,  
Boris

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [November 30, 2021, 1:56am UTC](https://forums.developer.nvidia.com/t/xavier-nx-changing-pin-function/195558/7 "2021-11-30T01:56:26Z")

</div>

please check this thread, [Custom carrier board with NX module](https://forums.developer.nvidia.com/t/custom-carrier-board-with-nx-module/196097) for reference, thanks

---

<div class="post-metadata">

**Author:** ![boris16](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@boris16](https://forums.developer.nvidia.com/u/boris16)\
**Post date:** [November 30, 2021, 3:53pm UTC](https://forums.developer.nvidia.com/t/xavier-nx-changing-pin-function/195558/8 "2021-11-30T15:53:25Z")

</div>

Thanks, I still don’t understand how to integrate the generated dtsi file into the device tree sources

---

<div class="post-metadata">

**Author:** ![JerryChang](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jerrychang/32/14043_2.png) [@JerryChang](https://forums.developer.nvidia.com/u/JerryChang)\
**Post date:** [December 1, 2021, 2:55am UTC](https://forums.developer.nvidia.com/t/xavier-nx-changing-pin-function/195558/9 "2021-12-01T02:55:19Z")

</div>

hello boris16,

please access [https://developer.nvidia.com/embedded/linux-tegra](https://developer.nvidia.com/embedded/linux-tegra) and download the BSP sources package.  
you should also refer to developer guide for [Building the NVIDIA Kernel](https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3261/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/kernel_custom.html#wwpID0E0WD0HA).  
thanks

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [December 22, 2021, 5:15am UTC](https://forums.developer.nvidia.com/t/xavier-nx-changing-pin-function/195558/11 "2021-12-22T05:15:29Z")

</div>

Closed on December 22, 2021, 5:15am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
