Jetson/L4T BSP development tips
- 1 Preparation
- 2 BSP customization
- 2.1 PINMUX
- 2.1.1 How to find out the actual pinmux configuration file
- 2.1.2 How to update pinmux
- 2.1 PINMUX
First, please download BSP package from internet. It's preferred to download BSP package, instead of Jetpack.
The following packages are necessary:
L4T Driver Package (BSP)
Sample Root Filesystem
Source code for kernel and other components:
L4T Driver Package (BSP) Sources
Toolchain for kernel building:
GCC 7.3.1 for 64 bit BSP and Kernel
Secure package if secure-boot is necessary:
Jetson Platform Fuse Burning and Secure Boot Documentation and Tools
Then the device can be flashed by command line. With this method, user can have more controls for the BSP configuration, like pinmux, kernel/kernel DTB customization, etc.
How to find out the actual pinmux configuration file
There are several types of Jetson reference boards are supported in SDK.
Check the configuration file
For example, when the flash command is:
sudo ./flash.sh jetson-xavier mmcblk0p1
Check the configuration file: jetson-xavier.conf → p2822-0000+p2888-0004.conf → PINMUX_CONFIG="tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg";
(Note: the value of PINMUX_CONFIG may be overwritten. So the later one should take effect.)
Or check the flash log
Run following command:
sudo ./flash.sh -r --no-flash jetson-xavier mmcblk0p1
And check the log:
... copying pinmux_config(/home/Work/jetson_customer/32.4.3/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg)... done. ...
How to update pinmux
There are several ways to customize the device PINMUX. The simple way is to generate PINMUX configuration through pre-defined excel. Another way is to edit the PINMUX configuration file directly, but that may need more knowledge about PINMUX setting for the chip.
Edit the excel and generate the Configuration
Search 'Pinmux Changes'
Also, another good reference: https://elinux.org/Jetson/AGX_Xavier_Update_Pinmux
Still, please make sure the PINMUX configuration file name is correct.
Edit the pinmux configuration file
That's the direct and simple way, assumed the developer is familiar with PINMUX setting.
Download technical reference manual from https://developer.nvidia.com/embedded/downloads#?search=TRM for different platforms. And those documents contain detailed information.
Edit the prod configuration
L4T document shows another way to override the PINMUX:
Same command as 126.96.36.199, and check the prod configuration in following log:
... copying prod_config(/home/Work/jetson_customer/32.4.3/Linux_for_Tegra/bootloader/t186ref/BCT/tegra19x-mb1-prod-p2888-0000-p2822-0000.cfg)... done. ...
Follow the guide in above link.
How to update device PINMUX
After the pinmux configuration files are changed, re-flash the device:
sudo ./flash.sh jetson-xavier mmcblk0p1 #flash the whole device
sudo ./flash.sh -k MB1_BCT jetson-xavier mmcblk0p1 #only flash the MB1_BCT
How to verify the new PINUX configuration works
User can read the PINMUX registers to confirm the new configuration works.
In PINMUX configuration file, there's an entry:
pinmux.0x0c302030 = 0x00000540
And in prod configuration file, another entry:
prod.0x0c302030.0x0000100 = 0x00000000; #gen2_i2c_scl_pcc7: LPDR disable
Run a physical memory access tool, like devmem2 in Jetson device:
root@nvidia-desktop:/home/nvidia# devmem2 0x0c302030 /dev/mem opened. Memory mapped at address 0x7f84359000. Value at address 0xC302030 (0x7f84359030): 0x440