NVIDIA Tegra Tegra Linux Driver Package
Development Guide
27.1 Release

 
Configuring Pinmux, GPIO and PAD
 
Pinmux Configuration Process
Generating DT File
Generating Configuration files using dts2cfg
To convert pinmux and GPIO files to CFG format
To convert PAD file to CFG format
The pinmux and PAD configuration files provide pinmux and GPIO, and PAD configuration information.
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.
Pinmux Configuration Process
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.
Generating DT File
For an initial pinmux configuration, generate a 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 system.
Generating Configuration files using dts2cfg
 
To convert pinmux and GPIO files to CFG format
To convert PAD file to CFG format
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 files to .cfg format. The tool is located in the following directory:
 
Linux_for_Tegra/kernel/pinmux/
 
To convert pinmux and GPIO files to CFG format
Usage
 
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 following table describes the supported options.
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.
--mask
(Optional) Specifies the output (useful to build GR sheets).
--help
Prints usage information.
The following table describes the --pinmux arguments.
--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 por val pair info file.
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.
The resulting .cfg file is printed to standard output. You can save this file by redirecting the output to a file. Here is an 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
 
Copy the configuration file to the default location:
<top>/bootloader/t186ref/BCT/
To convert PAD file to CFG format
The pinmux-dts2cfg.py tool converts pad file to CFG format.
Usage
 
python pinmux-dts2cfg.py --pad <PAD_FILE> <PAD_DTS_FILE> <VERSION> [--mask] [--help]
 
The following table describes the supported options and arguments.
Options and Arguments
Description
--help
Prints usage information.
--pad <arguments>
Specifies pad attributes.
--mask
Controls the output (useful to build GR sheets).
The following table describes the --pad option arguments.
--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.
Because the resulting CFG file is printed to standard output, it is recommended to redirect the output to a file. Here is an 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
 
Copy the configuration file to the default location:
<top>/bootloader/t186ref/BCT/