Hello, friends!
I bought a ROCK 4D and am trying to write an Android 14 image to a UFS via USB UFS Reader. I erased the SPINOR and used balena to write the official Radxa Android image to the UFS, but after powering it on, the board immediately goes into Maskrom, and there are no messages via UART. After rewriting the rk3576_spl_loader.bin bootloader, I get messages via UART saying the UFS is detected, but the blocks are 512B:
DDR 2f85f4b2d4 cym 24/11/07-19:07:28,fwver: v1.09
In
ch0 ttot6
ch1 ttot6
ch0 ttot7
LPDDR5, 2736MHz
channel[0] BW=16 Col=10 Bk=16 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=4096MB
ch1 ttot7
channel[1] BW=16 Col=10 Bk=16 CS0 Row=16 CS1 Row=16 CS=2 Die BW=16 Size=4096MB
Manufacturer ID:0x6
CH0 RX Vref:24.9%, RX DQS Vref:31.2%, TX Vref:20.0%,20.0%
DQ roc:
p0 n0, p2 n0, p5 n0, p0 n1, p0 n0, p2 n0, p4 n0, p0 n0, p1 n0,
p0 n0, p0 n0, p2 n0, p3 n0, p1 n1, p1 n0, p0 n0, p1 n0, p2 n4,
DQ rds:l0 l0 l0 l0 l0 l0 l0 l0, l0 l0 l0 l0 l0 l0 l0 l0
DQS roc: p2, n0, p2, n0
CH1 RX Vref:23.7%, RX DQS Vref:29.2%, TX Vref:20.0%,21.0%
DQ roc:
p1 n0, p6 n0, p2 n0, p0 n2, p3 n0, p0 n1, p4 n0, p1 n0, p5 n0,
p0 n0, p1 n0, p0 n1, p4 n0, p6 n0, p0 n0, p4 n0, p4 n0, p2 n0,
DQ rds:l0 h1 l0 l0 l0 l0 h1 l0, l0 l0 l0 l0 l0 h1 l0 l0
DQS roc: p1, n0, p0, n0
stride=0x3, ddr_config=0x6
hash bank_mask0-3 0x0 0x2100 0x44200 0x88400, rank_mask0 0x800
change to F1: 534MHz
ch0 ttot6
ch1 ttot6
change to F2: 1320MHz
ch0 ttot8
ch1 ttot8
change to F3: 1968MHz
ch0 ttot6
ch1 ttot6
change to F0: 2736MHz
ch0 ttot7
ch1 ttot7
out
USB-PLUG 2017.09-g13ceb2afdcb-241106 #lxh (Nov 07 2024 - 16:10:03 +0800)
Serial: raw, 0x2ad40000
scanning bus for devices…
ufs_create_partition_inventory: WB_max_alloc_units = cb1d0000
—UFS Device Descriptor Config Param—
bLength: 0xe6
bDescriptorIDN: 0x1
bConfDescContinue: 0x0
bBootEnable: 0x1
bDescrAccessEn: 0x0
bInitPowerMode: 0x1
bHighPriorityLUN: 0x7f
bSecureRemovalType: 0x0
bInitActiveICCLevel: 0x0
wPeriodicRTCUpdate: 0x0
bSecureRemovalType: 0x0
bInitActiveICCLevel: 0x0
wPeriodicRTCUpdate: 0x0
bWB_EN: 0x1
WB_TYPE: 0x1
WB_alloc_units: 0x1dcb
—UFS Unit 0 Descriptor Config Param—
bLUEnable: 0x1
bBootLunID: 0x0
bLUWriteProtect: 0x0
bMemoryType: 0x0
dNumAllocUnits: 0x7726
bDataReliability: 0x1
bLogicalBlockSize: 0xc
bProvisioningType: 0x2
wContextCapabilities: 0x0
—UFS Unit 1 Descriptor Config Param—
bLUEnable: 0x1
bBootLunID: 0x1
bLUWriteProtect: 0x0
bMemoryType: 0x3
dNumAllocUnits: 0x3
bDataReliability: 0x1
bLogicalBlockSize: 0xc
bProvisioningType: 0x2
wContextCapabilities: 0x0
-------------------------------------UFS Unit 2 Descriptor Config Param—
bLUEnable: 0x1
bBootLunID: 0x2
bLUWriteProtect: 0x0
bMemoryTcUnits: 0x3
bDataReliability: 0x1
bLogicalBlockSize: 0xc
bPro2
wContextCapabilities: 0x0
----------------------------------nit 3 Descriptor Config Param—
------------------------------able: 0x1
bBootLunID: 0x0
bLUWriteProtect: 0x0
bMemoryType: 0DataReliability: 0x1
bLogicalBlockSize: 0xc
bProvisioningType:ities: 0x0
—UFS Unnfig Param—
bLUEnanID: 0x0
bLUWriteProtect: 0x0
bMemoryType: 0x0
dNumAllocUnitsility: 0x0
bLogicalBlockSize: 0x0
bProvisioningType: 0x0
wCon0x0
—UFS Unit 5 De—
bLUEnable: 0x0
bLUWriteProtect: 0x0
bMemoryType: 0x0
dNumAllocUnits: 0x0
bDabLogicalBlockSize: 0x0
bProvisioningType: 0x0
wContextCapabili-----------------------------------
—UFS Unit 6 Descriptor Co--------------------------------------
bLUEnable: 0x0
bBootLunt: 0x0
bMemoryType: 0x0
dNumAllocUnits: 0x0
bDataReliability:ize: 0x0
bProvisioningType: 0x0
wContextCapabilities: 0x0
—UFS Unit 7 Descriptor Config Param—
bLUEnable: 0x0
bBootLunID: 0x0
bLUWriteProte: 0x0
dNumAllocUnits: 0x0
bDataReliability: 0x0
bLogicalBlockingType: 0x0
wContextCapabilities: 0x0
-----------------------S Device Descriptor Config Param—
---------------------------th: 0xe6
bDescriptorIDN: 0x1
bConfDescContinue: 0x0
bBootEnab0x0
bInitPowerMode: 0x1
bHighPriorityLUN: 0x7f
bSecureRemovalveICCLevel: 0x0
wPeriodicRTCUpdate: 0x0
bSecureRemovalType: 0xLevel: 0x0
wPeriodicRTCUpdate: 0x0
bWB_EN: 0x1
WB_TYPE: 0x1
—UFS Unit 0 Descrm—
bLUWriteProtect: 0x0
bMemoryType: 0x0
dNumAllocUnits: 0x7726
1
bLogicalBlockSize: 0xc
bProvisioningType: 0x2
wContextCapab--------------------------------------
—UFS Unit 1 Descriptor------------------------------
bLUEnable: 0x1
bMemoryType: 0x3
dNumAllocUnits: 0x3
bDataReliability: 0x1
bL
bProvisioningType: 0x2
wContextCapabilities: 0x0
—UFS Unit 2 Descriptor Config Param—
bLUEnable: 0x1
bBootLunID: 0x2
bLUWriteProtect: 0x0
bNumAllocUnits: 0x3
bDataReliability: 0x1
bLogicalBlockSize: 0xype: 0x2
wContextCapabilities: 0x0
----------------------------UFS Unit 3 Descriptor Config Param—
bLUEnable: 0x1
bBootLunID: 0x0
bLUWriteProtect: 0x0
bMemorynits: 0x6
bDataReliability: 0x1
bLogicalBlockSize: 0xc
bProviwContextCapabilities: 0x0
-------------------------------------scriptor Config Param—
bBootLunID: 0x0
bLUWriteProtect: 0x0
bMemoryType: 0x0
dNumAtaReliability: 0x0
bLogicalBlockSize: 0x0
bProvisioningType: 0es: 0x0
—UFS Unit Param—
bLUEnable:
bLUWriteProtect: 0x0
bMemoryType: 0x0
dNumAllocUnits: 0x0
bLogicalBlockSize: 0x0
bProvisioningType: 0x0
wContextCapabilit--------------------------------
—UFS Unit 6 Descriptor Confi----------------------------------
bLUEnable: 0x0
bBootLunID: t: 0x0
bMemoryType: 0x0
dNumAllocUnits: 0x0
bDataReliability:e: 0x0
bProvisioningType: 0x0
wContextCapabilities: 0x0
—UFS Unit 7 Descriptor Config Param—
bLUEnable: 0x0
bBootLunID: 0x0
bLUWriteProtect: 0xdNumAllocUnits: 0x0
bDataReliability: 0x0
bLogicalBlockSize: 0pe: 0x0
wContextCapabilities: 0x0
compair_conf_desp: 0x0
—UFS Device Descriptor—
briptorIDN: 0x0
bDevice: 0x0
bDeviceClass: 0x0
bDeviceSubClassx0
bNumberLU: 0x4
bNumberWLU: 0x4
bBootEnable: 0x1
bDescrAccerMode: 0x1
bHighPriorityLUN: 0x7f
bSecureRemovalType: 0x0
bSackgroundOpsTermLat: 0x4
bInitActiveICCLevel: 0x0
wSpecVersionDate: 0x323
iManufacturerName: 0x0
iProductName: 0x1
iSerialN0x3
wManufacturerID: 0x1ce
bUD0BaseOffset: 0x16
bUDConfigPLenTCap: 0x2
wPeriodicRTCUpdate: 0x0
bUFSFeatureSupport: 0x3
bFFrea: 0x20
dPSAMaxDataSize: 0x9ee000
bPSAStateTimeout: 0x0
iPrUFS get ref clock 26 Mhz
UFS get boot W-LU-A
Device at ufs@2a2d0000 up at:[RX, TX]: gear=[3, 3], lane[2, 2], pwr[FAST MODE, FAST MODE], rate = 2
Device 0: (0:0) Vendor: SAMSUNG Prod.: KLUDG4UHGC-B0E1 Rev: 3203
Type: Hard Disk
Capacity: 122008.0 MB = 119.1 GB (249872384 x 512)
Device 0: (0:1) Vendor: SAMSUNG Prod.: KLUDG4UHGC-B0E1 Rev: 3203
Type: Hard Disk
Capacity: 4.0 MB = 0.0 GB (8192 x 512)
Device 0: (0:2) Vendor: SAMSUNG Prod.: KLUDG4UHGC-B0E1 Rev: 3203
Type: Hard Disk
Capacity: 4.0 MB = 0.0 GB (8192 x 512)
Device 0: (0:3) Vendor: SAMSUNG Prod.: KLUDG4UHGC-B0E1 Rev: 3203
Type: Hard Disk
Capacity: 8.0 MB = 0.0 GB (16384 x 512)
Scandev: scsi 0 m0
Bootdev: scsi 0
RKUSB: LUN 0, dev 0, hwpart 0, sector 0x0, count 0xee4c000
\usb device is high-speed
\
UPD:
I started Linux from an SD card. parted detects the sector size at 4096B, but it doesn’t detect the partition table:
sudo parted /dev/sda
[sudo] password for radxa:
GNU Parted 3.5
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: /dev/sda: unrecognised disk label
Model: SAMSUNG KLUDG4UHGC-B0E1 (scsi)
Disk /dev/sda: 128GB
Sector size (logical/physical): 4096B/4096B
Partition Table: unknown
Disk Flags:
(parted) quit
radxa@rock-4d-spi:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 119.1G 0 disk
sdb 8:16 0 4M 0 disk
sdc 8:32 0 4M 0 disk
sdd 8:48 0 8M 0 disk
mtdblock0 31:0 0 16M 0 disk
mmcblk1 179:0 0 28.8G 0 disk
├─mmcblk1p1 179:1 0 16M 0 part /config
├─mmcblk1p2 179:2 0 300M 0 part /boot/efi
└─mmcblk1p3 179:3 0 28.5G 0 part /
zram0 253:0 0 3.9G 0 disk [SWAP]
