Skip to content

tegra-target-flash-scripts: fix UDC discovery and QSPI path for t264#2157

Closed
mihai-chiorean wants to merge 3 commits intoOE4T:master-l4t-r38.4.xfrom
mihai-chiorean:fix/thor-udc-qspi-flash
Closed

tegra-target-flash-scripts: fix UDC discovery and QSPI path for t264#2157
mihai-chiorean wants to merge 3 commits intoOE4T:master-l4t-r38.4.xfrom
mihai-chiorean:fix/thor-udc-qspi-flash

Conversation

@mihai-chiorean
Copy link

@mihai-chiorean mihai-chiorean commented Feb 27, 2026

Replace hardcoded known_udc_dev checks in nv_enable_remote.sh with
dynamic /sys/class/udc/* enumeration, matching how init-flash.sh
already discovers the UDC.

Add QSPI device symlink (/dev/810c5b0000.spi -> /dev/mtd0) for t264
initrd flash, gated on tegra264 compatible.

UDC issue

During initrd flash on AGX Thor, nv_enable_remote.sh fails to find
the USB Device Controller because it only checks hardcoded device
names (known_udc_dev1="3550000.usb", known_udc_dev2="..."). Thor's
UDC device name doesn't match either, so the script falls through
with "no UDC found" and the ADB connection never comes up.

init-flash.sh already handles this correctly with
ls -1 /sys/class/udc | head -n 1 — this patch applies the same
approach to nv_enable_remote.sh.

QSPI issue

During initrd flash on AGX Thor, nvdd fails to write QSPI NOR because
it looks for /dev/block/810c5b0000.spi (the t264 SPI5 MMIO address).
The Yocto kernel exposes QSPI NOR via Linux MTD as /dev/mtd0 instead.
Since /dev/block -> /dev in the initramfs, a symlink fixes the path
resolution. Gated on tegra264 to avoid affecting other platforms.

@madisongh
Copy link
Member

@mihai-chiorean The master-l4t-r38.4.x is the current active branch for R38.4, can you retarget your PR there?

It would also help if you could provide a bit more background on the failure you're seeing that requires these changes.
Thanks!

@mihai-chiorean mihai-chiorean changed the base branch from wip-l4t-r38.4.0 to master-l4t-r38.4.x February 27, 2026 21:24
Replace hardcoded known_udc_dev checks with /sys/class/udc/* enumeration,
matching how init-flash.sh already discovers the UDC.

Add QSPI device symlink (/dev/810c5b0000.spi -> /dev/mtd0) for t264
initrd flash, gated on tegra264 compatible.

Signed-off-by: Mihai Chiorean <mihai.v.chiorean@gmail.com>
@mihai-chiorean mihai-chiorean force-pushed the fix/thor-udc-qspi-flash branch from 75bfa55 to fc1bfc5 Compare February 27, 2026 21:24
@madisongh
Copy link
Member

@mihai-chiorean Thanks for the updated description... I've never had an issue with flashing my AGX Thor development kit with the way the script is currently. Are you using a development kit, or some kind of custom hardware setup? And is this with the stock NVIDIA kernel (linux-noble-nvidia-tegra recipe), or are you using something else?

@mihai-chiorean
Copy link
Author

@mihai-chiorean Thanks for the updated description... I've never had an issue with flashing my AGX Thor development kit with the way the script is currently. Are you using a development kit, or some kind of custom hardware setup? And is this with the stock NVIDIA kernel (linux-noble-nvidia-tegra recipe), or are you using something else?

To be honest, I need to test it again. I started out with our os using 38.2, then @ichergui suggested going the 38.4 route and this might be leftover. will get back once I test again.

@ichergui
Copy link
Member

ichergui commented Mar 3, 2026

Hi @mihai-chiorean
Thanks for the PR. I agree with @madisongh
I didn't have an issue with the flashing process. Please test it again without updates then let us know.

@mihai-chiorean
Copy link
Author

ok, jsut got a new thor and confirmed we don't need this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants