Update device-tree after changing the GPIO configuration


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.


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 chapter.
there’s MB1 Configuration Changes session for applying pinmux configuration changes.

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?

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.

Thanks again,
Which command flash the cfg file?

hello yairhav,

you’ll need to perform a whole flash to update the cfg files.
according to Flash Script Usage, you may skip building system.img, and reuse the existing one for flashing.
for example, $ sudo ./flash.sh -r jetson-xavier mmcblk0p1

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?

hello yairhav,

you should expect that GPIO behavior same as your customization,