NVIDIA Tegra
DRIVE 5.0 Linux Open Source Software

Development Guide
5.0.10.3 Release


 
Pinmux/GPIO Configuration
 
Pinmux dts2cfg
On NVIDIA® Tegra® code-name Parker platforms, the kernel does not initialize pinmux/GPIO settings. Instead, the MB1 boot loader does so with special configuration files. You can find these files in the following location:
<top>/drive-t186ref-foundation/platform-support/bct/pinmux/tegra186-mb1-bct-pinmux-gpio-vcm31-<p3407|p2379>-<1001-C02|2001-C02|2002-C02|2121-C02>-<board_revision>.cfg
These configuration files are generated by a tool that consumes the DTSI files generated by the pinmux Excel worksheet. While they can be edited by hand, NVIDIA recommends generating new versions instead. If you need to modify the boot-up pinmux/GPIO state, please contact your NVIDIA Customer Engineer (CE) for information about how to generate these files.
Pinmux dts2cfg
Note:
Use the dos2unix command to convert the .dts file to be readable by the script. Make sure there are no blank lines at the end of the address info file.
The pinmux dts2cfg tool converts pinmux, GPIO, and the PAD DTS file to CFG format.
To convert pinmux and the GPIO file to CFG format
Execute the following:
python pinmux-dts2cfg.py [--pinmux] ADDRESS_FILE GPIO_ADDRESS_FILE POR_VAL_FILE PINMUX_DTS GPIO_DTS VERSION [--help]
Where:
--pinmux is an optional parameter. Default=1 (opposite of --pad)
--mask is an optional parameter that controls the output (useful when building GR sheets)
--help displays the help menu
ADDRESS_FILE is the address info file
GPIO_ADDRESS_FILE is the GPIO address info file
POR_VAL_FILE is the por val pair info file
PINMUX_DTS is the device tree source file for pinmux
GPIO_DTS is the device tree source file for GPIO
VERSION is the numeric version: for example, 1.0
The resulting .cfg file is printed to standard output. You can redirect the file. Here’s an example for Tegra code-name Parker:
python pinmux-dts2cfg.py \
--pinmux \
addr_info.txt gpio_addr_info.txt por_val.txt \
tegra186-quill-p3310-1000-a00-pinmux.dtsi \
tegra186-quill-p3310-1000-a00-gpio-default.dtsi \
1.0 \
> tegra186-quill-p3310-1000-a00-pinmux-gpio.cfg
To convert the PAD file to CFG format
Execute the following:
python pinmux-dts2cfg.py --pad PAD_FILE PAD_DTS VERSION [--mask] [--help]
Where:
--mask is an optional parameter that controls the output (useful when building GR sheets)
--help displays the help menu
PAD_FILE is the pad info file
PAD_DTS is the device tree source file for pads
VERSION is the numeric version: for example, 1.0
The resulting .cfg file is printed to standard output. You can redirect the file. Here’s an example for Tegra code-name Parker:
python pinmux-dts2cfg.py \
--pad \
pad_info.txt \
tegra186-quill-char-e3301-1080-a00-padvoltage-default.dtsi \
1.0 \
> tegra186-mb1-bct-pad-quill-char-e3301-1080-a00.cfg