I can’t give you a specific answer, so instead I’m listing how to get started on the question. U-Boot build is described in documentation listed below, along with some information on how to find the particular file you are interested in.
Within the “Linux_for_Tegra/” directory, which is from the driver package (and which JetPack downloads and runs as a frontend), is “source_sync.sh”. This script allows downloading various “tags”, one of which is U-Boot source. Assuming as an example R28.2.1 (adjust for your version), the U-Boot source is this:
./source_sync.sh -u tegra-l4t-r28.2.1
(kernel is “-k” instead of “-u” and may be useful as well…some configuration is shared among these)
Documentation can be found here:
https://developer.nvidia.com/embedded/downloads
In particular (assuming R28.2 or R28.2.1):
https://developer.nvidia.com/embedded/dlc/l4t-documentation-28-2-ga
Within that is a “U-Boot Customization” section. I can’t help much beyond that, the device tree configuration and usage has changed in more recent releases. At this point some of the earlier boot stages use the device tree from a partition, and then pass along device tree either verbatim or edited, and I’m not sure what to tell you on that. So while I can tell you about configuration within U-Boot, I can’t be sure that I know the correct method to actually put your changes into the TX2 (you probably want to save a log of a command line flash, and then go over that for bootloader content). It may be that you need to edit the device tree while building U-Boot, and additionally within the device tree which flashes separately to a partition. Don’t know :(
About actual U-Boot configuration and build within the “u-boot/” code found after using “source_sync.sh”…extra info because others will probably be looking for help too…
Note that in the “u-boot/configs/” subdirectory there are several “_defconfig” files named after either the module or the carrier board (or both). Via “egrep -i -l ‘tegra.18.’” I see:
p2371-2180_defconfig
p2771-0000-000_defconfig
p2771-0000-500_defconfig
(the “18” is for the Tegra 18x series, where the 186 is specifically the Jetson TX2’s SoC)
The docs will actually tell you to use “p2771-0000-500” for a TX2/TX2i.
If I search in the “u-boot/” directory like this I find the relevant device tree:
> find . -name '*p2771-0000-500*'
<i><b>./arch/arm/dts/tegra186-p2771-0000-500.dts</b></i>
The particular _defconfig you want before starting the build:
<i><b>configs/p2771-0000-500_defconfig</b></i>
In this case, within the _defconfig, I see:
CONFIG_DEFAULT_DEVICE_TREE="tegra186-p2771-0000-500"
If you were to edit “arch/arm/dts/tegra210-p2371-2180.dts”, then use the “p2771-0000-500_defconfig” configuration, you should get what you are looking for.
About the particular edit…
I can’t tell you what you need within U-Boot, but it is probably the same as from the running Jetson where your network adapter is available once Linux boots. Right now it sounds like you have adjusted the device tree and drivers to work within Linux, but not yet within U-Boot…this means you probably need to transfer those same edits.
There may be additional edits if power rails need to go on, if DMA needs to be accounted for (the SMMU won’t be running in U-Boot), so on.