NVIDIA Tegra
NVIDIA Tegra Linux Driver Package

Development Guide
28.3 Release


 
TX2 Configuring Pinmux GPIO and PAD
 
TX2 Pinmux Configuration Process
Generating Configuration Files With dts2cfg
The pinmux and PAD configuration files provide pinmux and GPIO, and PAD configuration information for Jetson TX2 devices.
For each board and chip configuration, a pinmux spreadsheet is provided to:
Show the locations and default pinmux settings
Define the pinmux settings in the source code or device tree
The spreadsheet is available at:
https://developer.nvidia.com/embedded/downloads
For information on the pinmux and GPIO, and PAD configuration files, refer to MB1 Platform Configuration.
TX2 Pinmux Configuration Process
The pinmux configuration for the Jetson TX2 Developer Kit baseboard expansion header is configured as special-function I/O. The Jetson release configures these pins differently, primarily as GPIO.  If you are not using the Jetson Developer Kit baseboard or if you have an expansion module attached, you must review the Jetson TX1/TX2 Developer Kit pinmux for compatibility with your baseboard.
To configure pinmux settings, perform the following tasks:
Modify the pinmux spreadsheet for changes in your configurable fields.
Generate a DTSI file from spreadsheet.
Generate a CFG file from DTSI file.
To generate DT file
1. Open the pinmux spreadsheet in Microsoft Excel.
2. Click the Generate DT File button.
In response to the "Would you like to generate device tree file for pinmux table" prompt, click ‘Yes’.
In response to the board name prompt, specify the board name. If board name is not specified, the spreadsheet uses the default value.
If the fields are error free, the script displays a message indicating success and creates the DTSI files in the current working directory.
For example:
tegra18x-p3310-1000-a03-cvm-config-pinmux.dtsi
tegra18x-p3310-1000-a03-cvm-config-gpio-default.dtsi
tegra18x-p3310-1000-a03-cvm-config-padvoltage-default.dtsi
3. Copy the files from Windows to the Linux host system.
4. On Linux, use dts2cfg to convert the DTB files to a CFG file. For more information, see Generating Configuration Files With dts2cfg in this topic.
Note:
TX2 differs from TX1 with respect to the pinmux dt application. DTBs generated must not be flashed as it is. Instead, these DTBs must be converted to a CFG file and then flashed.
 
Generating Configuration Files With dts2cfg
Note:
Use the dos2unix command to convert the .dts file to be readable by the script. Verify that there are no blank lines at the end of the address info file.
The pinmux dts2cfg tool converts pinmux, GPIO, and the PAD DTS files to .cfg format. The tool is available at:
Linux_for_Tegra/kernel/pinmux/
To convert pinmux and GPIO files to CFG format
1. Use the command with the following options.
python pinmux-dts2cfg.py [--pinmux] <ADDRESS_FILE> <GPIO_ADDRESS_FILE> <POR_VAL_FILE> <MANDATORY_PINMUX_FILE> <PINMUX_DTS_FILE> <GPIO_DTS_FILE> <VERSION> [--help]
The supported options are as follows:
Options
Description
--pinmux <arguments>
(Optional) Specifies pinmux arguments. By default, the script assumes the data is for pinmux unless the command line includes the --pad option. The required arguments are listed in the following table.
--mask
(Optional) Specifies the output (useful to build GR sheets).
--help
Prints usage information.
The --pinmux arguments are as follows. These arguments must be supplied in the order shown.
--pinmux Arguments
Description
ADDRESS_FILE
Specifies the address info file.
GPIO_ADDRESS_FILE is
Specifies the GPIO address info file.
POR_VAL_FILE
Specifies the file that the pinmux spreadsheet generates with your customizations. The file specifies your plan-of-record values.
MANDATORY_PINMUX_FILE
Specifies the mandatory pinmux values info file.
PINMUX_DTS_FILE
Specifies the device tree source file for pinmux.
GPIO_DTS_FILE
Specifies the device tree source file for GPIO.
VERSION
Specifies the numeric version, like 1.0.
2. The resulting .cfg file is printed to standard output. Save this file by redirecting the output to a file.
For example:
python pinmux-dts2cfg.py \
--pinmux \
addr_info.txt gpio_addr_info.txt por_val.txt \
mandatory_pinmux.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
3. Copy the configuration file to the default location:
<top>/bootloader/t186ref/BCT/
To convert PAD file to CFG format
1. Use the pinmux-dts2cfg.py tool to convert the pad file to CFG format using the command options as follows.
python pinmux-dts2cfg.py --pad <PAD_FILE> <PAD_DTS_FILE> <VERSION> [--mask] [--help]
The supported options and arguments are as follows:
Options and Arguments
Description
--help
Prints usage information.
--pad <arguments>
Specifies pad attributes.
--mask
Controls the output (useful to build GR sheets).
The d --pad option arguments are as follows:
--pad Arguments
Description
PAD_FILE
Specifies the pad info file.
PAD_DTS_FILE
Specifies the device tree source file for pads.
VERSION
Specifies the numeric version, like 1.0.
2. Because the resulting CFG file is printed to standard output, redirect the output to a file.
For example:
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
3. Copy the configuration file to the default location:
<top>/bootloader/t186ref/BCT/