Hi,
In following the process outlined in the ‘adaptation guide’ for Xavier we are instructed to modify many .dtsi files, and .cfg files in varying locations.
I have done that, but it is unclear to me how to pull those specific sources together in a new compiled dts or dtb file that can be flashed to the target.
I see the bct.mk file, and the .conf.common files, they seem to point to different locations, and i’m sure there is some script that handles all of that somewhere, but i cant locate it based on the documentation.
Is there an actual clear/useful step by step for how this is compiled into a new set of DTB and CFG files?
As reference, I have modified the following files (new extension based on our board name):
- tegra19x-uswap_val9k-gpiopinmux-1-1.cfg (placed in bootloader/t186ref/BCT/)
- tegra19x-mb1-pad-uswap_val9k-1-1.cfg (placed in bootloader/t186ref/BCT/)
- tegra194-power-tree-p2888-0001-uswap_val9k-0000.dtsi (placed in /sources/hardware/nvidia/platform/t19x/galen/kernel-dts/common)
- tegra194-fixed-regulator-uswap_val9k-0000.dtsi (placed in /sources/hardware/nvidia/platform/t19x/galen/kernel-dts/common)
- tegra194-soc-i2c-uswap_val9k.dtsi (placed in /sources/hardware/nvidia/soc/t19x/kernel-dts/tegra194-soc)
- tegra194-soc-sdhci-uswap_val9k.dtsi (placed in /sources/hardware/nvidia/soc/t19x/kernel-dts/tegra194-soc)
- tegra194-soc-uart-uswap_val9k.dtsi (placed in /sources/hardware/nvidia/soc/t19x/kernel-dts/tegra194-soc)
- tegra194-soc-pcie-uswap_val9k.dtsi (placed in /sources/hardware/nvidia/soc/t19x/kernel-dts/tegra194-soc)
I then made a copy of the p2972-0000.conf.common file, which is what jetson-xavier.conf (symbolic link to p2972-0000-devkit.conf which references that file)
So my modified p2972-0000-devkit.conf reads:
# p2972-0000-devkit.conf: configuration for T194 Silicon
# Commenting this out and replacing with uswap_val9k file names
#source "${LDK_DIR}/p2972-0000.conf.common";
#PINMUX_CONFIG="tegra19x-mb1-pinmux-p2888-0000-a04-p2822-0000-b01.cfg";
source "${LDK_DIR}/uswap_val9k-0000.conf.common";
PINMUX_CONFIG="tegra19x-uswap_val9k-gpiopinmux-1-1.cfg";
And the conf.common referenced in this file is also modified now:
# Common values and/or defaults across p2972-0000*.conf:
# This section has been modified for uswap_val9k where appropriate
# ODMDATA is where UPHY lane mapping occurs - currently this value was set for the 2822 board
# Bits 31:27 control HSIO-PCIE-XBAR configurations for controllers 4-0 (where is controller 5?)
# Bits 24:23 control UFS configurations
# Bit 22 controls SATA
#
#
# 2822 breakdown of settings
# 0x919 --> 0b10010 || 0b11 || 0b0
# pcie-xbar-8-0-1-0-2 --> C5 = 8 lanes, C4 = 0 lanes, C3 = 1 lane, C1 = 0 lanes, C0 = 2 lanes?
# This doesnt align with the P2822 design...C0 should be 4 lanes for the M.2 Key M
# UFS config = Enabled, L10 and L11
# This algins with the 2822 design, L10 is for the UFS card, and L11 is for eSATA
# SATA = disabled, this must be different from the eSATA controller.
#
#
# For val9k we want the following:
# 0x280 --> b00101 || 0b00 || 0b00
# pcie-xbar-4-0-1-1-2 --> C5 = 4 lanes (Zynq), C4 = 0 lanes (unused), C3 = 1 lane (VU1), C1 = 1 lane (VU2), C0 = 2 lanes? (Should be 4, but this value is here on 2822...
# UFS config = disabled
# SATA = disabled
#
#P2822
#ODMDATA=0x9190000;
#
#uswap_val9k
ODMDATA=0x2800000;
CHIPID=0x19;
EMMC_CFG=flash_t194_sdmmc.xml;
BOOTPARTSIZE=8388608;
EMMCSIZE=31276924928;
ITS_FILE=;
# Seems pretty generic, not going to modify
SYSBOOTFILE=p2972-0000/extlinux.conf;
# This is the BPMP DTB file (boot and power management processor), probably don't need to
# modify this since it is the SOM and not carrier. Made a copy and re-named for best practice
#
#P2822
#BPFDTB_FILE=tegra194-a01-bpmp-p2888-a01.dtb;
#
#uswap_val9k
BPFDTB_FILE=tegra194-a02-bpmp-p2888-a04-uswap_val9k.dtb;
#P2822
#DTB_FILE=tegra194-p2888-0001-p2822-0000.dtb;
#
#uswap_val9k
DTB_FILE=tegra194-p2888-0001-uswap_val9k-0000.dtb;
#P2822
#TBCDTB_FILE=tegra194-p2888-0001-p2822-0000.dtb;
#
#uswap_val9k
TBCDTB_FILE=tegra194-p2888-0001-uswap_val9k-0000.dtb
ROOTFSSIZE=28GiB;
# This may need to be changed to be UART3?
CMDLINE_ADD="console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 rootfstype=ext4";
target_board="t186ref";
ROOT_DEV="mmcblk0p12 ------------ internal eMMC.
sda1 ----------------- external USB devices. (USB memory stick, HDD)
eth0 ----------------- nfsroot via RJ45 Ethernet port.
eth1 ----------------- nfsroot via USB Ethernet interface.";
TEGRABOOT="bootloader/nvtboot_t194.bin";
WB0BOOT="bootloader/warmboot_t194_dev.bin";
FLASHAPP="bootloader/tegraflash.py";
FLASHER="bootloader/nvtboot_recovery_cpu_t194.bin";
BOOTLOADER="bootloader/nvtboot_cpu_t194.bin";
INITRD="bootloader/l4t_initrd.img";
TBCFILE="bootloader/cboot_t194.bin";
BPFFILE="bootloader/bpmp_t194.bin";
TOSFILE="bootloader/tos_t194.img";
EKSFILE="bootloader/eks.img";
MTSPREBOOT="bootloader/preboot_c10_cr.bin";
MTS_MCE="bootloader/mce_c10_cr.bin";
MTSPROPER="bootloader/mts_c10_cr.bin";
MB1FILE="bootloader/mb1_t194_dev.bin";
SOSFILE="bootloader/mb1_t194_dev.bin";
MB2BLFILE="bootloader/nvtboot_recovery_t194.bin";
SPEFILE="bootloader/spe_t194.bin";
CAMERAFW="bootloader/camera-rtcpu-rce.img";
MB2APPLET="nvtboot_applet_t194.bin"
FBFILE="fuse_bypass_t194.xml";
CBOOTOPTION_FILE="bootloader/cbo.dtb";
# BCT args:
#
BCT="--sdram_config";
BINSARGS="--bin \"";
# Unchanged
EMMC_BCT1="tegra194-memcfg-sw-override.cfg";
# Unchanged
EMMC_BCT="tegra194-mb1-bct-memcfg-p2888.cfg";
# Unchanged
MISC_CONFIG="tegra194-mb1-bct-misc-flash.cfg";
# Unchanged
MISC_COLD_BOOT_CONFIG="tegra194-mb1-bct-misc-l4t.cfg";
# Unchanged
BOOTROM_CONFIG="tegra194-mb1-bct-reset-p2888-0000-p2822-0000.cfg";
# Unchanged
DEV_PARAMS="tegra194-br-bct-sdmmc.cfg";
# Unchanged
SCR_COLD_BOOT_CONFIG="tegra194-mb1-bct-scr-cbb-mini.cfg";
# Unchanged
SCR_CONFIG="tegra194-mb1-bct-scr-cbb-mini.cfg";
# Modified for uswap_val9k from Excel pin mux table
PINMUX_CONFIG="tegra19x-uswap_val9k-gpiopinmux-1-1.cfg";
# Unchanged
PMIC_CONFIG="tegra194-mb1-bct-pmic-p2888-0001-a01-p2822-0000.cfg";
# Modified for uswap_val9k from Excel pin mux table
PMC_CONFIG="tegra19x-mb1-pad-uswap_val9k-1-1.cfg";
# Unchanged
PROD_CONFIG="tegra19x-mb1-prod-p2888-0000-p2822-0000.cfg";
# Unchanged
BR_CMD_CONFIG="tegra194-mb1-bct-reset-p2888-0000-p2822-0000.cfg";
# Unchanged
DEVICE_CONFIG="tegra19x-mb1-bct-device-sdmmc.cfg";
# Modified for uswap_val9k, removed lane 10 assignment from file
UPHY_CONFIG="tegra194-mb1-uphy-lane-p2888-0000-uswap_val9k-0000.cfg";
# Unchanged
GPIOINT_CONFIG="tegra194-mb1-bct-gpioint-p2888-0000-p2822-0000.cfg";
# Unchanged
SOFT_FUSES="tegra194-mb1-soft-fuses-l4t.cfg";
# Unchagned
NVKEY_FILE="t194_rsa_dev.key";
# Unchanged
NVENCRYPTKEY_FILE="t194_sbk_dev.key";
# Default FAB: Force Galen boards without properly programmed EEPROM.
# Values: A01 ->
#
DEFAULT_FAB="A01";
However, I need to now compile a new .dtb file, which is referenced as the TBCDTB_FILE and the DTB_FILE
I assume that the modified dtsi files need to be pulled into the new .dtb, but there are no clear instructions there for that, and I can’t locate the list of what went into the original compilation of the dtb file that was previously referenced in the p2972-0000.conf.common file (tegra194-p2888-0001-p2822-0000.dtb)
I see the .dts file in the galen kernel location, along with a make file - but that dts file is basically empty:
/*
* Top level DTS file for CVM:P2888-0001 and CVB:P2822-0000.
*
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#include "common/tegra194-p2888-0001-p2822-0000-common.dtsi"
#include "common/tegra194-p2822-camera-modules.dtsi"
#include "t19x-common-modules/tegra194-camera-plugin-manager.dtsi"
- tegra194-p2888-0001-p2822-0000-common.dtsi looks like the correct file to edit the include statements in, but that is really a guess at this point, since it's really just me poking around this huge source code archive....
- I have no interest in the camera modules or camera-plugin-manager, we aren't using cameras on our custom carrier, I assume we can leave that as is.
#include "dt-bindings/extcon-ids.h"
#include "dt-bindings/gpio/tegra194-gpio.h"
#include "tegra194-p2888-0000-a00.dtsi"
#include <t19x-common-platforms/tegra194-platforms-eqos.dtsi>
#include "tegra194-p2822-0000-a00.dtsi"
#include "tegra194-power-tree-p2888-0001-p2822-1000.dtsi"
#include <t19x-common-platforms/tegra194-comms.dtsi>
#include "tegra194-thermal-p2888.dtsi"
#include "tegra194-plugin-manager-p2888-0000.dtsi"
#include "tegra194-plugin-manager-p2822-0000.dtsi"
#include "tegra194-super-module-e2614-p2888-0000.dtsi"
Is the above where I would replace the references to the dtsi files that I modified?
If so, then how do i re-compile the dtb properly? Just DTC the ‘top level DTS’ file (or a copy of it probably) with renamed includes etc?
Big time gap here is the user-friendliness of adapting this SoM to a custom carrier - I would really think a system like Xilinx/Altera(Intel) would go a long way to making this more adaptable and more widely used. This is really brutal.