Unable to perform RB3 board recovery

Hello,

I referred to getting started section and followed the steps to start the board for the first time.

The boot up log on UART was freezing at this point:

B - 1782969 - DisplayDxe: Resolution 1440x2560 (2 intf)

B - 2096570 - usb: init start
B - 35952912 - usb: ss_lane_vbus_timeout , 0x1
B - 36404342 - usb: ss_lane_cc_timeout , 0x1
B - 36404617 - usb: usb_lane
B - 36409619 - usb: qusb2_1: hstx , 0x6
B - 36411327 - usb: PLL1 locked , 0x5
B - 36518839 - usb: suspended
.

Sometimes, no debug log was written onto the connected UART port. The boot log was inconsistent.

So, I referred to board recovery section

Connecting the board in USB flashing mode (aka EDL mode) and followed these exact steps:

  • Set the switch “DIP_SW” to “0 1 1 0 0 0”
  • (Turn on SW2 on the dip switch to enable the USB2.0 debug port
  • Turn on SW3 on the Dip Switch to enable the auto power up on USB-C cable connection)
  • Power off the board and make sure the USB type-C cable is not plugged into the board
  • Press button 18 (e.g. marked with F_DL), and
  • Connect the USB3 Type C (5) between the Linux PC and the board.

However, board recovery is also failing.

Log of command
sudo /qdl prog_firehose_ddr.elf rawprogram?.xml patch?.xml

$ sudo ../qdl/qdl prog_firehose_ddr.elf rawprogram?.xml patch?.xml
Waiting for EDL device
/dev/bus/usb/002/012
HELLO version: 0x2 compatible: 0x1 max_len: 1024 mode: 0
READ64 image: 13 offset: 0x0 length: 0x40
READ64 image: 13 offset: 0x40 length: 0x428
READ64 image: 13 offset: 0x1000 length: 0x1000
READ64 image: 13 offset: 0x2000 length: 0xb88
READ64 image: 13 offset: 0x3000 length: 0x1000
READ64 image: 13 offset: 0x4000 length: 0x1000
READ64 image: 13 offset: 0x5000 length: 0x1000
READ64 image: 13 offset: 0x6000 length: 0x1000
READ64 image: 13 offset: 0x7000 length: 0x1000
READ64 image: 13 offset: 0x8000 length: 0x1000
READ64 image: 13 offset: 0x9000 length: 0x1000
READ64 image: 13 offset: 0xa000 length: 0x1000
READ64 image: 13 offset: 0xb000 length: 0x1000
READ64 image: 13 offset: 0xc000 length: 0x1000
READ64 image: 13 offset: 0xd000 length: 0x1000
READ64 image: 13 offset: 0xe000 length: 0x1000
READ64 image: 13 offset: 0xf000 length: 0x1000
READ64 image: 13 offset: 0x10000 length: 0x1000
READ64 image: 13 offset: 0x11000 length: 0x1000
READ64 image: 13 offset: 0x12000 length: 0x1000
READ64 image: 13 offset: 0x13000 length: 0x1000
READ64 image: 13 offset: 0x14000 length: 0x1000
READ64 image: 13 offset: 0x15000 length: 0x1000
READ64 image: 13 offset: 0x16000 length: 0x1000
READ64 image: 13 offset: 0x17000 length: 0x1000
READ64 image: 13 offset: 0x18000 length: 0x1000
READ64 image: 13 offset: 0x19000 length: 0x1000
READ64 image: 13 offset: 0x1a000 length: 0x1000
READ64 image: 13 offset: 0x1b000 length: 0x1000
READ64 image: 13 offset: 0x1c000 length: 0x1000
READ64 image: 13 offset: 0x1d000 length: 0x1000
READ64 image: 13 offset: 0x1e000 length: 0x1000
READ64 image: 13 offset: 0x1f000 length: 0x1000
READ64 image: 13 offset: 0x20000 length: 0x1000
READ64 image: 13 offset: 0x21000 length: 0x1000
READ64 image: 13 offset: 0x22000 length: 0x1000
READ64 image: 13 offset: 0x23000 length: 0x1000
READ64 image: 13 offset: 0x24000 length: 0x1000
READ64 image: 13 offset: 0x25000 length: 0x1000
READ64 image: 13 offset: 0x26000 length: 0x1000
READ64 image: 13 offset: 0x27000 length: 0x1000
READ64 image: 13 offset: 0x28000 length: 0x1000
READ64 image: 13 offset: 0x29000 length: 0x1000
READ64 image: 13 offset: 0x2a000 length: 0x1000
READ64 image: 13 offset: 0x2b000 length: 0x1000
READ64 image: 13 offset: 0x2c000 length: 0x1000
READ64 image: 13 offset: 0x2d000 length: 0x1000
READ64 image: 13 offset: 0x2e000 length: 0x1000
READ64 image: 13 offset: 0x2f000 length: 0x1000
READ64 image: 13 offset: 0x30000 length: 0x1000
READ64 image: 13 offset: 0x31000 length: 0x1000
READ64 image: 13 offset: 0x32000 length: 0x1000
READ64 image: 13 offset: 0x33000 length: 0x1000
READ64 image: 13 offset: 0x34000 length: 0x1000
READ64 image: 13 offset: 0x35000 length: 0x1000
READ64 image: 13 offset: 0x36000 length: 0x1000
READ64 image: 13 offset: 0x37000 length: 0x1000
READ64 image: 13 offset: 0x38000 length: 0x1000
READ64 image: 13 offset: 0x39000 length: 0x1000
READ64 image: 13 offset: 0x3a000 length: 0x1000
READ64 image: 13 offset: 0x3b000 length: 0x1000
READ64 image: 13 offset: 0x3c000 length: 0x1000
READ64 image: 13 offset: 0x3d000 length: 0x1000
READ64 image: 13 offset: 0x3e000 length: 0x1000
READ64 image: 13 offset: 0x3f000 length: 0x1000
READ64 image: 13 offset: 0x40000 length: 0x1000
READ64 image: 13 offset: 0x41000 length: 0x1000
READ64 image: 13 offset: 0x42000 length: 0x1000
READ64 image: 13 offset: 0x43000 length: 0x1000
READ64 image: 13 offset: 0x44000 length: 0x1000
READ64 image: 13 offset: 0x45000 length: 0x1000
READ64 image: 13 offset: 0x46000 length: 0x1000
READ64 image: 13 offset: 0x47000 length: 0x1000
READ64 image: 13 offset: 0x48000 length: 0x1000
READ64 image: 13 offset: 0x49000 length: 0x1000
READ64 image: 13 offset: 0x4a000 length: 0x1000
READ64 image: 13 offset: 0x4b000 length: 0x1000
READ64 image: 13 offset: 0x4c000 length: 0x1000
READ64 image: 13 offset: 0x4d000 length: 0x1000
READ64 image: 13 offset: 0x4e000 length: 0x1000
READ64 image: 13 offset: 0x4f000 length: 0x1000
READ64 image: 13 offset: 0x50000 length: 0x1000
READ64 image: 13 offset: 0x51000 length: 0xe4c
READ64 image: 13 offset: 0x51e50 length: 0x1000
READ64 image: 13 offset: 0x52e50 length: 0x1000
READ64 image: 13 offset: 0x53e50 length: 0x1000
READ64 image: 13 offset: 0x54e50 length: 0x1000
READ64 image: 13 offset: 0x55e50 length: 0x1000
READ64 image: 13 offset: 0x56e50 length: 0x1000
READ64 image: 13 offset: 0x57e50 length: 0x1000
READ64 image: 13 offset: 0x58e50 length: 0x1000
READ64 image: 13 offset: 0x59e50 length: 0x846
READ64 image: 13 offset: 0x5a6a0 length: 0x1000
READ64 image: 13 offset: 0x5b6a0 length: 0x1000
READ64 image: 13 offset: 0x5c6a0 length: 0xb1c
READ64 image: 13 offset: 0x5d1c0 length: 0x1b4
READ64 image: 13 offset: 0x5d380 length: 0x1000
READ64 image: 13 offset: 0x5e380 length: 0x1000
READ64 image: 13 offset: 0x5f380 length: 0x1000
READ64 image: 13 offset: 0x60380 length: 0x1000
READ64 image: 13 offset: 0x61380 length: 0x1000
READ64 image: 13 offset: 0x62380 length: 0x1000
READ64 image: 13 offset: 0x63380 length: 0x1000
READ64 image: 13 offset: 0x64380 length: 0x1000
READ64 image: 13 offset: 0x65380 length: 0x1000
READ64 image: 13 offset: 0x66380 length: 0x1000
READ64 image: 13 offset: 0x67380 length: 0x1000
READ64 image: 13 offset: 0x68380 length: 0x1000
READ64 image: 13 offset: 0x69380 length: 0x1000
READ64 image: 13 offset: 0x6a380 length: 0x1000
READ64 image: 13 offset: 0x6b380 length: 0x1000
READ64 image: 13 offset: 0x6c380 length: 0x1000
READ64 image: 13 offset: 0x6d380 length: 0x1000
READ64 image: 13 offset: 0x6e380 length: 0x1000
READ64 image: 13 offset: 0x6f380 length: 0x1000
READ64 image: 13 offset: 0x70380 length: 0x1000
READ64 image: 13 offset: 0x71380 length: 0x1000
READ64 image: 13 offset: 0x72380 length: 0x1000
READ64 image: 13 offset: 0x73380 length: 0x1000
READ64 image: 13 offset: 0x74380 length: 0x1000
READ64 image: 13 offset: 0x75380 length: 0x1000
READ64 image: 13 offset: 0x76380 length: 0x1000
READ64 image: 13 offset: 0x77380 length: 0x1000
READ64 image: 13 offset: 0x78380 length: 0x1000
READ64 image: 13 offset: 0x79380 length: 0x1000
READ64 image: 13 offset: 0x7a380 length: 0x1000
READ64 image: 13 offset: 0x7b380 length: 0x1000
READ64 image: 13 offset: 0x7c380 length: 0x1000
READ64 image: 13 offset: 0x7d380 length: 0x3b2
READ64 image: 13 offset: 0x7d740 length: 0xd4
READ64 image: 13 offset: 0x7d814 length: 0x1000
READ64 image: 13 offset: 0x7e814 length: 0x1000
READ64 image: 13 offset: 0x7f814 length: 0x1000
READ64 image: 13 offset: 0x80814 length: 0x1000
READ64 image: 13 offset: 0x81814 length: 0x1000
READ64 image: 13 offset: 0x82814 length: 0x1000
READ64 image: 13 offset: 0x83814 length: 0x1000
READ64 image: 13 offset: 0x84814 length: 0xe68
READ64 image: 13 offset: 0x8567c length: 0x1000
READ64 image: 13 offset: 0x8667c length: 0x1000
READ64 image: 13 offset: 0x8767c length: 0x1000
READ64 image: 13 offset: 0x8867c length: 0x404
READ64 image: 13 offset: 0x88a80 length: 0x1000
READ64 image: 13 offset: 0x89a80 length: 0x1000
READ64 image: 13 offset: 0x8aa80 length: 0x1000
READ64 image: 13 offset: 0x8ba80 length: 0x404
READ64 image: 13 offset: 0x8be84 length: 0x1000
READ64 image: 13 offset: 0x8ce84 length: 0x1000
READ64 image: 13 offset: 0x8de84 length: 0x1000
READ64 image: 13 offset: 0x8ee84 length: 0x404
READ64 image: 13 offset: 0x8f288 length: 0x1000
READ64 image: 13 offset: 0x90288 length: 0x1000
READ64 image: 13 offset: 0x91288 length: 0x1000
READ64 image: 13 offset: 0x92288 length: 0x404
READ64 image: 13 offset: 0x9268c length: 0x1000
READ64 image: 13 offset: 0x9368c length: 0x1000
READ64 image: 13 offset: 0x9468c length: 0x1000
READ64 image: 13 offset: 0x9568c length: 0x1000
READ64 image: 13 offset: 0x9668c length: 0x1000
READ64 image: 13 offset: 0x9768c length: 0x1000
READ64 image: 13 offset: 0x9868c length: 0x1000
READ64 image: 13 offset: 0x9968c length: 0x1000
READ64 image: 13 offset: 0x9a68c length: 0x1000
READ64 image: 13 offset: 0x9b68c length: 0x1000
READ64 image: 13 offset: 0x9c68c length: 0x1000
READ64 image: 13 offset: 0x9d68c length: 0x1000
READ64 image: 13 offset: 0x9e68c length: 0x1000
READ64 image: 13 offset: 0x9f68c length: 0x1000
READ64 image: 13 offset: 0xa068c length: 0x1000
READ64 image: 13 offset: 0xa168c length: 0x1000
READ64 image: 13 offset: 0xa268c length: 0x1000
READ64 image: 13 offset: 0xa368c length: 0x1000
READ64 image: 13 offset: 0xa468c length: 0x1000
READ64 image: 13 offset: 0xa568c length: 0xb25
END OF IMAGE image: 13 status: 0
DONE status: 1
LOG: INFO: Binary build date: May 28 2019 @ 11:22:21
LOG: INFO: Binary build date: May 28 2019 @ 11:22:21 
LOG: INFO: Chip serial num: 1123421216 (0x42f60c20)
LOG: INFO: Supported Functions (14):
LOG: INFO: program
LOG: INFO: read
LOG: INFO: nop
LOG: INFO: patch
LOG: INFO: configure
LOG: INFO: setbootablestoragedrive
LOG: INFO: erase
LOG: INFO: power
LOG: INFO: firmwarewrite
LOG: INFO: getstorageinfo
LOG: INFO: benchmark
LOG: INFO: emmc
LOG: INFO: ufs
LOG: INFO: fixgpt
LOG: INFO: End of supported functions 14
qdl: failed to read: Connection timed out
LOG: INFO: Calling handler for configure
LOG: INFO: Storage type set to value UFS
LOG: INFO: Calling handler for program
LOG: ERROR: Failed to open the UFS Device slot 0 partition 0
LOG: ERROR: Failed to open the device:3 slot:0 partition:0 error:0
LOG: ERROR: OPEN handle NULL and no error, weird 344530484
LOG: ERROR: Failed to open device, type:UFS, slot:0, lun:0 error:3
[PROGRAM] failed to setup programming

and the corresponding UART debug log

Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.XF.2.0-00371-SDM845LZB-1
S - IMAGE_VARIANT_STRING=SDM845LA
S - OEM_IMAGE_VERSION_STRING=TSBJ-FA-PC-02170
S - Boot Interface: Unknown
S - Secure Boot: Off
S - Boot Config @ 0x00786070 = 0x000000c1
S - JTAG ID @ 0x00786130 = 0x2008e0e1
S - OEM ID @ 0x00786138 = 0x00000000
S - Serial Number @ 0x00784138 = 0x42f60c20
S - OEM Config Row 0 @ 0x00784188 = 0x0000000400000000
S - OEM Config Row 1 @ 0x00784190 = 0x0000000000000000
S - Feature Config Row 0 @ 0x007841a0 = 0x0050200080000400
S - Feature Config Row 1 @ 0x007841a8 = 0xe000ffff00007fff
S - Core 0 Frequency, 1516 MHz
S - PBL Patch Ver: 1
S - PBL freq: 600 MHZ
B -        94 - PBL, Start
B -      5274 - bootable_media_detect_entry
B -    382152 - bootable_media_detect_success
B -    382527 - elf_loader_entry
B -    436086 - auth_hash_seg_entry
B -    436293 - auth_hash_seg_exit
B -    492579 - elf_segs_hash_verify_entry
B -    500196 - elf_segs_hash_verify_exit
B -    501083 - auth_xbl_sec_hash_seg_entry
B -    508465 - auth_xbl_sec_hash_seg_exit
B -    508466 - xbl_sec_segs_hash_verify_entry
B -    509223 - xbl_sec_segs_hash_verify_exit
B -    509248 - PBL, End
B -         0 - SBL1, Start
B -    647210 - boot_flash_init, Start
D -        30 - boot_flash_init, Delta
B -    651236 - xblconfig_init, Start
D -      1342 - xblconfig_init, Delta
B -    658159 - sbl1_ddr_set_default_params, Start
D -      1494 - sbl1_ddr_set_default_params, Delta
B -    666150 - boot_config_data_table_init, Start
D -        30 - boot_config_data_table_init, Delta - (0 Bytes)
B -    675270 - CDT Version:3,Platform ID:8,Major ID:1,Minor ID:0,Subtype:0
B -    686463 - pm_device_programmer_init, Start
D -      2867 - pm_device_programmer_init, Delta
B -    691984 - sbl1_ddr_set_params, Start
B -    697870 - Pre_DDR_clock_init, Start
D -        61 - Pre_DDR_clock_init, Delta
D -     12047 - sbl1_ddr_set_params, Delta
B -    707752 - sbl1_ddr_init, Start
D -     13084 - sbl1_ddr_init, Delta
B -    724741 - DSF version = 253.10, DSF SHRM version = 173.3
B -    728065 - Manufacturer ID = 1, Device Type = 0
B -    733677 - Rank 0 size = 4096 MB, Rank 1 size = 0 MB
B -    739045 - usb: init start
B -    743620 - usb: id , 0xd7
B -    746457 - usb: SUPER , 0x900e
B -    749324 - usb: ENUM success
B -    752587 - usb: id_p , 0x400e2
B -   3601745 - usb: host sends ZLP
B -   3715845 - ufs_error_log: 11
B -   3715845 - ufs_error_log: 3
B -   3718926 - IS: 4, UECPA: 0, UECDL: 0, UECN: 0, UECT: 0, UECDME: 80000001, REG_PA_ERR_CODE: 0
B -   3727496 - ufs_error_log: 3
B -   3735731 - ufs_error_log: 11
B -   3735731 - ufs_error_log: 3
B -   3738812 - ufs_error_log: 11
B -   3741801 - ufs_error_log: 3
B -   3744881 - ufs_error_log: 11
B -   3747840 - ufs_error_log: 3
B -   3750920 - ufs_error_log: 11
B -   3753909 - ufs_error_log: 3
B -   3756959 - ufs_error_log: a
B -   3858616 - IS: 404, UECPA: 80000001, UECDL: 80004000, UECN: 0, UECT: 0, UECDME: 0, REG_PA_ERR_CODE: 1
B -   3864228 - ufs_error_log: 2b0

Attempt 2:
command log

$ sudo ../qdl/qdl prog_firehose_ddr.elf rawprogram?.xml patch?.xml
Waiting for EDL device
/dev/bus/usb/002/013
HELLO version: 0x2 compatible: 0x1 max_len: 1024 mode: 0
READ64 image: 13 offset: 0x0 length: 0x40
READ64 image: 13 offset: 0x40 length: 0x428
READ64 image: 13 offset: 0x1000 length: 0x1000
READ64 image: 13 offset: 0x2000 length: 0xb88
READ64 image: 13 offset: 0x3000 length: 0x1000
READ64 image: 13 offset: 0x4000 length: 0x1000
READ64 image: 13 offset: 0x5000 length: 0x1000
READ64 image: 13 offset: 0x6000 length: 0x1000
READ64 image: 13 offset: 0x7000 length: 0x1000
READ64 image: 13 offset: 0x8000 length: 0x1000
READ64 image: 13 offset: 0x9000 length: 0x1000
READ64 image: 13 offset: 0xa000 length: 0x1000
READ64 image: 13 offset: 0xb000 length: 0x1000
READ64 image: 13 offset: 0xc000 length: 0x1000
READ64 image: 13 offset: 0xd000 length: 0x1000
READ64 image: 13 offset: 0xe000 length: 0x1000
READ64 image: 13 offset: 0xf000 length: 0x1000
READ64 image: 13 offset: 0x10000 length: 0x1000
READ64 image: 13 offset: 0x11000 length: 0x1000
READ64 image: 13 offset: 0x12000 length: 0x1000
READ64 image: 13 offset: 0x13000 length: 0x1000
READ64 image: 13 offset: 0x14000 length: 0x1000
READ64 image: 13 offset: 0x15000 length: 0x1000
READ64 image: 13 offset: 0x16000 length: 0x1000
READ64 image: 13 offset: 0x17000 length: 0x1000
READ64 image: 13 offset: 0x18000 length: 0x1000
READ64 image: 13 offset: 0x19000 length: 0x1000
READ64 image: 13 offset: 0x1a000 length: 0x1000
READ64 image: 13 offset: 0x1b000 length: 0x1000
READ64 image: 13 offset: 0x1c000 length: 0x1000
READ64 image: 13 offset: 0x1d000 length: 0x1000
READ64 image: 13 offset: 0x1e000 length: 0x1000
READ64 image: 13 offset: 0x1f000 length: 0x1000
READ64 image: 13 offset: 0x20000 length: 0x1000
READ64 image: 13 offset: 0x21000 length: 0x1000
READ64 image: 13 offset: 0x22000 length: 0x1000
READ64 image: 13 offset: 0x23000 length: 0x1000
READ64 image: 13 offset: 0x24000 length: 0x1000
READ64 image: 13 offset: 0x25000 length: 0x1000
READ64 image: 13 offset: 0x26000 length: 0x1000
READ64 image: 13 offset: 0x27000 length: 0x1000
READ64 image: 13 offset: 0x28000 length: 0x1000
READ64 image: 13 offset: 0x29000 length: 0x1000
READ64 image: 13 offset: 0x2a000 length: 0x1000
READ64 image: 13 offset: 0x2b000 length: 0x1000
READ64 image: 13 offset: 0x2c000 length: 0x1000
READ64 image: 13 offset: 0x2d000 length: 0x1000
READ64 image: 13 offset: 0x2e000 length: 0x1000
READ64 image: 13 offset: 0x2f000 length: 0x1000
READ64 image: 13 offset: 0x30000 length: 0x1000
READ64 image: 13 offset: 0x31000 length: 0x1000
READ64 image: 13 offset: 0x32000 length: 0x1000
READ64 image: 13 offset: 0x33000 length: 0x1000
READ64 image: 13 offset: 0x34000 length: 0x1000
READ64 image: 13 offset: 0x35000 length: 0x1000
READ64 image: 13 offset: 0x36000 length: 0x1000
READ64 image: 13 offset: 0x37000 length: 0x1000
READ64 image: 13 offset: 0x38000 length: 0x1000
READ64 image: 13 offset: 0x39000 length: 0x1000
READ64 image: 13 offset: 0x3a000 length: 0x1000
READ64 image: 13 offset: 0x3b000 length: 0x1000
READ64 image: 13 offset: 0x3c000 length: 0x1000
READ64 image: 13 offset: 0x3d000 length: 0x1000
READ64 image: 13 offset: 0x3e000 length: 0x1000
READ64 image: 13 offset: 0x3f000 length: 0x1000
READ64 image: 13 offset: 0x40000 length: 0x1000
READ64 image: 13 offset: 0x41000 length: 0x1000
READ64 image: 13 offset: 0x42000 length: 0x1000
READ64 image: 13 offset: 0x43000 length: 0x1000
READ64 image: 13 offset: 0x44000 length: 0x1000
READ64 image: 13 offset: 0x45000 length: 0x1000
READ64 image: 13 offset: 0x46000 length: 0x1000
READ64 image: 13 offset: 0x47000 length: 0x1000
READ64 image: 13 offset: 0x48000 length: 0x1000
READ64 image: 13 offset: 0x49000 length: 0x1000
READ64 image: 13 offset: 0x4a000 length: 0x1000
READ64 image: 13 offset: 0x4b000 length: 0x1000
READ64 image: 13 offset: 0x4c000 length: 0x1000
READ64 image: 13 offset: 0x4d000 length: 0x1000
READ64 image: 13 offset: 0x4e000 length: 0x1000
READ64 image: 13 offset: 0x4f000 length: 0x1000
READ64 image: 13 offset: 0x50000 length: 0x1000
READ64 image: 13 offset: 0x51000 length: 0xe4c
READ64 image: 13 offset: 0x51e50 length: 0x1000
READ64 image: 13 offset: 0x52e50 length: 0x1000
READ64 image: 13 offset: 0x53e50 length: 0x1000
READ64 image: 13 offset: 0x54e50 length: 0x1000
READ64 image: 13 offset: 0x55e50 length: 0x1000
READ64 image: 13 offset: 0x56e50 length: 0x1000
READ64 image: 13 offset: 0x57e50 length: 0x1000
READ64 image: 13 offset: 0x58e50 length: 0x1000
READ64 image: 13 offset: 0x59e50 length: 0x846
READ64 image: 13 offset: 0x5a6a0 length: 0x1000
READ64 image: 13 offset: 0x5b6a0 length: 0x1000
READ64 image: 13 offset: 0x5c6a0 length: 0xb1c
READ64 image: 13 offset: 0x5d1c0 length: 0x1b4
READ64 image: 13 offset: 0x5d380 length: 0x1000
READ64 image: 13 offset: 0x5e380 length: 0x1000
READ64 image: 13 offset: 0x5f380 length: 0x1000
READ64 image: 13 offset: 0x60380 length: 0x1000
READ64 image: 13 offset: 0x61380 length: 0x1000
READ64 image: 13 offset: 0x62380 length: 0x1000
READ64 image: 13 offset: 0x63380 length: 0x1000
READ64 image: 13 offset: 0x64380 length: 0x1000
READ64 image: 13 offset: 0x65380 length: 0x1000
READ64 image: 13 offset: 0x66380 length: 0x1000
READ64 image: 13 offset: 0x67380 length: 0x1000
READ64 image: 13 offset: 0x68380 length: 0x1000
READ64 image: 13 offset: 0x69380 length: 0x1000
READ64 image: 13 offset: 0x6a380 length: 0x1000
READ64 image: 13 offset: 0x6b380 length: 0x1000
READ64 image: 13 offset: 0x6c380 length: 0x1000
READ64 image: 13 offset: 0x6d380 length: 0x1000
READ64 image: 13 offset: 0x6e380 length: 0x1000
READ64 image: 13 offset: 0x6f380 length: 0x1000
READ64 image: 13 offset: 0x70380 length: 0x1000
READ64 image: 13 offset: 0x71380 length: 0x1000
READ64 image: 13 offset: 0x72380 length: 0x1000
READ64 image: 13 offset: 0x73380 length: 0x1000
READ64 image: 13 offset: 0x74380 length: 0x1000
READ64 image: 13 offset: 0x75380 length: 0x1000
READ64 image: 13 offset: 0x76380 length: 0x1000
READ64 image: 13 offset: 0x77380 length: 0x1000
READ64 image: 13 offset: 0x78380 length: 0x1000
READ64 image: 13 offset: 0x79380 length: 0x1000
READ64 image: 13 offset: 0x7a380 length: 0x1000
READ64 image: 13 offset: 0x7b380 length: 0x1000
READ64 image: 13 offset: 0x7c380 length: 0x1000
READ64 image: 13 offset: 0x7d380 length: 0x3b2
READ64 image: 13 offset: 0x7d740 length: 0xd4
READ64 image: 13 offset: 0x7d814 length: 0x1000
READ64 image: 13 offset: 0x7e814 length: 0x1000
READ64 image: 13 offset: 0x7f814 length: 0x1000
READ64 image: 13 offset: 0x80814 length: 0x1000
READ64 image: 13 offset: 0x81814 length: 0x1000
READ64 image: 13 offset: 0x82814 length: 0x1000
READ64 image: 13 offset: 0x83814 length: 0x1000
READ64 image: 13 offset: 0x84814 length: 0xe68
READ64 image: 13 offset: 0x8567c length: 0x1000
READ64 image: 13 offset: 0x8667c length: 0x1000
READ64 image: 13 offset: 0x8767c length: 0x1000
READ64 image: 13 offset: 0x8867c length: 0x404
READ64 image: 13 offset: 0x88a80 length: 0x1000
READ64 image: 13 offset: 0x89a80 length: 0x1000
READ64 image: 13 offset: 0x8aa80 length: 0x1000
READ64 image: 13 offset: 0x8ba80 length: 0x404
READ64 image: 13 offset: 0x8be84 length: 0x1000
READ64 image: 13 offset: 0x8ce84 length: 0x1000
READ64 image: 13 offset: 0x8de84 length: 0x1000
READ64 image: 13 offset: 0x8ee84 length: 0x404
READ64 image: 13 offset: 0x8f288 length: 0x1000
READ64 image: 13 offset: 0x90288 length: 0x1000
READ64 image: 13 offset: 0x91288 length: 0x1000
READ64 image: 13 offset: 0x92288 length: 0x404
READ64 image: 13 offset: 0x9268c length: 0x1000
READ64 image: 13 offset: 0x9368c length: 0x1000
READ64 image: 13 offset: 0x9468c length: 0x1000
READ64 image: 13 offset: 0x9568c length: 0x1000
READ64 image: 13 offset: 0x9668c length: 0x1000
READ64 image: 13 offset: 0x9768c length: 0x1000
READ64 image: 13 offset: 0x9868c length: 0x1000
READ64 image: 13 offset: 0x9968c length: 0x1000
READ64 image: 13 offset: 0x9a68c length: 0x1000
READ64 image: 13 offset: 0x9b68c length: 0x1000
READ64 image: 13 offset: 0x9c68c length: 0x1000
READ64 image: 13 offset: 0x9d68c length: 0x1000
READ64 image: 13 offset: 0x9e68c length: 0x1000
READ64 image: 13 offset: 0x9f68c length: 0x1000
READ64 image: 13 offset: 0xa068c length: 0x1000
READ64 image: 13 offset: 0xa168c length: 0x1000
READ64 image: 13 offset: 0xa268c length: 0x1000
READ64 image: 13 offset: 0xa368c length: 0x1000
READ64 image: 13 offset: 0xa468c length: 0x1000
READ64 image: 13 offset: 0xa568c length: 0xb25
END OF IMAGE image: 13 status: 0
DONE status: 1
LOG: INFO: Binary build date: May 28 2019 @ 11:22:21
LOG: INFO: Binary build date: May 28 2019 @ 11:22:21 
LOG: INFO: Chip serial num: 1123421216 (0x42f60c20)
LOG: INFO: Supported Functions (14):
LOG: INFO: program
LOG: INFO: read
LOG: INFO: nop
LOG: INFO: patch
LOG: INFO: configure
LOG: INFO: setbootablestoragedrive
LOG: INFO: erase
LOG: INFO: power
LOG: INFO: firmwarewrite
LOG: INFO: getstorageinfo
LOG: INFO: benchmark
LOG: INFO: emmc
LOG: INFO: ufs
LOG: INFO: fixgpt
LOG: INFO: End of supported functions 14
qdl: failed to read: Connection timed out
LOG: INFO: Calling handler for configure
LOG: INFO: Storage type set to value UFS
LOG: INFO: Calling handler for program
[PROGRAM] flashed "PrimaryGPT" successfully
LOG: INFO: Calling handler for program
[PROGRAM] flashed "BackupGPT" successfully
LOG: INFO: Calling handler for program
[PROGRAM] flashed "xbl_a" successfully at 3212kB/s
LOG: INFO: Calling handler for program
[PROGRAM] flashed "xbl_config_a" successfully
LOG: INFO: Calling handler for program
[PROGRAM] flashed "PrimaryGPT" successfully
LOG: INFO: Calling handler for program
[PROGRAM] flashed "BackupGPT" successfully
LOG: INFO: Calling handler for program
ERROR: n = -1, errno = 110 (Connection timed out)
qdl: failed to write: Connection timed out

UART debug log

Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.XF.2.0-00371-SDM845LZB-1
S - IMAGE_VARIANT_STRING=SDM845LA
S - OEM_IMAGE_VERSION_STRING=TSBJ-FA-PC-02170
S - Boot Interface: Unknown
S - Secure Boot: Off
S - Boot Config @ 0x00786070 = 0x000000c1
S - JTAG ID @ 0x00786130 = 0x2008e0e1
S - OEM ID @ 0x00786138 = 0x00000000
S - Serial Number @ 0x00784138 = 0x42f60c20
S - OEM Config Row 0 @ 0x00784188 = 0x0000000400000000
S - OEM Config Row 1 @ 0x00784190 = 0x0000000000000000
S - Feature Config Row 0 @ 0x007841a0 = 0x0050200080000400
S - Feature Config Row 1 @ 0x007841a8 = 0xe000ffff00007fff
S - Core 0 Frequency, 1516 MHz
S - PBL Patch Ver: 1
S - PBL freq: 600 MHZ
B -        94 - PBL, Start
B -      5274 - bootable_media_detect_entry
B -    310043 - bootable_media_detect_success
B -    310420 - elf_loader_entry
B -    373898 - auth_hash_seg_entry
B -    374105 - auth_hash_seg_exit
B -    430672 - elf_segs_hash_verify_entry
B -    438290 - elf_segs_hash_verify_exit
B -    439181 - auth_xbl_sec_hash_seg_entry
B -    446560 - auth_xbl_sec_hash_seg_exit
B -    446561 - xbl_sec_segs_hash_verify_entry
B -    447318 - xbl_sec_segs_hash_verify_exit
B -    447342 - PBL, End
B -         0 - SBL1, Start
B -    585356 - boot_flash_init, Start
D -         0 - boot_flash_init, Delta
B -    589382 - xblconfig_init, Start
D -      1311 - xblconfig_init, Delta
B -    596305 - sbl1_ddr_set_default_params, Start
D -      1525 - sbl1_ddr_set_default_params, Delta
B -    604296 - boot_config_data_table_init, Start
D -         0 - boot_config_data_table_init, Delta - (0 Bytes)
B -    613385 - CDT Version:3,Platform ID:8,Major ID:1,Minor ID:0,Subtype:0
B -    624579 - pm_device_programmer_init, Start
D -      2897 - pm_device_programmer_init, Delta
B -    630130 - sbl1_ddr_set_params, Start
B -    636016 - Pre_DDR_clock_init, Start
D -        61 - Pre_DDR_clock_init, Delta
D -     12017 - sbl1_ddr_set_params, Delta
B -    645898 - sbl1_ddr_init, Start
D -     13115 - sbl1_ddr_init, Delta
B -    662887 - DSF version = 253.10, DSF SHRM version = 173.3
B -    666211 - Manufacturer ID = 1, Device Type = 0
B -    671823 - Rank 0 size = 4096 MB, Rank 1 size = 0 MB
B -    677191 - usb: init start
B -    681766 - usb: id , 0xd7
B -    684603 - usb: SUPER , 0x900e
B -    687470 - usb: ENUM success
B -    690703 - usb: id_p , 0x400e2
B -   3542544 - usb: host sends ZLP
B -   4932063 - ufs_error_log: 133
B -   4932063 - ufs_error_log: 284

Why is it giving ufs error? Could you please help to resolve this issue?

Thank you.