# Update device-tree after changing the GPIO configuration

**URL:** <https://forums.developer.nvidia.com/t/update-device-tree-after-changing-the-gpio-configuration/124196>\
**Category:** Jetson AGX Xavier\
**Tags:** gpio\
**Created:** [May 21, 2020, 4:12pm UTC](https://forums.developer.nvidia.com/t/update-device-tree-after-changing-the-gpio-configuration/124196 "2020-05-21T16:12:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![yairhav](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yairhav/32/13074_2.png) [@yairhav](https://forums.developer.nvidia.com/u/yairhav)\
**Post date:** [May 21, 2020, 4:12pm UTC](https://forums.developer.nvidia.com/t/update-device-tree-after-changing-the-gpio-configuration/124196/1 "2020-05-21T16:12:24Z")

</div>

Hi,

What is the exact procedure (step by step) in order to be able updating the device-tree with GPIO changes?  
I know i need to use Jetson\_AGX\_Series\_DevKit\_Pinmux\_Configuration\_Template.xlsm in order to generate new dtsi files and then generate the cfg file using pinmux-dts2cfg.py.

Then what?  
I need to replace the cfg file with the proper one and rebuild the kernel?  
I think this part is not clear enough in nvidia documentation.

Thanks,  
Yair

---

<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:** [May 22, 2020, 1:53am UTC](https://forums.developer.nvidia.com/t/update-device-tree-after-changing-the-gpio-configuration/124196/3 "2020-05-22T01:53:27Z")

</div>

hello yairhav,

you’ll need to replace those cfg files and flashing the board.  
you may check documentation, please refer to [Jetson AGX Xavier Platform Adaptation and Bring-Up](https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3242/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fadaptation_and_bringup_xavier.html%23wwpID0E0CD0HA) chapter.  
there’s [MB1 Configuration Changes](https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3242/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fadaptation_and_bringup_xavier.html%23wwpID0E0AP0HA) session for applying pinmux configuration changes.  
thanks

---

<div class="post-metadata">

**Author:** ![yairhav](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yairhav/32/13074_2.png) [@yairhav](https://forums.developer.nvidia.com/u/yairhav)\
**Post date:** [May 22, 2020, 5:50am UTC](https://forums.developer.nvidia.com/t/update-device-tree-after-changing-the-gpio-configuration/124196/4 "2020-05-22T05:50:34Z")

</div>

Thanks jerry, if i understand you correctly that mean i don’t need to build the device-tree?  
Can i flash only the device-tree or i need to flash all the system?  
The dtb binary use the cfg file?  
Which case will force me to generate new dtb file?

---

<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:** [May 22, 2020, 6:00am UTC](https://forums.developer.nvidia.com/t/update-device-tree-after-changing-the-gpio-configuration/124196/5 "2020-05-22T06:00:28Z")

</div>

hello yairhav,

device tree overwrite the settings; if you would like the settings to be applied in MB1, you’ll need to flash the cfg file to update the board configuration.

---

<div class="post-metadata">

**Author:** ![yairhav](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yairhav/32/13074_2.png) [@yairhav](https://forums.developer.nvidia.com/u/yairhav)\
**Post date:** [May 22, 2020, 6:13am UTC](https://forums.developer.nvidia.com/t/update-device-tree-after-changing-the-gpio-configuration/124196/6 "2020-05-22T06:13:44Z")

</div>

Thanks again,  
Which command flash the cfg file?

---

<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:** [May 22, 2020, 6:32am UTC](https://forums.developer.nvidia.com/t/update-device-tree-after-changing-the-gpio-configuration/124196/7 "2020-05-22T06:32:39Z")

</div>

hello yairhav,

you’ll need to perform a whole flash to update the cfg files.  
according to [Flash Script Usage](https://docs.nvidia.com/jetson/archives/l4t-archived/l4t-3242/index.html#page/Tegra%2520Linux%2520Driver%2520Package%2520Development%2520Guide%2Fflashing.html%23wwpID0E0XH0HA), you may skip building system.img, and reuse the existing one for flashing.  
for example, `$ sudo ./flash.sh -r jetson-xavier mmcblk0p1`

---

<div class="post-metadata">

**Author:** ![yairhav](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yairhav/32/13074_2.png) [@yairhav](https://forums.developer.nvidia.com/u/yairhav)\
**Post date:** [May 22, 2020, 6:43am UTC](https://forums.developer.nvidia.com/t/update-device-tree-after-changing-the-gpio-configuration/124196/8 "2020-05-22T06:43:52Z")

</div>

Thanks again,  
Somthing i dont understand, if this process doesn’t change the dtb file, if i reflash the whole system, reboot my board and then dump the dtb file into dts file, should i expect to see the changes i made to gpio?

---

<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:** [May 22, 2020, 8:21am UTC](https://forums.developer.nvidia.com/t/update-device-tree-after-changing-the-gpio-configuration/124196/9 "2020-05-22T08:21:58Z")

</div>

hello yairhav,

you should expect that GPIO behavior same as your customization,  
thanks

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 18, 2021, 6:22pm UTC](https://forums.developer.nvidia.com/t/update-device-tree-after-changing-the-gpio-configuration/124196/11 "2021-10-18T18:22:37Z")

</div>

Closed on October 18, 2021, 6:22pm UTC


