NVIDIA Tegra
NVIDIA DRIVE OS 5.1 Linux

Developer Guide
5.1.0.2 Release


 
Flashing PCIe Switch Configuration/Firmware from NVIDIA DRIVE™ Xavier A
This document describes the process of flashing or later updating the PCIe switch configuration on NVIDIA DRIVE™ Xavier A using Microsemi’s Switchtec management interface.
Note:
The flashing procedure described in this document is applicable only to Xavier A.
Create Switchtec-user
1. Sync switchtec-user on host from the following github page:
https://github.com/Microsemi/switchtec-user
Clone the switchtec-user repository:
git clone https://github.com/Microsemi/switchtec-user.git
Reset codebase to find the tested commit id:
git reset -hard a4b0ef9f1709e410bb62c580982a1b5f7baa3ecb
2. Perform step 1 on target,or copy switchtec-user to target.
3. Build switchtec-user:
nvidia@tegra-ubuntu:~$ cd switchtec-user
nvidia@tegra-ubuntu:~/switchtec-user$ ./configure
nvidia@tegra-ubuntu:~/switchtec-user$ make
nvidia@tegra-ubuntu:~/switchtec-user$ sudo make install
 
4. Load the switchtec-kernel module:
root@tegra-ubuntu:~# modprobe switchtec
nvidia@tegra-ubuntu:~/switchtec-user$ lsmod | grep switchtec
switchtec 17539 0
 
Prerequisites
To flash PCIe using the switchtec-user, the following prerequisites are required:
Load the switchtec-kernel driver.
Expose the current PCIe configuration Management End Point (EP) or Non-Transparent (NT) EP to the Root Complex.
If Management EP is present, the following can be seen from lspci output:
0000:01:00.1 Memory controller: PMC-Sierra Inc. Device 8534
If NT EP is present, the following can be seen in lspci output:
0000:01:00.1 Bridge: PMC-Sierra Inc. Device 8534
Update PCIe Swicth configuration
Use the following switchtec commands to update PCIe configuration on Xavier A.
1. Display the Help menu:
nvidia@tegra-ubuntu:~$ switchtec
switchtec-0.9.5-rc1
Usage: switchtec <command> [<device>] [OPTIONS]
Where <device> is a switchtec device such as /dev/switchtec0.
2. List the devices:
nvidia@tegra-ubuntu:~$ switchtec list
switchtec0 PFX 64XG3 RevB 1.08 B058 0000:01:00.1
3. Set switchtec0 as default:
root@tegra-ubuntu:~# export SWITCHTEC_DEV=/dev/switchtec0
4. Verify firmware information:
root@tegra-ubuntu:~# switchtec fw-info
Currently Running:
IMG Version: 1.08 BD58
Active Partition:
BOOT Version: 1.08 B058 CRC: 725a8d2e (RO)
IMG Version: 1.08 BD58 CRC: 1ef507d3 (Running)
CFG Version: 1.08 B3F08 CRC: ab96224d (Running)
Inactive Partition:
IMG Version: 1.08 B058 CRC: 75ee068d
CFG Version: 1.08 B058 CRC: da85e9de
5. Update firmware:
root@tegra-ubuntu:~# switchtec fw-update <config file>
Writing the following firmware image to /dev/switchtec0.
File: usecase7.0.pmc
Type: DAT
Version: 1.08 B3F08
Img Len: 0x494a
CRC: 0xbfbb33c4
Do you want to continue? [y/N] y
100% [===============================================] Time: 0:00:00 29kB/s
 
Active Partition:
BOOT Version: 1.08 B058 CRC: 725a8d2e (RO)
IMG Version: 1.08 BD58 CRC: 1ef507d3 (Running)
CFG Version: 1.08 B3F08 CRC: bfbb33c4
Inactive Partition:
IMG Version: 1.08 B058 CRC: 75ee068d
CFG Version: 1.08 B3F08 CRC: ab96224d (Running)
 
Where the <config file>, refers to the new configuration which is to be updated.
6. The configuration files in SDK/PDK are available in the following location:
<top>/drive-t186ref-foundation/firmwares/bin/t19x/microsemi/pcie/bins/ e3550/config_files/pm8534
7. The configuration files in Rootfs are available in the following location:
/lib/firmware/pcie-switch/e3550/config_files/pm8534
8. After flashing the new switch configuration, power cycle/reboot the board.
This step will ensure that switch is booted with latest configuration file and all Root Complex Devices are running with the new topology.
To verify, execute the folowing command:
root@tegra-ubuntu:~# switchtec fw-info /dev/switchtec0
Currently Running:
IMG Version: 1.08 BD58
Active Partition:
BOOT Version: 1.08 B058 CRC: 725a8d2e (RO)
IMG Version: 1.08 BD58 CRC: 1ef507d3 (Running)
CFG Version: 1.08 B3F08 CRC: bfbb33c4 (Running)
Inactive Partition:
IMG Version: 1.08 B058 CRC: 75ee068d
CFG Version: 1.08 B3F08 CRC: ab96224d
 
As we can see from the above message, after the reboot, the new configuration flashed in active partition is running.