These should help debug this issue.
bootloader/partner/common/drivers/usbf/xusbf/tegrabl_xusbf.c -> tegrabl_usbf_enumerate()
Please note that device tree setting for usb configuration like uphy mapping should not affect the flash process. If it can affect the flash process, then we won’t have those cases like “my device is able to boot up but my usb port does not work”.
If you still want to debug from software side, you could compare the uart log from your carrier board (OK) and the NG carrier board.