How to use the .dtsi files generated by pinmux tool?

I designed my carrier board for NX module, and some gpios are used different with the devkit (some pins not in the 40-pin GPIO header on devkit). And I generated three .dtsi files using pinmux tool.

They are:

  1. xxx-gpio-default.dtsi
  2. xxx-padvoltage-default.dtsi
  3. xxx-pinmux.dtsi

I know I need compile them to .cfg files using ‘pinmux-dts2cfg.py’ but don’t know very clearly is what I need to do next.

  1. Where the .cfg file should be put and what files I should edit to include/use them?
  2. I know the .dtsi should be used to compile the Linux device tree, which files should be used? All three?

Thanks

hello diverger,

the cfg file is used for image flashing, you should setup the develop environment with NVIDIA SDK Manager | NVIDIA Developer.
it’ll download the JetPack release image to your local x86 host machine, which contain all necessary binaries, scripts, tools…etc.
the default installation path is looking like… ~/nvidia/nvidia_sdk/JetPack_<version>_<platform>/Linux_for_Tegra/

as you can see though flashing messages, it’s tegra19x-mb1-pinmux-p3668-a01.cfg for the pinmux configuration file, you may execute pinmux-dts2cfg.py and update the cfg file by running the flash script. i.e. $ sudo ./flash.sh -r jetson-xavier-nx-devkit mmcblk0p1

please include all those dtsi files to re-compile device tree blob. i.e. tegra194-p3668-all-p3509-0000.dtb

That is I need to overwrite the file ‘tegra19x-mb1-pinmux-p3668-a01.cfg’ in the ‘Linux_for_Tegra/bootloader/t186ref/bct’, with my .cfg file, and reflash the mmcblk0p1, right?

hello diverger,

that’s correct, please do remember to back-up the original cfg file just in case you’ll need to revert the settings.

About the device tree blob. Can I simply include the three *.dtsi file in the main dts file under Jakku folder?

Thanks.

hello diverger,

yes, please note the include sequence, the later include dtsi file is able to overwrite the property values.
you also may disassembler the final dtb file into text file to examine your settings,
for example, $ dtc -I dtb -O dts -o output.txt tegra194-xxx.dtb

Some GPIOs not in the hdr40 are used for other functions on our carrier. And I don’t want to change the original source files. May I use overlays to disable them, and allocate them to our function? If it’s OK, I think I should add them into the makefile, right?

Thanks.

I include the three .dtsi files in the “tegra194-p3668-all-p3509-0000.dts”, but when compile the DTS, it say there are syntax error in the “xxxx-padvoltage-default.dtsi” file.

What may cause this? 'Cause the content is generated by the pinmux tool, I doubt the include order may cause this, right?

==========================================================
Edit:

The reported error lines:

		audio_hv {

			nvidia,io-pad-init-voltage = <IO_PAD_VOLTAGE_OFF>;

		};



		ufs {

			nvidia,io-pad-init-voltage = <IO_PAD_VOLTAGE_OFF>;

		};

It seems the “IO_PAD_VOLTAGE_OFF” cause the error, why?

Thanks.

I see in the BCT folder, there are files called:

tegra19x-mb1-padvoltage-p3668-a01.cfg
tegra19x-mb1-prod-p3668-0001-a00.cfg
tegra19x-mb1-pinmux-p3668-a01.cfg

And my module is a production version of NX module. So, may you confirm that which files need to be overwritten with my .cfg files?

Thanks.

hello diverger,

  1. you’re able to use the overlays to update device tree properties,
    please check developer guide to execute Jetson-IO to create Device Tree Overlays.

  2. what’s the complete error logs for the syntax error? it usually an unrecognize failure, such as unable to parse input tree

  3. please refer to flashing messages, there’re pinmux_config, pmc_config, and prod_config were used to flash to the target. please update all of them if you’re doing your own board design and the board schematic differs from that for Jetson Xavier NX Developer Kit board.

Some GPIOs we used are not in the 40-pin header, such as the camera_i2c_mux is used for other functions as well, can Jetson-IO handle this too?

Thanks.

hello diverger,

yes, it’s able to change the pin configuration with several expansion headers and connectors.
please also refer to Configuring Jetson Expansion Header session, for using Jetson-IO to configure the expansion headers.
thanks

Hi,

For 2, the error logs around the pdvoltage .dtsi complain is:

cripts/kconfig/conf --silentoldconfig Kconfig
CHK scripts/mod/devicetable-offsets.h
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t19x/jakku/kernel-dts/tegra194-p3668-all-p3509-0000.dtb
DTC arch/arm64/boot/dts/ddot/ddot/ddot/ddot/ddot/ddot/hardware/nvidia/platform/t19x/jakku/kernel-dts/tegra194-p3668-all-p3509-0000-kexec.dtb
Error: ***/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/sources/kernel/kernel-4.9/arch/arm64/boot/dts/…/…/…/…/…/…/hardware/nvidia/platform/t19x/jakku/kernel-dts/tegra19x-tegra19x-p3668-all-hac-0000-padvoltage-default.dtsi:44.35-36 syntax error
FATAL ERROR: Unable to parse input tree

Hi Chang,

Please confirm this. On our carrier board, take CSI as example, we use only one CSI port (CSI0), so the i2c_mux is not needed, and we use it for other purpose. What we need to do is to make the dual camera support to single camera support and remove the i2c_mux GPIO allocated to the CSI connector. Can Jetson-IO handle this?

Thanks.

hello diverger,

ya, that’s common failure for device tree implementation.
please review the content, this usually due to such property did not define in the field;
for example, did you call /delete-property/ or /delete-node/ to remove that?

No, I simply include the three .dtsi files generated by pinmux tool in the 'tegr194-p3668-all-p3509-000.dts", as below:

/dts-v1/;
#include “common/tegra194-p3668-common.dtsi”
#include “common/tegra194-p3509-0000-a00.dtsi”
#include “tegra19x-tegra19x-p3668-all-hac-0000-pinmux.dtsi”
#include “tegra19x-tegra19x-p3668-all-hac-0000-padvoltage-default.dtsi”
#include “tegra19x-tegra19x-p3668-all-hac-0000-gpio-default.dtsi”

/ {
nvidia,dtsfilename = FILE;
nvidia,dtbbuildtime = DATE, TIME;

compatible = "nvidia,p3449-0000+p3668-0000", "nvidia,p3449-0000+p3668-0001", "nvidia,p3509-0000+p3668-0000", "nvidia,p3509-0000+p3668-0001", "nvidia,tegra194";

};

As the error message mentioned “44.35-36 syntax error”, the content of line 44 is:
nvidia,io-pad-init-voltage = <IO_PAD_VOLTAGE_OFF>;

If I change “IO_PAD_VOLTAGE_OFF” to “IO_PAD_VOLTAGE_1_8V”, the errors gone.

Why?

hello diverger,

may I know what’s your expectation for using Jetson-IO, what’s the pin need to be handle.

assume you’re using identical cameras. you should have device tree to define the connections to link to CSI directly. those GPIO settings should also defined in the DT.
during the boot-up process, it’ll parse the camera device and register to the system node without errors.
in this case, you wont need dtbo.

suggest you file another ticket to track this specific issue,
thanks

OK, for the camera, I will open another ticket.

Thanks for your helps.

hello diverger,

please refer to tegra-io-pads.h, there’s no definition for IO_PAD_VOLTAGE_OFF.

This is generated by the pinmux excel tool, then how should I do?

Thanks.